Closed G1LRO closed 5 months ago
The solution is to install just these libraries for the hid function:
sudo pip install hid
sudo apt install libfuse2 libhidapi-hidraw0 libhidapi-libusb0
Then run the script Tested on 32 bit bullseye
I've been following the instructions but the python script, aioc.py, gives me errors. I flashed the firmware fine with flash1.3.sh
, and the light is on and it appear fine.
Running sudo python3 aioc.py
first gives the error:
Traceback (most recent call last):
File "/home/alex/aioc/aioc.py", line 43, in <module>
aioc = hid.Device(vid=0x1209, pid=0x7388)
^^^^^^^^^^
AttributeError: module 'hid' has no attribute 'Device'. Did you mean: 'device'?
So I changed lined 43 to aioc = hid.device(vid=0x1209, pid=0x7388)
However, I then get the following error:
Traceback (most recent call last):
File "/home/alex/aioc/aioc.py", line 45, in <module>
magic = Struct("<L").pack(read(aioc, Register.MAGIC))
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/alex/aioc/aioc.py", line 34, in read
data = device.get_feature_report(int(address), 5)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "hid.pyx", line 187, in hid.device.get_feature_report
ValueError: not open
My device shows up as ID 1209:7388 Generic All-In-One-Cable
with lsusb
.
All these packages are installed:
sudo pip install hid
sudo apt install libfuse2 libhidapi-hidraw0 libhidapi-libusb0
I am running on a laptop with Debian 12 to do the flashing...
Hi,
just received an AIOC frmo NA6D.
With all packages installed, and lsusb showing
$ lsusb Bus 001 Device 004: ID 1209:7388 Generic All-In-One-Cable
I get Broken pipe:
$ sudo python3 aioc.py
Traceback (most recent call last):
File "/home/pi/g1lro/aioc.py", line 45, in
Any suggestions ?
Well, I flashed it with the v1.3.0 firmware, now it's working:
Manufacturer: AIOC Product: All-In-One-Cable Serial No: b53bed37 Magic: b'AIOC' Loading Defaults... Now USBID: 000c0d8c Now VCOS_TIMCTRL: 00005dc0 Storing...
The USB interface has changed recently, due to issues with windows on the old one. You need to use the correct python script for the according firmware version.
EDIT: I think you were in Version 1.2.0 before... It doesn't have any support for hid configuration at all. This is currently a beta feature.
Where is the script from, that you are running?
V1.3 firmware has the facility to manipulate registers in the AIOC CPU. The manipulation requires the use of HID libraries, in this case using a Python script.
Raspberry Pi OS produces errors when attempting run the python script. For example:
Both the 'hid' and 'hidapi' libraries are loaded (tried singularly and in combination).
Replicating the issue:
sudo python3 aioc.py
I've tried many combinations of 32 and 64 bit OS and on Pi 3 and 4 hardware.