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
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to