On Wed, Aug 18, 2010 at 07:32:45PM +0100, Mark Hackett wrote: > I had hoped that, like the standard LPT1: and COM1: devices under DOS > that a USB device would be able to be written to without a driver as > long as you sent the right protocol down to the device (or endpoint). > > E.g. under dos you could: > > C:> cat myfile.txt > LPT1: > > and your printer would print the ASCII file out. > > Doesn't seem to work for USB, despite being apparently a serial bus. Heh, usb is anything but a "serial" bus, why did you think otherwise? Anyway, you can do the above just fine, it works for printers that accept ascii, which are pretty rare these days. > So, am I barking up the wrong tree about how you must talk to a USB > device in Linux? Do you HAVE to write a URB, or is there a way to (if > you have a USB printer that will accept ASCII text stream for > printing) "cat myfile.txt > /dev/usb/2-1:1.1" and get the printer on > that device printing your text? There is a printer driver, have you looked at that? > If you HAVE to URB, why? Is this something that could be done at the > USB subsystem level to let a binary/ascii stream go to the device, > packaged by the fact that it's in the USB subsystem into microframes > by that system itself, and leave it up to the user to know that the > file being sent there is talking the jive with the device. > > NOTE: I do have a device which is a BULKIO device and I know the > binary protocol to make it work. I'd rather make a perl program that > writes up the binary packet and prints it to the device than have to > make a device driver or build up Device::USB etc for any platform > (e.g. OLPC) that I want to drive it with. Please take a look at the book, Linux Device Drivers, third edition, the USB chapter for answers to all of these questions. The book is free online as well. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html