Hi,

박호상 wrote:
> Hello.
> I want to know how bulk data is handled in g_serial.c
> 
> I have changed the g_serial.c for printer.
> Device descriptor, interface descriptor, qualifier descriptor, endpoint and
> configuration descriptor were fixed for printer.
> 
> Once, I wanted to verify whether data went to Target PC from Host PC or not.
> So, I have connected USB cable to Host PC and sent data Target PC.
> However, if I send some data Target PC, Target PC is stopped.
> Is there anybody who knows the reason?
> 

I'm not intimately familiar with serial.c, but I've worked with printer class
before.  Simply changing the descriptor data isn't enough to make a gadget
implement a whole new type of device.  You seem to be under the misconception
that USB is just a byte stream and so the devices all work the same.  This is
true to some degree (in the sense that it's a byte stream), but what those bytes
represent will be completely different and incompatible with different devices.
 So with your changes, when you plug into a host, your device *looks* like a
printer, but it doesn't *act* like a printer.

That said, assuming you have little USB or driver development experience, I
think I would start with g_zero rather than g_serial for this project.  g_serial
just has a whole lot of irrelevant tty stuff in there that you need to throw
away anyway.  g_zero could actually work as a unidirectional "generic text-only"
printer with rather few modifications (mainly dealing with the required class
requests and ripping out all the loopback parts...)

regards,
alex


-------------------------------------------------------
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

Reply via email to