On Thu, 19 May 2005, coin wrote: > This is /proc/bus/usb/devices when I plug the PIC: > > T: Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=1.5 MxCh= 0 > D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 > P: Vendor=0000 ProdID=0000 Rev= 0.00 > S: Manufacturer=Vicctor Lomaa > S: Product=PicNetUSB > C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA > I: If#= 0 Alt= 0 #EPs= 2 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid > E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=10ms > E: Ad=01(O) Atr=03(Int.) MxPS= 8 Ivl=10ms > > > When I disconnect by software the PIC I got this: > > T: Bus=02 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=1.5 MxCh= 0 > D: Ver= 1.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 > P: Vendor=0000 ProdID=0000 Rev= 0.00 > S: Manufacturer=Vicctor Lomaa > S: Product=PicNetUSB > C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA > I: If#= 0 Alt= 0 #EPs= 2 Cls=03(HID ) Sub=00 Prot=00 Driver=(none) > E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=10ms > E: Ad=01(O) Atr=03(Int.) MxPS= 8 Ivl=10ms > > > The only difference is the Driver, in the first is usbhid and the > second is (none)
That's exactly what it should be. > Other stuff, when I Disconnect by software > > ctrl.ioctl_code = USBDEVFS_DISCONNECT; > ioctl(fd, USBDEVFS_IOCTL, &ctrl); > > I got succes and when I claim with > ioctl(fd, USBDEVFS_CLAIMINTERFACE, &interface); > I got succes but when I send a data with > ioctl(fd, USBDEVFS_BULK, &bulk); > I got ioctl: Invalid argument There are a few things which can cause that error. Provided bulk.ep is set to 1 and bulk.len is set to something reasonable (like 4) it shouldn't occur. In the end you may have to poke around in the kernel to find out just what the problem is. A good place to start would be the proc_bulk() routine in drivers/usb/core/devio.c. Alan Stern ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
