You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(3) |
Nov
(4) |
Dec
|
2008 |
Jan
(1) |
Feb
(5) |
Mar
(2) |
Apr
|
May
(8) |
Jun
(4) |
Jul
|
Aug
|
Sep
(11) |
Oct
|
Nov
|
Dec
(20) |
2009 |
Jan
(16) |
Feb
(7) |
Mar
(9) |
Apr
(4) |
May
(6) |
Jun
(17) |
Jul
(3) |
Aug
(4) |
Sep
(5) |
Oct
(10) |
Nov
(16) |
Dec
|
2010 |
Jan
(22) |
Feb
(18) |
Mar
(9) |
Apr
(102) |
May
(29) |
Jun
(40) |
Jul
(80) |
Aug
(21) |
Sep
(47) |
Oct
(13) |
Nov
(19) |
Dec
(45) |
2011 |
Jan
(82) |
Feb
(20) |
Mar
(47) |
Apr
(25) |
May
(18) |
Jun
(24) |
Jul
(24) |
Aug
(47) |
Sep
(23) |
Oct
(22) |
Nov
(69) |
Dec
(20) |
2012 |
Jan
(56) |
Feb
(42) |
Mar
(43) |
Apr
(27) |
May
(18) |
Jun
(11) |
Jul
(61) |
Aug
(19) |
Sep
(13) |
Oct
(49) |
Nov
(32) |
Dec
(37) |
2013 |
Jan
(46) |
Feb
(14) |
Mar
(13) |
Apr
(20) |
May
(20) |
Jun
(3) |
Jul
(19) |
Aug
(7) |
Sep
(4) |
Oct
(33) |
Nov
(7) |
Dec
(15) |
2014 |
Jan
(5) |
Feb
(21) |
Mar
(3) |
Apr
(3) |
May
(30) |
Jun
(1) |
Jul
(30) |
Aug
(2) |
Sep
(22) |
Oct
(14) |
Nov
(22) |
Dec
(6) |
2015 |
Jan
(7) |
Feb
(4) |
Mar
(16) |
Apr
(9) |
May
(17) |
Jun
(28) |
Jul
(3) |
Aug
(18) |
Sep
(3) |
Oct
|
Nov
(6) |
Dec
(3) |
2016 |
Jan
(15) |
Feb
(18) |
Mar
(12) |
Apr
(14) |
May
(15) |
Jun
(3) |
Jul
(3) |
Aug
(42) |
Sep
(24) |
Oct
(6) |
Nov
(5) |
Dec
(6) |
2017 |
Jan
(6) |
Feb
(2) |
Mar
(12) |
Apr
|
May
(1) |
Jun
(3) |
Jul
(2) |
Aug
(6) |
Sep
|
Oct
(1) |
Nov
(5) |
Dec
(7) |
2018 |
Jan
|
Feb
(9) |
Mar
(7) |
Apr
|
May
(10) |
Jun
(20) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
(20) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(9) |
Dec
|
2020 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
(5) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
(8) |
Dec
(2) |
2021 |
Jan
(16) |
Feb
(1) |
Mar
|
Apr
(9) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
(1) |
2022 |
Jan
|
Feb
(7) |
Mar
|
Apr
(4) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(2) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Sergio A. Q. <ser...@gm...> - 2019-01-18 20:22:53
|
i saw this message: usb.core.USBError: [Errno 13] Access denied (insufficient permissions) when i was using a wrong driver in Windows 10. I could also see the whole usb device descriptor, just could not interact with it. my suggestion is to try to re install or update the libusb driver On Thu, Jan 17, 2019 at 9:01 PM charles wilson <cmf...@gm...> wrote: > Hi, > I usually manage to solve my problems by hitting my head against them > until I get a breakthrough. This time nothing. > I am new to trying PYUSB. I have the same problem with 2 installations. > 1) Ubuntu Mate 16.04 on Kernel Linux 4.15.0-43-generic x86_64running on > AMD Ryzen 5 2600X > 2) Raspbian (Jessie) on Raspberry Pi 3B+ > > Also I confirm that libusb-1.0-0 <https://pkgs.org/download/libusb-1.0-0> > is there on both. > > After installation I started the tutorial (why not?) but did not get far: > > import usb.core > import usb.util > > dev = usb.core.find(idVendor=0x1d6b, idProduct=0x0003) > print(dev) > *OK so far and I get:* > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > *================== RESTART: /home/wilson/temPY/USBtest01.py > ==================DEVICE ID 1d6b:0003 on Bus 004 Address 001 > ================= bLength : 0x12 (18 > bytes) bDescriptorType : 0x1 Device bcdUSB : > 0x300 USB 3.0 bDeviceClass : 0x9 Hub bDeviceSubClass > : 0x0 bDeviceProtocol : 0x3 bMaxPacketSize0 : 0x9 (9 > bytes) idVendor : 0x1d6b idProduct : > 0x0003 bcdDevice : 0x415 Device 4.15 iManufacturer > : 0x3 Error Accessing String iProduct : 0x2 Error > Accessing String iSerialNumber : 0x1 Error Accessing > String bNumConfigurations : 0x1 CONFIGURATION 1: 0 mA > ==================================== bLength : 0x9 (9 > bytes) bDescriptorType : 0x2 Configuration wTotalLength > : 0x1f (31 bytes) bNumInterfaces : 0x1 bConfigurationValue > : 0x1 iConfiguration : 0x0 bmAttributes : 0xe0 > Self Powered, Remote Wakeup bMaxPower : 0x0 (0 mA) > INTERFACE 0: Hub ======================================= > bLength : 0x9 (9 bytes) bDescriptorType : 0x4 > Interface bInterfaceNumber : 0x0 bAlternateSetting : > 0x0 bNumEndpoints : 0x1 bInterfaceClass : 0x9 Hub > bInterfaceSubClass : 0x0 bInterfaceProtocol : 0x0 > iInterface : 0x0 ENDPOINT 0x81: Interrupt IN > ========================== bLength : 0x7 (7 bytes) > bDescriptorType : 0x5 Endpoint bEndpointAddress : 0x81 IN > bmAttributes : 0x3 Interrupt wMaxPacketSize : 0x4 (4 > bytes) bInterval : 0xc* > > which tells me that pyusb is installed and is finding USB.core and seems > to be working. > When I take the next step in the tutorial: > dev.set_configuration() > > it all turns to custard and I get: > > raceback (most recent call last): > File "/home/wilson/temPY/USBtest01.py", line 11, in <module> > dev.set_configuration() > File "/usr/lib/python3/dist-packages/usb/core.py", line 799, in > set_configuration > self._ctx.managed_set_configuration(self, configuration) > File "/usr/lib/python3/dist-packages/usb/core.py", line 127, in > managed_set_configuration > self.managed_open() > File "/usr/lib/python3/dist-packages/usb/core.py", line 105, in > managed_open > self.handle = self.backend.open_device(self.dev) > File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 722, > in open_device > return _DeviceHandle(dev) > File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 600, > in __init__ > _check(_lib.libusb_open(self.devid, byref(self.handle))) > File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 552, > in _check > raise USBError(_strerror(ret), ret, _libusb_errno[ret]) > usb.core.USBError: [Errno 13] Access denied (insufficient permissions) > > This on the AMD system, the diagnostic on the Raspi is similar but not > identical. > > I have worked through the other similar postings on the mailing list - > while similar their problems were at a more complex level --- I am at step > 1 with the tutorial ... > I have also worked through the occurrences of set_configuration() in the > ...usb/core.py module and could see no reason for dev.set_configuration() > to bomb-out. > > I have racked my brains and consulted my local gurus with no joy .... so > any help would be appreciated - I have a feeling it is something dumb that > I have missed. > > Cheers > Charles > > > > _______________________________________________ > pyusb-users mailing list > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > -- SQ |
From: Martin R. <spl...@gm...> - 2019-01-18 07:51:39
|
>usb.core.USBError: [Errno 13] Access denied (insufficient permissions) Run your script with sudo? Or add a udev rule so your regular user also has access. On Fri, Jan 18, 2019 at 5:01 AM charles wilson <cmf...@gm...> wrote: > > Hi, > I usually manage to solve my problems by hitting my head against them until I get a breakthrough. This time nothing. > I am new to trying PYUSB. I have the same problem with 2 installations. > 1) Ubuntu Mate 16.04 on Kernel Linux 4.15.0-43-generic x86_64running on AMD Ryzen 5 2600X > 2) Raspbian (Jessie) on Raspberry Pi 3B+ > > Also I confirm that libusb-1.0-0 is there on both. > > After installation I started the tutorial (why not?) but did not get far: > > import usb.core > import usb.util > > dev = usb.core.find(idVendor=0x1d6b, idProduct=0x0003) > print(dev) > OK so far and I get: > > ================== RESTART: /home/wilson/temPY/USBtest01.py ================== > DEVICE ID 1d6b:0003 on Bus 004 Address 001 ================= > bLength : 0x12 (18 bytes) > bDescriptorType : 0x1 Device > bcdUSB : 0x300 USB 3.0 > bDeviceClass : 0x9 Hub > bDeviceSubClass : 0x0 > bDeviceProtocol : 0x3 > bMaxPacketSize0 : 0x9 (9 bytes) > idVendor : 0x1d6b > idProduct : 0x0003 > bcdDevice : 0x415 Device 4.15 > iManufacturer : 0x3 Error Accessing String > iProduct : 0x2 Error Accessing String > iSerialNumber : 0x1 Error Accessing String > bNumConfigurations : 0x1 > CONFIGURATION 1: 0 mA ==================================== > bLength : 0x9 (9 bytes) > bDescriptorType : 0x2 Configuration > wTotalLength : 0x1f (31 bytes) > bNumInterfaces : 0x1 > bConfigurationValue : 0x1 > iConfiguration : 0x0 > bmAttributes : 0xe0 Self Powered, Remote Wakeup > bMaxPower : 0x0 (0 mA) > INTERFACE 0: Hub ======================================= > bLength : 0x9 (9 bytes) > bDescriptorType : 0x4 Interface > bInterfaceNumber : 0x0 > bAlternateSetting : 0x0 > bNumEndpoints : 0x1 > bInterfaceClass : 0x9 Hub > bInterfaceSubClass : 0x0 > bInterfaceProtocol : 0x0 > iInterface : 0x0 > ENDPOINT 0x81: Interrupt IN ========================== > bLength : 0x7 (7 bytes) > bDescriptorType : 0x5 Endpoint > bEndpointAddress : 0x81 IN > bmAttributes : 0x3 Interrupt > wMaxPacketSize : 0x4 (4 bytes) > bInterval : 0xc > > which tells me that pyusb is installed and is finding USB.core and seems to be working. > When I take the next step in the tutorial: > dev.set_configuration() > > it all turns to custard and I get: > > raceback (most recent call last): > File "/home/wilson/temPY/USBtest01.py", line 11, in <module> > dev.set_configuration() > File "/usr/lib/python3/dist-packages/usb/core.py", line 799, in set_configuration > self._ctx.managed_set_configuration(self, configuration) > File "/usr/lib/python3/dist-packages/usb/core.py", line 127, in managed_set_configuration > self.managed_open() > File "/usr/lib/python3/dist-packages/usb/core.py", line 105, in managed_open > self.handle = self.backend.open_device(self.dev) > File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 722, in open_device > return _DeviceHandle(dev) > File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 600, in __init__ > _check(_lib.libusb_open(self.devid, byref(self.handle))) > File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 552, in _check > raise USBError(_strerror(ret), ret, _libusb_errno[ret]) > usb.core.USBError: [Errno 13] Access denied (insufficient permissions) > > This on the AMD system, the diagnostic on the Raspi is similar but not identical. > > I have worked through the other similar postings on the mailing list - while similar their problems were at a more complex level --- I am at step 1 with the tutorial ... > I have also worked through the occurrences of set_configuration() in the ...usb/core.py module and could see no reason for dev.set_configuration() to bomb-out. > > I have racked my brains and consulted my local gurus with no joy .... so any help would be appreciated - I have a feeling it is something dumb that I have missed. > > Cheers > Charles > > > > _______________________________________________ > pyusb-users mailing list > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users |
From: charles w. <cmf...@gm...> - 2019-01-18 04:01:37
|
Hi, I usually manage to solve my problems by hitting my head against them until I get a breakthrough. This time nothing. I am new to trying PYUSB. I have the same problem with 2 installations. 1) Ubuntu Mate 16.04 on Kernel Linux 4.15.0-43-generic x86_64running on AMD Ryzen 5 2600X 2) Raspbian (Jessie) on Raspberry Pi 3B+ Also I confirm that libusb-1.0-0 <https://pkgs.org/download/libusb-1.0-0> is there on both. After installation I started the tutorial (why not?) but did not get far: import usb.core import usb.util dev = usb.core.find(idVendor=0x1d6b, idProduct=0x0003) print(dev) *OK so far and I get:* *================== RESTART: /home/wilson/temPY/USBtest01.py ==================DEVICE ID 1d6b:0003 on Bus 004 Address 001 ================= bLength : 0x12 (18 bytes) bDescriptorType : 0x1 Device bcdUSB : 0x300 USB 3.0 bDeviceClass : 0x9 Hub bDeviceSubClass : 0x0 bDeviceProtocol : 0x3 bMaxPacketSize0 : 0x9 (9 bytes) idVendor : 0x1d6b idProduct : 0x0003 bcdDevice : 0x415 Device 4.15 iManufacturer : 0x3 Error Accessing String iProduct : 0x2 Error Accessing String iSerialNumber : 0x1 Error Accessing String bNumConfigurations : 0x1 CONFIGURATION 1: 0 mA ==================================== bLength : 0x9 (9 bytes) bDescriptorType : 0x2 Configuration wTotalLength : 0x1f (31 bytes) bNumInterfaces : 0x1 bConfigurationValue : 0x1 iConfiguration : 0x0 bmAttributes : 0xe0 Self Powered, Remote Wakeup bMaxPower : 0x0 (0 mA) INTERFACE 0: Hub ======================================= bLength : 0x9 (9 bytes) bDescriptorType : 0x4 Interface bInterfaceNumber : 0x0 bAlternateSetting : 0x0 bNumEndpoints : 0x1 bInterfaceClass : 0x9 Hub bInterfaceSubClass : 0x0 bInterfaceProtocol : 0x0 iInterface : 0x0 ENDPOINT 0x81: Interrupt IN ========================== bLength : 0x7 (7 bytes) bDescriptorType : 0x5 Endpoint bEndpointAddress : 0x81 IN bmAttributes : 0x3 Interrupt wMaxPacketSize : 0x4 (4 bytes) bInterval : 0xc* which tells me that pyusb is installed and is finding USB.core and seems to be working. When I take the next step in the tutorial: dev.set_configuration() it all turns to custard and I get: raceback (most recent call last): File "/home/wilson/temPY/USBtest01.py", line 11, in <module> dev.set_configuration() File "/usr/lib/python3/dist-packages/usb/core.py", line 799, in set_configuration self._ctx.managed_set_configuration(self, configuration) File "/usr/lib/python3/dist-packages/usb/core.py", line 127, in managed_set_configuration self.managed_open() File "/usr/lib/python3/dist-packages/usb/core.py", line 105, in managed_open self.handle = self.backend.open_device(self.dev) File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 722, in open_device return _DeviceHandle(dev) File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 600, in __init__ _check(_lib.libusb_open(self.devid, byref(self.handle))) File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 552, in _check raise USBError(_strerror(ret), ret, _libusb_errno[ret]) usb.core.USBError: [Errno 13] Access denied (insufficient permissions) This on the AMD system, the diagnostic on the Raspi is similar but not identical. I have worked through the other similar postings on the mailing list - while similar their problems were at a more complex level --- I am at step 1 with the tutorial ... I have also worked through the occurrences of set_configuration() in the ...usb/core.py module and could see no reason for dev.set_configuration() to bomb-out. I have racked my brains and consulted my local gurus with no joy .... so any help would be appreciated - I have a feeling it is something dumb that I have missed. Cheers Charles |
From: Sergio A. Q. <ser...@gm...> - 2019-01-09 23:14:13
|
thank you Tormod, the usb sniffer actually provided me with enough information of what i needed. i was trying to configure the device through the usb port, but what i'm getting from the IN endpoint is quite enough. On Tue, Jan 8, 2019 at 1:32 PM Tormod Volden <lis...@gm...> wrote: > On Tue, Jan 8, 2019 at 8:26 PM Sergio A. Quiroga wrote: > > > > my device is a thermometer, it came with a software, and i can take > readings with the application included. however i'm trying to include it to > a python scripted environment, and need to take readings directly from the > thermometer. > > > > anyway, i can find the device, set the configuration, and identify the > endpoints of it. but when i try to send the 'test' message (or any message, > whatsoever), i keep getting 'Input/output error' from the libusb1.py script. > > Hi Sergio, > > Often an OUT endpoint used for requests is not a text stream where you > will send text commands, but is rather expecting some structured > command packet. And maybe you just need to read the IN endpoint to > start with. Anyway, if the USB protocol is not documented, you can use > a USB sniffer to see what the delivered (presumably closed source) > software is doing. > > Regards, > Tormod > > > _______________________________________________ > pyusb-users mailing list > pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > -- SQ |
From: LUCAS C. B. <luc...@ed...> - 2019-01-08 22:52:19
|
I will tell you the only thing that work for me, using wireshark. From knowing the right commands you can start working properly. Sorry for my english. Em 8 de jan de 2019 17:26, "Sergio A. Quiroga" <ser...@gm...> escreveu: Hi all, it's my first attempt with pyusb, and following the tutorial could not go really further than "Let's get this started" section. my device is a thermometer, it came with a software, and i can take readings with the application included. however i'm trying to include it to a python scripted environment, and need to take readings directly from the thermometer. anyway, i can find the device, set the configuration, and identify the endpoints of it. but when i try to send the 'test' message (or any message, whatsoever), i keep getting 'Input/output error' from the libusb1.py script. i set my PYUSB_DEBUG variable to 'debug', and this is my log: >>> assert ep is not None >>> >>> ep.write('test') 2019-01-08 11:32:30,414 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x0000016B5EF9C630>, 0) 2019-01-08 11:32:30,415 DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x0000016B5EF9C630>, 0, 0, 0) 2019-01-08 11:32:30,416 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x0000016B5EF9C630>, 0) 2019-01-08 11:32:30,418 DEBUG:usb.backend.libusb1:_LibUSB.get_endpoint_descriptor(<usb.backend.libusb1._Device object at 0x0000016B5EF9C630>, 0, 0, 0, 0) 2019-01-08 11:32:30,419 DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x0000016B5EF9C630>, 0, 0, 0) 2019-01-08 11:32:30,420 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x0000016B5EF9C630>, 0) 2019-01-08 11:32:30,421 DEBUG:usb.backend.libusb1:_LibUSB.get_endpoint_descriptor(<usb.backend.libusb1._Device object at 0x0000016B5EF9C630>, 1, 0, 0, 0) 2019-01-08 11:32:30,421 DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device object at 0x0000016B5EF9C630>, 0, 0, 0) 2019-01-08 11:32:30,422 DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device object at 0x0000016B5EF9C630>, 0) 2019-01-08 11:32:30,422 DEBUG:usb.backend.libusb1:_LibUSB.claim_interface(<usb.backend.libusb1._DeviceHandle object at 0x0000016B5EF9C898>, 0) 2019-01-08 11:32:30,423 DEBUG:usb.backend.libusb1:_LibUSB.intr_write(<usb.backend.libusb1._DeviceHandle object at 0x0000016B5EF9C898>, 2, 0, array('B', [116, 101, 115, 116]), 1000) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\squiroga\AppData\Local\Programs\Python\Python36\lib\site-packages\usb\core.py", line 387, in write return self.device.write(self, data, timeout) File "C:\Users\squiroga\AppData\Local\Programs\Python\Python36\lib\site-packages\usb\core.py", line 948, in write self.__get_timeout(timeout) File "C:\Users\squiroga\AppData\Local\Programs\Python\Python36\lib\site-packages\usb\_debug.py", line 60, in do_trace return f(*args, **named_args) File "C:\Users\squiroga\AppData\Local\Programs\Python\Python36\lib\site-packages\usb\backend\libusb1.py", line 842, in intr_write timeout) File "C:\Users\squiroga\AppData\Local\Programs\Python\Python36\lib\site-packages\usb\backend\libusb1.py", line 920, in __write _check(retval) File "C:\Users\squiroga\AppData\Local\Programs\Python\Python36\lib\site-packages\usb\backend\libusb1.py", line 595, in _check raise USBError(_strerror(ret), ret, _libusb_errno[ret]) usb.core.USBError: [Errno 5] Input/Output Error >>> does someone have an idea of what i might be doing wrong? -- SQ |
From: Tormod V. <lis...@gm...> - 2019-01-08 20:32:20
|
On Tue, Jan 8, 2019 at 8:26 PM Sergio A. Quiroga wrote: > > my device is a thermometer, it came with a software, and i can take readings with the application included. however i'm trying to include it to a python scripted environment, and need to take readings directly from the thermometer. > > anyway, i can find the device, set the configuration, and identify the endpoints of it. but when i try to send the 'test' message (or any message, whatsoever), i keep getting 'Input/output error' from the libusb1.py script. Hi Sergio, Often an OUT endpoint used for requests is not a text stream where you will send text commands, but is rather expecting some structured command packet. And maybe you just need to read the IN endpoint to start with. Anyway, if the USB protocol is not documented, you can use a USB sniffer to see what the delivered (presumably closed source) software is doing. Regards, Tormod |
From: Sergio A. Q. <ser...@gm...> - 2019-01-08 19:26:14
|
Hi all, it's my first attempt with pyusb, and following the tutorial could not go really further than "Let's get this started" section. my device is a thermometer, it came with a software, and i can take readings with the application included. however i'm trying to include it to a python scripted environment, and need to take readings directly from the thermometer. anyway, i can find the device, set the configuration, and identify the endpoints of it. but when i try to send the 'test' message (or any message, whatsoever), i keep getting 'Input/output error' from the libusb1.py script. i set my PYUSB_DEBUG variable to 'debug', and this is my log: >>> assert ep is not None > >>> > >>> ep.write('test') > 2019-01-08 11:32:30,414 > DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device > object at 0x0000016B5EF9C630>, 0) > 2019-01-08 11:32:30,415 > DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device > object at 0x0000016B5EF9C630>, 0, 0, 0) > 2019-01-08 11:32:30,416 > DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device > object at 0x0000016B5EF9C630>, 0) > 2019-01-08 11:32:30,418 > DEBUG:usb.backend.libusb1:_LibUSB.get_endpoint_descriptor(<usb.backend.libusb1._Device > object at 0x0000016B5EF9C630>, 0, 0, 0, 0) > 2019-01-08 11:32:30,419 > DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device > object at 0x0000016B5EF9C630>, 0, 0, 0) > 2019-01-08 11:32:30,420 > DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device > object at 0x0000016B5EF9C630>, 0) > 2019-01-08 11:32:30,421 > DEBUG:usb.backend.libusb1:_LibUSB.get_endpoint_descriptor(<usb.backend.libusb1._Device > object at 0x0000016B5EF9C630>, 1, 0, 0, 0) > 2019-01-08 11:32:30,421 > DEBUG:usb.backend.libusb1:_LibUSB.get_interface_descriptor(<usb.backend.libusb1._Device > object at 0x0000016B5EF9C630>, 0, 0, 0) > 2019-01-08 11:32:30,422 > DEBUG:usb.backend.libusb1:_LibUSB.get_configuration_descriptor(<usb.backend.libusb1._Device > object at 0x0000016B5EF9C630>, 0) > 2019-01-08 11:32:30,422 > DEBUG:usb.backend.libusb1:_LibUSB.claim_interface(<usb.backend.libusb1._DeviceHandle > object at 0x0000016B5EF9C898>, 0) > 2019-01-08 11:32:30,423 > DEBUG:usb.backend.libusb1:_LibUSB.intr_write(<usb.backend.libusb1._DeviceHandle > object at 0x0000016B5EF9C898>, 2, 0, array('B', [116, 101, 115, 116]), 1000) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File > "C:\Users\squiroga\AppData\Local\Programs\Python\Python36\lib\site-packages\usb\core.py", > line 387, in write > return self.device.write(self, data, timeout) > File > "C:\Users\squiroga\AppData\Local\Programs\Python\Python36\lib\site-packages\usb\core.py", > line 948, in write > self.__get_timeout(timeout) > File > "C:\Users\squiroga\AppData\Local\Programs\Python\Python36\lib\site-packages\usb\_debug.py", > line 60, in do_trace > return f(*args, **named_args) > File > "C:\Users\squiroga\AppData\Local\Programs\Python\Python36\lib\site-packages\usb\backend\libusb1.py", > line 842, in intr_write > timeout) > File > "C:\Users\squiroga\AppData\Local\Programs\Python\Python36\lib\site-packages\usb\backend\libusb1.py", > line 920, in __write > _check(retval) > File > "C:\Users\squiroga\AppData\Local\Programs\Python\Python36\lib\site-packages\usb\backend\libusb1.py", > line 595, in _check > raise USBError(_strerror(ret), ret, _libusb_errno[ret]) > usb.core.USBError: [Errno 5] Input/Output Error > >>> does someone have an idea of what i might be doing wrong? -- SQ |
From: Xiaofan C. <xia...@gm...> - 2018-07-01 04:43:06
|
On Sun, Jul 1, 2018 at 10:37 AM, Xiaofan Chen <xia...@gm...> wrote: > On Sun, Jul 1, 2018 at 6:41 AM, Michelle Ran <mic...@gm...> wrote: >> Sorry, I'm only a high school student so I'm struggling to understand what >> you mean. What's the significance of the hex file - is that what contains >> the code? What IDE/language should I use to program the board? Also, what do >> you mean by host program and build environment? >> Again, sorry if my questions are basic. This is my first time working with >> hardware. > > I see, no problem. > > https://en.wikipedia.org/wiki/Microcontroller > > hex file -- binary code for the microcontroller > IDE -- MPLAB X > Compiler -- MPLAB XC8 > Host -- PC (eg: Windows PC or Mac or Linux) > Build environment: eg: Windows, MPLAB X + XC8; etc That is the build environment on the MCU side. MPLAB X supports Mac as well. On the build environment for Mac, Homebrew is highly recommended. https://brew.sh/ You can use Homebrew to install the necessary development tools to use pyusb -- eg, libusb, Python; then you can use pip to install pyusb. > Programmer -- tools to download the binary to the microcontroller chip PICkit 3 should be good enough. > Host program for the programmer -- MPLAB X will do > > If you just start with HW, USB may not be a good place to start and the > USB demo board I mentioned before may not be a good start for you. > > Rather you may want to start with some simpler hobbist oriented > board like Arduino where they hide the details of Microcontrollers. > Or Raspberry Pi boards where you can program using Python. > > https://www.arduino.cc/ > https://www.raspberrypi.org/ On the other hand, there is nothing wrong to start with a generic MCU too, Microchip 8-bit PIC is a good start point, along with Microchip/Atmel AVR, TI MSP430, etc. I think the 32bit ARM is less beginner friendly but they are popular too. USB is pretty complicated. You can learn the basic here. http://www.usbmadesimple.co.uk/ You may want to start with serial communication and not USB first, there are many USB to Serial converters out there, like those using chips from FTDI. -- Xiaofan |
From: Xiaofan C. <xia...@gm...> - 2018-07-01 02:37:24
|
On Sun, Jul 1, 2018 at 6:41 AM, Michelle Ran <mic...@gm...> wrote: > Sorry, I'm only a high school student so I'm struggling to understand what > you mean. What's the significance of the hex file - is that what contains > the code? What IDE/language should I use to program the board? Also, what do > you mean by host program and build environment? > Again, sorry if my questions are basic. This is my first time working with > hardware. I see, no problem. https://en.wikipedia.org/wiki/Microcontroller hex file -- binary code for the microcontroller IDE -- MPLAB X Compiler -- MPLAB XC8 Host -- PC (eg: Windows PC or Mac or Linux) Build environment: eg: Windows, MPLAB X + XC8; etc Programmer -- tools to download the binary to the microcontroller chip Host program for the programmer -- MPLAB X will do If you just start with HW, USB may not be a good place to start and the USB demo board I mentioned before may not be a good start for you. Rather you may want to start with some simpler hobbist oriented board like Arduino where they hide the details of Microcontrollers. Or Raspberry Pi boards where you can program using Python. https://www.arduino.cc/ https://www.raspberrypi.org/ -- Xiaofan |
From: Michelle R. <mic...@gm...> - 2018-06-30 22:41:30
|
Sorry, I'm only a high school student so I'm struggling to understand what you mean. What's the significance of the hex file - is that what contains the code? What IDE/language should I use to program the board? Also, what do you mean by host program and build environment? Again, sorry if my questions are basic. This is my first time working with hardware. On Mon, Jun 25, 2018 at 10:03 PM Xiaofan Chen <xia...@gm...> wrote: > On Mon, Jun 25, 2018 at 11:39 PM, Michelle Ran <mic...@gm...> > wrote: > > > > Okay, was able to download MLA & set up the development environment, but > I don't seem > > able to open the project you mentioned using MPLAB X? Here's a video: > > I guess you can figure this out by yourself... > > MPLAB X is for the PIC firmware. The project is here. > > microchip\mla\v2017_03_06\apps\usb\device\vendor_basic\firmware\pic18f87j50_pim.x > > Once you get the hex file, you need to program the chip using a > programmer, like > PICKit 3 or things like that. > > To build the following host program, you have to use a build > environment for the host. > > microchip\mla\v2017_03_06\apps\usb\device\vendor_basic\utilities\libusb_cross_platform_example > > "If using this project to build a Linux or Mac OS X executable, make sure > that the libusb v1.0.19 driver is available and installed correctly." > > I used to have the Mac Mini and I use Homebrew to build host programs. > > -- > 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 > |
From: Somsubhra T. <s_t...@re...> - 2018-06-29 12:17:58
|
I am very new to PyUSB and any help from PyUSB experts will be highly appreciated. My intention is to communicate with the CY7C67300 usb controller on XUPv5-lx110T (Xilinx) board. I have installed pyusb and libusb in win7-32bit machine using "pip install " command. I am using python2.7. I was following the tutorial written in "https://github.com/pyusb/pyusb/blob/master/docs/tutorial.rst". When I applied the following few lines in IDLE Python GUI, --------------------------------------------------------------- import usb.core import usb.util # find our device # dev = usb.core.find(idVendor=0xfffe, idProduct=0x0001) dev = usb.core.find(find_all=True, bDeviceClass=7) print dev ---------------------------------------------------------------- I have got the following response : ======================= RESTART: E:\My_Python\test1.py ======================= I typed in the following in python prompt and got this response below: >>>dev.set_configuration() Traceback (most recent call last): File "", line 1, in dev.set_configuration() AttributeError: 'generator' object has no attribute 'set_configuration' This I confirmed using >>>print dir(dev) ['__class__', '__delattr__', '__doc__', '__format__', '__getattribute__', '__hash__', '__init__', '__iter__', '__name__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'close', 'gi_code', 'gi_frame', 'gi_running', 'next', 'send', 'throw'] Again I typed in the following and got a response: >>> usb.core.show_devices(verbose=True, find_all=True) Traceback (most recent call last): File "", line 1, in usb.core.show_devices(verbose=True, find_all=True) File "C:\Python27\lib\site-packages\usb\core.py", line 1287, in show_devices strings += "%s\n\n" % str(device) File "C:\Python27\lib\site-packages\usb\core.py", line 731, in __str__ configuration = self.get_active_configuration() File "C:\Python27\lib\site-packages\usb\core.py", line 875, in get_active_configuration return self._ctx.get_active_configuration(self) File "C:\Python27\lib\site-packages\usb\core.py", line 102, in wrapper return f(self, *args, **kwargs) File "C:\Python27\lib\site-packages\usb\core.py", line 236, in get_active_configuration self.managed_open() File "C:\Python27\lib\site-packages\usb\core.py", line 102, in wrapper return f(self, *args, **kwargs) File "C:\Python27\lib\site-packages\usb\core.py", line 120, in managed_open self.handle = self.backend.open_device(self.dev) File "C:\Python27\lib\site-packages\usb\backend\libusb1.py", line 786, in open_device return _DeviceHandle(dev) File "C:\Python27\lib\site-packages\usb\backend\libusb1.py", line 643, in __init__ _check(_lib.libusb_open(self.devid, byref(self.handle))) File "C:\Python27\lib\site-packages\usb\backend\libusb1.py", line 593, in _check raise NotImplementedError(_strerror(ret)) NotImplementedError: Operation not supported or unimplemented on this platform >>> I have googled "NotImplementedError:.....", but did not understand much from the serach- results. I have checked the IBackend class in usb/backend/__init__.py file. All the usb host transaction functions in IBackend are implemented as _not_implemented(self.enumerate_devices) What am I missing out? Rgds, ST |
From: Xiaofan C. <xia...@gm...> - 2018-06-26 02:03:41
|
On Mon, Jun 25, 2018 at 11:39 PM, Michelle Ran <mic...@gm...> wrote: > > Okay, was able to download MLA & set up the development environment, but I don't seem > able to open the project you mentioned using MPLAB X? Here's a video: I guess you can figure this out by yourself... MPLAB X is for the PIC firmware. The project is here. microchip\mla\v2017_03_06\apps\usb\device\vendor_basic\firmware\pic18f87j50_pim.x Once you get the hex file, you need to program the chip using a programmer, like PICKit 3 or things like that. To build the following host program, you have to use a build environment for the host. microchip\mla\v2017_03_06\apps\usb\device\vendor_basic\utilities\libusb_cross_platform_example "If using this project to build a Linux or Mac OS X executable, make sure that the libusb v1.0.19 driver is available and installed correctly." I used to have the Mac Mini and I use Homebrew to build host programs. -- Xiaofan |
From: Michelle R. <mic...@gm...> - 2018-06-25 15:39:45
|
Okay, was able to download MLA & set up the development environment, but I don't seem able to open the project you mentioned using MPLAB X? Here's a video: [image: Quicktime Video file] mplabx_problem.mov <https://drive.google.com/file/d/18laY9Q7Es0V51MsfNfiG-1g9NBRfTT4j/view?usp=drivesdk> On Sun, Jun 24, 2018 at 11:09 PM Xiaofan Chen <xia...@gm...> wrote: > On Sun, Jun 24, 2018 at 9:39 PM, Michelle Ran <mic...@gm...> > wrote: > > Hm, my file paths seem to be different from yours. I can't seem to find > any > > of those folders. It might be that I'm looking at a 2010 version of the > > libraries? How can I update? > > > > Download the latest MLA from Microchip. > http://www.microchip.com/mplab/microchip-libraries-for-applications > > You need to get the latest MPLAB X and XC8 compiler as well. > > If you are not familiar with the new MPLAB X, and prefer to > use the old MLA/MPLAB, then you can still use MLA Legacy, > the examples are still similar. > > http://www.microchip.com/mplab/microchip-libraries-for-applications/mla-legacy > The last legacy version is v2013-06-15. Then the demo is at the following. > It has the libusb cross platform example as well. > > C:\microchip_solutions_v2013-06-15\USB\Device - WinUSB - Generic Driver > Demo > > -- > 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 > |
From: Xiaofan C. <xia...@gm...> - 2018-06-25 03:09:23
|
On Sun, Jun 24, 2018 at 9:39 PM, Michelle Ran <mic...@gm...> wrote: > Hm, my file paths seem to be different from yours. I can't seem to find any > of those folders. It might be that I'm looking at a 2010 version of the > libraries? How can I update? > Download the latest MLA from Microchip. http://www.microchip.com/mplab/microchip-libraries-for-applications You need to get the latest MPLAB X and XC8 compiler as well. If you are not familiar with the new MPLAB X, and prefer to use the old MLA/MPLAB, then you can still use MLA Legacy, the examples are still similar. http://www.microchip.com/mplab/microchip-libraries-for-applications/mla-legacy The last legacy version is v2013-06-15. Then the demo is at the following. It has the libusb cross platform example as well. C:\microchip_solutions_v2013-06-15\USB\Device - WinUSB - Generic Driver Demo -- Xiaofan |
From: Michelle R. <mic...@gm...> - 2018-06-24 13:39:34
|
Hm, my file paths seem to be different from yours. I can't seem to find any of those folders. It might be that I'm looking at a 2010 version of the libraries? How can I update? On Fri, Jun 22, 2018 at 10:39 PM Xiaofan Chen <xia...@gm...> wrote: > On Sat, Jun 23, 2018 at 7:04 AM, Michelle Ran <mic...@gm...> > wrote: > > Also - I've been poking around the demo projects and have tried to open > > some, but Visual Studio doesn't seem to recognize them as projects > (running > > on a Mac). In that case, what's the best way to edit and run them? > > My Mac Mini 2011 died a few month ago so I have no access to a Mac > now (I was mainly using Mac Mini at home for the past 6 years).. Anyway, > I think those demo projects using Visual Studio are for Windows only and > not for Mac even though now there is a Visual Studio version for Mac. > > If you use the Vendor Basic example, there is a cross platform project > for it. It uses QT for GUI. You can modify it to use plain C. > > microchip\mla\v2017_03_06\apps\usb\device\vendor_basic\utilities\libusb_cross_platform_example > > > > -- > 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 > |
From: Xiaofan C. <xia...@gm...> - 2018-06-23 02:39:21
|
On Sat, Jun 23, 2018 at 7:04 AM, Michelle Ran <mic...@gm...> wrote: > Also - I've been poking around the demo projects and have tried to open > some, but Visual Studio doesn't seem to recognize them as projects (running > on a Mac). In that case, what's the best way to edit and run them? My Mac Mini 2011 died a few month ago so I have no access to a Mac now (I was mainly using Mac Mini at home for the past 6 years).. Anyway, I think those demo projects using Visual Studio are for Windows only and not for Mac even though now there is a Visual Studio version for Mac. If you use the Vendor Basic example, there is a cross platform project for it. It uses QT for GUI. You can modify it to use plain C. microchip\mla\v2017_03_06\apps\usb\device\vendor_basic\utilities\libusb_cross_platform_example -- Xiaofan |
From: Xiaofan C. <xia...@gm...> - 2018-06-23 02:31:58
|
On Sat, Jun 23, 2018 at 7:00 AM, Michelle Ran <mic...@gm...> wrote: > I recently purchased a USB PIC18F87J50 PIM - which demo project would you > recommend for a beginner mainly interested in data transfer? You can start with the vendor_basic example. microchip\mla\v2017_03_06\apps\usb\device\vendor_basic Something like the following should work with the demo. #!/usr/bin/env python import usb.core import usb.util #find our device dev = usb.core.find(idVendor=0x04D8, idProduct=0x0053) #dev = usb.core.find(idVendor=0x04D8, idProduct=0x0033) #was it found? if dev is None: raise ValueError('Device not found') #set the active configuration. with no args we use first config. dev.set_configuration() #turn light on print ("Toggle LED by sending Toggle_LED command 0x80") dev.write(1, [0x080], 1000) print ("Sending read switch command") dev.write(1,[0x081],1000) s=dev.read(0x81,64,1000) print ("Echo read switch command 0x81") print (s[0]) print ("Read switch status, 1 means not pressed, 0 means pressed") print (s[1]) -- Xiaofan |
From: Michelle R. <mic...@gm...> - 2018-06-22 23:04:44
|
Also - I've been poking around the demo projects and have tried to open some, but Visual Studio doesn't seem to recognize them as projects (running on a Mac). In that case, what's the best way to edit and run them? On Fri, Jun 22, 2018 at 7:00 PM Michelle Ran <mic...@gm...> wrote: > I recently purchased a USB PIC18F87J50 PIM - which demo project would you > recommend for a beginner mainly interested in data transfer? > > On Tue, Jun 19, 2018 at 9:13 AM Xiaofan Chen <xia...@gm...> wrote: > >> On Tue, Jun 19, 2018 at 8:40 PM, Michelle Ran <mic...@gm...> >> wrote: >> > Hi all, >> > >> > I've recently been experimenting with pyusb to try and learn how to >> transfer >> > data over USB, mainly using various USB devices I have lying around >> (flash >> > drive, mouse, Ethernet, etc.) However, I've been struggling to make >> progress >> > because I'm unfamiliar with USB and how these devices work - I often get >> > errors like access denied (even when running with sudo), invalid >> endpoint >> > address, etc. >> > >> > That brings me to my question - what would be the simplest device to >> > experiment with, that at least supports writing from the host? >> >> It is better to use a USB MCU device which you have access to the >> firmware source code and can change the firmware. Many USB MCU boards >> will fit the bill, from ST, Microchip/AVR, NXP/Freescale, etc. >> >> Depending on which MCU you are familiar with, then you can choose >> from them. For example, I am mainly using an old USB PIC18F87J50 PIM >> since I can build the FW since Microchip provides the USB stack which >> provide quite some examples. I also have a few STM32 discovery kit which >> I use less since I am less familiar with the FW side. >> >> >> >> -- >> 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 >> > |
From: Michelle R. <mic...@gm...> - 2018-06-22 23:01:06
|
I recently purchased a USB PIC18F87J50 PIM - which demo project would you recommend for a beginner mainly interested in data transfer? On Tue, Jun 19, 2018 at 9:13 AM Xiaofan Chen <xia...@gm...> wrote: > On Tue, Jun 19, 2018 at 8:40 PM, Michelle Ran <mic...@gm...> > wrote: > > Hi all, > > > > I've recently been experimenting with pyusb to try and learn how to > transfer > > data over USB, mainly using various USB devices I have lying around > (flash > > drive, mouse, Ethernet, etc.) However, I've been struggling to make > progress > > because I'm unfamiliar with USB and how these devices work - I often get > > errors like access denied (even when running with sudo), invalid endpoint > > address, etc. > > > > That brings me to my question - what would be the simplest device to > > experiment with, that at least supports writing from the host? > > It is better to use a USB MCU device which you have access to the > firmware source code and can change the firmware. Many USB MCU boards > will fit the bill, from ST, Microchip/AVR, NXP/Freescale, etc. > > Depending on which MCU you are familiar with, then you can choose > from them. For example, I am mainly using an old USB PIC18F87J50 PIM > since I can build the FW since Microchip provides the USB stack which > provide quite some examples. I also have a few STM32 discovery kit which > I use less since I am less familiar with the FW side. > > > > -- > 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 > |
From: Xiaofan C. <xia...@gm...> - 2018-06-19 13:13:20
|
On Tue, Jun 19, 2018 at 8:40 PM, Michelle Ran <mic...@gm...> wrote: > Hi all, > > I've recently been experimenting with pyusb to try and learn how to transfer > data over USB, mainly using various USB devices I have lying around (flash > drive, mouse, Ethernet, etc.) However, I've been struggling to make progress > because I'm unfamiliar with USB and how these devices work - I often get > errors like access denied (even when running with sudo), invalid endpoint > address, etc. > > That brings me to my question - what would be the simplest device to > experiment with, that at least supports writing from the host? It is better to use a USB MCU device which you have access to the firmware source code and can change the firmware. Many USB MCU boards will fit the bill, from ST, Microchip/AVR, NXP/Freescale, etc. Depending on which MCU you are familiar with, then you can choose from them. For example, I am mainly using an old USB PIC18F87J50 PIM since I can build the FW since Microchip provides the USB stack which provide quite some examples. I also have a few STM32 discovery kit which I use less since I am less familiar with the FW side. -- Xiaofan |
From: Michelle R. <mic...@gm...> - 2018-06-19 12:41:07
|
Hi all, I've recently been experimenting with pyusb to try and learn how to transfer data over USB, mainly using various USB devices I have lying around (flash drive, mouse, Ethernet, etc.) However, I've been struggling to make progress because I'm unfamiliar with USB and how these devices work - I often get errors like access denied (even when running with sudo), invalid endpoint address, etc. That brings me to my question - what would be the simplest device to experiment with, that at least supports writing from the host? Thanks! - Michelle Ran |
From: Roland K. <ro...@ro...> - 2018-06-18 12:04:11
|
(This reply is delayed because my email provider has been on one of sourceforge’s email blacklists and replies were being rejected) Thanks for the reply - I had this problem quite a few weeks ago now and solved it myself and the details are not as clear as they were when I wrote the mail in May. Didn’t have anything to do with Isochronous transfers, I wasn’t using the Isoc endpoints at all, they just happened to exist in the example Atmel code I was using. As far as I got before moving on it seemed the selection of the alternate interface was more to do with the problem, I recall that when debugging it I never saw the command on the device to select it and that would mean it stayed in base configuration which only had a control endpoint. Anyway I moved on at that point, abstracted out code for what I actually wanted on the device, which was one setting and just a couple of bulk pipes and implemented that. That simpler device model works just fine so I’ve left the issue behind. Will probably have some more questions as things get more complicated. Currently running pyusb in a wxPython app I have reads running on a thread so the UI event loop is separate. Not sure yet that’s the best scalable way to do things and so I may look at polling pyusb off the idle event instead .. which may also give me device insertion/removal which I’d quite like. Get to those a bit later. > On 10 Jun 2018, at 13:46, Xiaofan Chen <xia...@gm...> wrote: > > On Wed, May 16, 2018 at 9:35 PM, Roland King <ro...@ro...> wrote: >> .. my first post .. >> >> I have a device (Atmel running their vendor development USB stack). >> >> It has one configuration, one interface two alternates as they use an >> isochronous endpoint and you can’t have that in the default configuration. >> With the simplest example I can come up with I get ‘Errno 2 - entity not >> found’ on any access to any endpoint on the device. > > I think pyusb may not work well with isochronous transfer. I have never > tried myself. > > You may want to try out using C first to see if the device works under > plain libusb under Mac OS X. > > You can also try this. It claims to support isochronous transfer. > https://github.com/vpelletier/python-libusb1 > > -- > 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 |
From: Xiaofan C. <xia...@gm...> - 2018-06-18 11:34:23
|
On Sun, Jun 10, 2018 at 1:46 PM, Xiaofan Chen <xia...@gm...> wrote: > On Wed, May 16, 2018 at 9:35 PM, Roland King <ro...@ro...> wrote: >> .. my first post .. >> >> I have a device (Atmel running their vendor development USB stack). >> >> It has one configuration, one interface two alternates as they use an >> isochronous endpoint and you can’t have that in the default configuration. >> With the simplest example I can come up with I get ‘Errno 2 - entity not >> found’ on any access to any endpoint on the device. > > I think pyusb may not work well with isochronous transfer. I have never > tried myself. It seems that you are not using isoc transfer but bulk so it should work. On the other hand, I am not so sure if device understand this command. dev.write(0x83,'test') And you may want to specify the time out value. > You may want to try out using C first to see if the device works under > plain libusb under Mac OS X. > > You can also try this. It claims to support isochronous transfer. > https://github.com/vpelletier/python-libusb1 -- Xiaofan |
From: Xiaofan C. <xia...@gm...> - 2018-06-11 13:44:47
|
On Mon, Jun 11, 2018 at 9:43 PM, Xiaofan Chen <xia...@gm...> wrote: > Ref: > https://github.com/pyusb/pyusb/issues/200 > https://github.com/libusb/libusb/issues/443 > https://github.com/libusb/libusb/wiki/Windows#Driver_Installation > > This will help to support the possibility of using usbdk > backend under Windows. > > usbdk backend has an advantage that you can keep the > vendor FTDI driver (for VCP and D2XX function) and > at the same time you can use libftdi/libusb/etc. That is the example for FTDI, usbdk backend will allow you to use the vendor driver along with usbdk as a filter driver in order to use libusb/pyusb/etc. -- Xiaofan |
From: Xiaofan C. <xia...@gm...> - 2018-06-11 13:43:13
|
Ref: https://github.com/pyusb/pyusb/issues/200 https://github.com/libusb/libusb/issues/443 https://github.com/libusb/libusb/wiki/Windows#Driver_Installation This will help to support the possibility of using usbdk backend under Windows. usbdk backend has an advantage that you can keep the vendor FTDI driver (for VCP and D2XX function) and at the same time you can use libftdi/libusb/etc. -- Xiaofan |