Closed Eqqm4n closed 1 year ago
Please check that your user is able to access the hidraw handle and/or USB handle in dev
and if it doesn't have write permissions, add a udev
rule or use sudo
to run the script as noted in #5
Thank you for the response. Running the script with sudo cleared that up.
The hidapi library crashes attempting to open the object returned by the wristwatch.py script's find_device() function ::
Traceback (most recent call last): File "/home/perfecta/Downloads/led-watch-master/host/bootloader", line 68, in
main()
File "/home/perfecta/Downloads/led-watch-master/host/bootloader", line 54, in main
with open_bootloader(args.timeout) as dev:
File "/home/perfecta/Downloads/led-watch-master/host/device/wristwatch.py", line 40, in enter
self.open_path(self.path)
File "hid.pyx", line 157, in hid.device.open_path
OSError: open failed
If you check the file name and line number reported for hid.pyx you'll see this function ::
...and I verified that the 'path' parameter is this object :: {'path': b'3-2:1.0'}. In order to raise the IOError then there must have been a failure of the hid_open_path() function call, but how to troubleshoot this further is unclear as I don't know how to reconstruct the 'cdef char* cbuff = path' line when trying to do these things step by step via running the Python interpreter directly.