views:

25

answers:

1

In the days of parallel printers one used to be able to send a command on LPT1 and receive back standard info such as life count etc.

Now, with USB devices, have we lost that capability? Or is there still a way to read the info?

A: 

I assume your question is Windows centric. On some devices the manufacturer (like Epson and Star for example) provide utilities that let you access the device as a 'legacy serial' interface. It's still USB but the software gives you a virtual serial port you can talk to it with. I've been doing some digging trying to figure out what features are exposed by the low level drivers, but haven't had much luck there as Windows drivers really aren't my forte.

In the windows printers you get to select from a variety of ports. For parallel and serial you can open them as \.\LPT1 or \.\COM1 etc and get bi-directional behaviour that way. But for USB the ports are often USB001, and trying to open \.\USB001 for example doesn't seem to work. Such an approach might work, if you can figure out exactly what name to open. But that name will probably have a big ugly GUID in it if the information you see in winobj is anything to go by...

If you come up with any better answers please let me know!

Terry