Closed mljack closed 1 year ago
The badge hangs if I send more than one packet. Got following errors:
[root@alarmpi led-name-badge-ls32]# python2 ./led-badge-11x44.py "Hello world!" using [LSicroelectronics LS32 Custm HID] bus=1 dev=98 Type: 11x44 packet 0 packet 1 packet 2 Traceback (most recent call last): File "./led-badge-11x44.py", line 524, in dev.write(1, buf[i64:i64+64]) File "/usr/lib/python2.7/site-packages/usb/core.py", line 948, in write self.get_timeout(timeout) File "/usr/lib/python2.7/site-packages/usb/backend/libusb1.py", line 842, in intr_write timeout) File "/usr/lib/python2.7/site-packages/usb/backend/libusb1.py", line 920, in write _check(retval) File "/usr/lib/python2.7/site-packages/usb/backend/libusb1.py", line 595, in _check raise USBError(_strerror(ret), ret, _libusb_errno[ret]) usb.core.USBError: [Errno 110] Operation timed out
I have to unplug and re-plug it to get it reset to normal.
I found the bmpbadge application also read some bytes from endpoint 81. Would that be the missing pieces?
It seems helpful to read 64 bytes from 81 after each write. I could upload more rounds with these extra reads, but it's still not reliable. Still not get the correct patterns of reading calls.
I resolve the hang.
The badge hangs if I send more than one packet. Got following errors:
[root@alarmpi led-name-badge-ls32]# python2 ./led-badge-11x44.py "Hello world!" using [LSicroelectronics LS32 Custm HID] bus=1 dev=98 Type: 11x44 packet 0 packet 1 packet 2 Traceback (most recent call last): File "./led-badge-11x44.py", line 524, in
dev.write(1, buf[i64:i64+64])
File "/usr/lib/python2.7/site-packages/usb/core.py", line 948, in write
self.get_timeout(timeout)
File "/usr/lib/python2.7/site-packages/usb/backend/libusb1.py", line 842, in intr_write
timeout)
File "/usr/lib/python2.7/site-packages/usb/backend/libusb1.py", line 920, in write
_check(retval)
File "/usr/lib/python2.7/site-packages/usb/backend/libusb1.py", line 595, in _check
raise USBError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBError: [Errno 110] Operation timed out
I have to unplug and re-plug it to get it reset to normal.
I found the bmpbadge application also read some bytes from endpoint 81. Would that be the missing pieces?