On Mon, 31 Jan 2005, Antonio Vinci wrote: > Fist of all, > thanks for your replies. > > Il giorno dom, 30-01-2005 alle 15:28 -0500, Alan Stern ha scritto: > > There are several things that can result in -EINVAL. Among them are: > > using a non-existent endpoint, > > In that case shouldn't it returns -2: "No such file or directory" ?
I was wrong; it actually does return -ENOENT for a non-existent endpoint. It returns -EINVAL if the endpoint isn't enabled. > This is /proc/bus/usb/devices: > > T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 4 Spd=12 MxCh= 0 > D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 > P: Vendor=04a9 ProdID=220b Rev= 0.07 > S: Manufacturer=Canon > S: Product=CanoScan > C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 48mA > I: If#= 0 Alt= 0 #EPs= 2 Cls=10(unk. ) Sub=01 Prot=00 Driver=(none) > E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms > E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms Those endpoint address values are in hex, not in decimal. So your 81 probably ought to be 0x81. Except that endpoint 0x81 is an Input endpoint and you were calling usb_bulk_write. (I don't know how libusb treats usb_bulk_write differently from usb_bulk_read.) So maybe you really meant to use endpoint 0x02. Alan Stern ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel