NOTE
The PNP string comes with some synonyms:
PNP string Used in this project, the g_printer module
ieee 1284 string Used in the USB specification
device id Used in the USB specification
... maybe more?
The PNP string is send by your printer during the USB enumeration, which happens the moment you connect the printer to a pc or any other USB host. To be able to capture the PNP string using your Windows machine, you need some kind of USB traffic analyzer. I used USBlyzer version 2.2 which comes with a 30 day trial download. For USBlyzer you want to the the following:
- Install and start USBlyzer
- Capture Hot-plugged devices
- Open "Capture" menu in top menu bar
- Confirm "Capture Hot-plugged" is checked
- Start capture traffic (At this moment there shouldn't be any traffic)
- Connect the printer to a USB port
- As soon as you connect the printer, messages should come in!
- Get vendor ID and product ID
- Get PNP string
- Search in received messages for Get Device Id Request
- The payload of this message should contain the needed PNP string
- NOTE Some printers, especially modern multifunction printers might not send the device id during the enumeration. This happened to me with a HP 8710. I haven't figured out how to get the PNP string of these printers.
- Call g_printer as described in README