aioc-util.py is a command-line tool for configuring the AIOC
device, viewing its internal registers and change them, including setting the PTT source.
A web based version of the tool that runs completely in the browser is available at https://aioc-util.tf3hr.net/ It only works in Chrome based browsers and not in mobile versions.
This utility is written by Hrafnkell Eiríksson TF3HR based on code from G1LRO and from Simon Küppers/skuep.
AIOC-Util requires firmware version 1.3 or later. The code has been tested against AIOC firmware v1.3 and v1.4.1. Firmware v1.2 does not seem to work. Please upgrade your AIOC if needed.
- Python 3
- hid Python package to access the USB HID interface
- A hid shared library for your platform, see below.
Clone this repository (or download it zipped)
git clone https://github.com/hrafnkelle/aioc-util.gitCreate and activate a virtual environment in the cloned repository, then install dependencies. A virtual environment is reccomended since the distribution provided HID python module seems to be an older version (at least on Debian/Raspian OS). That way the hid module can be pip installed without affecting the whole system. If you have installed python3-hid or python3-hidapi with apt you may need to uninstall that.<>
cd aioc-util
python3 -m venv venv
source venv/bin/activate
pip install hidA udev rule is provided to allow non-root access to the AIOC device. Install it by copying
the file to /etc/udev/rules.d/, then reload rules and replug the device:
sudo cp udev/rules.d/91-aioc.rules /etc/udev/rules.d/
sudo udevadm control --reload
sudo udevadm triggerUnplug and replug your AIOC USB device after installing the rule.
After this, you can run aioc-util.py without sudo.
The libusb/hidapi project also has a udev rule that could be used.
If needed, install libhidapi-hidraw0 and libhidapi-libusb
sudo apt install libhidapi-hidraw0 libhidapi-libusb0cd aioc-util
python3 -m venv venv
.\venv\Scripts\activate
pip install hidOn Windows, you need to provide the hidapi.dll library. Download the Windows release build of the hidapi project (from the Releases page), locate hidapi.dll, and copy it into this project's root directory (alongside aioc-util.py).
List the available command line arguments
./aioc-util.py --help./aioc-util.py --vptt-lvlctrl 0x80 --vptt-timctrl 10 --vcos-lvlctrl 0xff --vcos-timctrl 20 --storeTo key a radio set ptt1 state to on, to unkey use off
./aioc-util.py --set-ptt1-state on./aioc-util.py --open-usb 0x1234 0x5678 --dumpOn Windows you may need to put python in front of the script name
python aioc-util.py --dumpIf you need to find the USB Vendor ID (VID) and Product ID (PID) for your device, you can use the following commands:
-
Linux: use
lsusbto list USB devices and look for your device’s VID:PID pair. -
Windows (PowerShell):
Get-PnpDevice -PresentOnly | Where-Object { $_.InstanceId -like "USB\VID*" } | Select-Object Name, InstanceId
When working with multiple AIOC devicets attached, it is possible to list the devices visible to aioc-util.py and target a specific device by serial number. This option can be used in conjunction with the custom VID/PID options above.
./aioc-util.py --list-devices./aioc-util.py --open-serialnum 12345678 --dumpYou may need to set the AIOC register values to defaults before using the suggestions below.
./aioc-util.py --defaults --storeTo use with APRSDroid, the virtual PTT should be enabled on the AIOC. This way you don't have to rely on the VOX function of your radio to key the radio for transmission.
./aioc-util.py --ptt1 VPTT --storeIt is simple to set up an AllStarLink node with the AIOC.
Make sure you have a udev rule to allow access to the HID functionality of the AIOC like described above. Set the VCOS_TIMCTRL register to 1500
./aioc-util.py --vcos-timctrl 1500 --storeASL3 supports the AIOC on its default USB VID PID values. You can edit the file /etc/asterisk/res_usbradio.conf and
uncomment the line with the AIOC USB VID and PID values. This way you don't have to change the VID and PID so it looks like a CM108 interface. If you would rather change the VID and PID values then you can do that with
./aioc-util.py --set-usb 0x0d8c 0x000c --storeThe AIOC firmware v1.4+ includes a foxhunt mode that can automatically transmit a Morse code message at regular intervals. This is useful for radio direction finding such as "fox hunt" activities. The AIOC only needs power (i.e. from a usb power bank) in this mode, no computer connection is needed.
The foxhunt mode has four main parameters:
- Volume (0-65535): Audio output level for the Morse code transmission
- WPM (0-255): Words per minute for Morse code speed
- Interval (0-255): Time in seconds between transmissions (0 disables foxhunt mode)
- Message: Up to 16 character text message to transmit in Morse code
Check current foxhunt settings:
./aioc-util.py --foxhunt-get-settings --foxhunt-get-messageSet up a basic foxhunt beacon:
./aioc-util.py --foxhunt-message "DE TF0FOX" --foxhunt-wpm 20 --foxhunt-interval 60 --foxhunt-volume 32000 --storeConfigure just the transmission speed:
./aioc-util.py --foxhunt-wpm 15 --storeDisable foxhunt mode:
./aioc-util.py --foxhunt-interval 0 --storeSet a new message without changing other settings:
./aioc-util.py --foxhunt-message "VVV DE F0XX" --store