Hello, I think I've got it ... previouusly my endpoints were misconfigured but after reading up on the mailing list over at libusb i *think* i've figured out what was missing.
This is what was in my /proc/bus/usb/devices before : T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 8 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ff(vend.) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=16b4 ProdID=0103 Rev= 2.12 S: Manufacturer=Licensed to Code, LLC S: Product=My Source/Sink Product S: SerialNumber=gpuyb82dkhtsb9z2ten9ezvmc21prls1g3qib5r8fbdwhz8az01w5mcm8d36xip C:* #Ifs= 1 Cfg#= 3 Atr=c0 MxPwr= 2mA I: If#= 0 Alt= 0 #EPs= 0 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none) ^ No endpoints. I missed out a few things in the usb.c sample file - mainly missing configurations for HS endpoints. Here's what's there after I realized what I had done wrong : T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 8 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ff(vend.) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=16b4 ProdID=0103 Rev= 2.12 S: Manufacturer=Licensed to Code, LLC S: Product=My Source/Sink Product S: SerialNumber=qbyjcna1c6qycetx7qvlr61meata7ya25dbfnxtr4h7oifoukdemu2y30nn8wda C:* #Ifs= 1 Cfg#= 3 Atr=c0 MxPwr= 2mA I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=(none) E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=125us E: Ad=83(I) Atr=03(Int.) MxPS= 8 Ivl=4ms ^ Yay! Endpoints to work with! Hopefully things will go smoothly from here onwards. :) Lisa > Hello, > > A while back I asked a bunch of newbie questions and they were answered. > Thankyou very much. Gadgetfs seems to be working, I *think*. > Since the last time I e-mailed this mailing list, I have decided to use > libusb-win32 with gadgetfs. My goal is still to get some simple > communcation (read/write) done between the host computer and the device. > > I *think* I have almost got it, but am not there yet ... or I may not be > where at all ... I really don't know. Any help directing me towards the > right direction will be greatly appreciated. > > Here is what I currently have on the hostside, using libusb-win32 > (based on libusb's developers guide @ > http://libusb.sourceforge.net/doc/functions.html) : > > --- briefly ... > > dev = device_init(); > handle = usb_open(dev); > > // set configuration > usb_set_configuration(handle,1); > > // claim interface > usb_claim_interface(handle, 0); > > // set alternate interface > usb_set_altinterface(handle, 0); > > ---- ... > > All seems successful for the above though I'm not sure why the '1' in > usb_set_configuration(handle,1) works when the bConfigurationValue is 3 > on gadgetfs. :-/ > > Next, I'd like to use libusb's usb_bulk_write() or usb_bulk_read() to > read/write to the endpoints but that hasn't been successful so far. > Which brings me to my first question : What is the address of my IN/OUT > endpoints? How do I go about finding that out? I can see the following > files in /dev/gadget : > > ep2out-bulk > ep2in-bulk > ep1in-int > amd5536udc > > ... and would love to be able to just write to ep2in-bulk or ep2out-bulk > (or whichever). > > ---- ... > > For your reference, here is the output on the device that is running the > usb.c sample code. I don't know what it's suppose to do next after the > CONFIG #3 stage. > > CONNECT high speed > SETUP 80.06 v0300 i0000 255 > ... get string 0 lang 0000 > SETUP 80.06 v0303 i0409 255 > ... get string 3 lang 0409 > SETUP 80.06 v0302 i0409 255 > ... get string 2 lang 0409 > SETUP 80.06 v0300 i0000 255 > ... get string 0 lang 0000 > SETUP 80.06 v0302 i0409 255 > ... get string 2 lang 0409 > SETUP 80.06 v0300 i0000 255 > ... get string 0 lang 0000 > > goes on for a while > > SETUP 00.09 v0003 i0000 0 > CONFIG #3 > simple_source_thread start 16386 fd 13 > simpele_sink_thread start 32771 fd 14 > > ---- ... > > All confusion aside, this has been quite interesting and I do hope to > learn more. Thankyou. > > Yours, > Lisa > Newbie. > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > linux-usb-devel@lists.sourceforge.net > To unsubscribe, use the last form field at: > https://lists.sourceforge.net/lists/listinfo/linux-usb-devel > > ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel