On Friday 30 July 2004 2:18 am, 박호상 wrote: > I am making a device driver for printer using USB.
On some 2.4 kernel ... > I am using gserial.c in driver/usb/gadget. > In general, once USB cable is connected to the Host PC, the Host PC sends > some request packet and device driver responds for request from Host PC. > Maybe, both Host PC and Device PC, request packets are delivered to each > other properly. When I connect USB cable to Host PC, 'New device is > detected' message is shown. So, I think that Standard requests and Class > requests are delivered to each other. If the driver for your USB controller doesn't have a way to dump the control requests as they come along, then add one. You don't need to "think" such things, you can _know_ them! > However, I don't sure that data is also delivered to each other. > By using usbserial.c in Host PC using Linux, if I type a text to > serial(ttyUSB0), it is delivered to USB and delivered to Device PC. This is > "Serial over USB" and it is run properly. > Because data which is typed on ttyUSB0 is delivered to USB, I think that, > in Device PC, PC does not need to know that data comes from whether ttyUSB0 > or not. Device PC just knows that data comes from USB. What windows driver are you using to talk to "gserial"? I'd expect some terminal/modem utility should let you do exactly the same there as from a Linux host.. > So, I connected USB cable to Host PC which is using Window-XP, and 'New > Device is detected' message is shown. That is, Host PC detected that > printer using USB is connected. How did it jump from "serial" link to being a "printer" link? > However, when I installed printer driver made by someone for USB printer in > Host PC and I print some text, it seems to be send some data, but any > operation is not occurred in Device PC. > Anybody knows why it is? You need to implement the "printer class" in your gadget driver. A printer is not a serial line. > Is there any reference for printer device driver which is using USB? If you want specs, see www.usb.org and look at the printer class driver. There's no "gadget" driver for that class that I know about, but the host side driver is "usblp.c" and evidently it gets used a bunch. - Dave ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
