From: Luigi G. <lui...@gm...> - 2018-05-03 08:04:35
|
I'm reading usbmadesimple.co.uk and beyondlogic.org/usbnutshell but I do not understand a fact: Without reading the C code, but using only pyusb, how do I understand that there is a Control (IN / OUT) endpoint? With pyusb I read only "ENDPOINT 0x81: Interrupt IN". I'm doing a lot of things wrong. Thank you so much Saluti, Luigi Il Gio 3 Mag 2018, 02:50 Xiaofan Chen <xia...@gm...> ha scritto: > On Wed, May 2, 2018 at 10:50 PM, Luigi Gubello <lui...@gm...> > wrote: > > Hi, > > > > Nike has decided to close support for some products. So I have decided to > > try to extract data from my Nike+ Sportband USB, by using Python and > PyUSB. > > I always get this error: > > > > 'usb.core.USBError: [Errno 110] Operation timed out' > > > > I have written a post on Stack Overflow, where there is my python code: > > > > https://stackoverflow.com/questions/50117520/extract- > data-from-nike-sportband-with-pyusb-on-debian > > > > I found a C code that works, but I can not do the same with Python. You > can > > read the C code here: > > > > http://knz-blue.cocolog-nifty.com/memo/files/SportBandGetTrack.c > > > > I have read this topic: > > > > http://pyusb-users.narkive.com/sUHXq7uY/usb-core- > usberror-errno-110-operation-timed-out > > > > It seems to be the same problem. Can you help me? > > Thank you! > > > As mentioned in the StackOverflow answer, your pyusb code is different > from the C > code. You need to send a Control OUT (write) transfer first and then carry > out > Control IN (read) transfer first. > > For the endpoint, Control IN is 0x80. Control OUT is 0x0. > > You can read basic of USB here. > http://www.usbmadesimple.co.uk/ > > -- > Xiaofan > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > pyusb-users mailing list > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > |