USB Error: [Errno 16] Resource busy
I have been reading. I do not know how to pinpoint this error in general.
I can and will add a delay. This may be it. I can and will try to release via source the endpoint.
Well, all have been tried. No success yet.
I can always try more power too.
options are dwindling for now. I started an issue on github for pyusb.
Would I need a udev rule?
Here is the issue: Some Unknown Error to Me/Linux OS Debian Trixie · Issue #551 · pyusb/pyusb · GitHub
For some additional details:
# ValueError: Invalid endpoint address 0x1
dev.write(1, [command, channel, low_bits, high_bits])
The 1 in the command gets turned into a hexadecimal value like with the ValueError:.
Python3 does not allow for leading 0 values. The funny thing, sort of a stresser, is that the code below is creating Resource busy errors when 1 is a command called command which is a hexadecimal value of 0x84.
See here:
target_val = int(target_us * 4)
command = 0x84
low_bits = target_val & 0x7F
high_bits = (target_val >> 7) & 0x7F
try:
dev.write(1, [command, channel, low_bits, high_bits])
except usb.core.USBError as e:
print(f"USB Error: {e}")
okay and doodles, it is late now.
pyserial over pyusb did the trick.