G1LRO HOMEPAGE

EBAY STORE
Please email me if eBay doesn’t
work for your country

Making an AllStarLink Node with the URC/AIOC

The following guide covers the steps to modify the Universal Radio Controller (URC) or AIOC to use in an AllStarLink node.

The benefit of this implementation is:

  • It’s easy for any ham to build an AllStarLink node
  • No modification is needed to any radio
  • No soldering is required
  • The AllStarLink software is unmodified, no reprogramming or swapping files is needed.
  • An AllStarLink node can quickly be made from surplus equipment and can be rapidly re-deployed.

What you will need to make an AllStarLink node:

  • A Raspberry Pi model 3B or later (an attached screen and keyboard can help).
  • Two Micro SD Cards (one for the AllStarLink software and another for this programming tool software)
  • A G1LRO Universal Radio Controller or an AIOC module.
  • A radio transceiver, such as a simple low-cost Handy Talkie (Quansheg, Baofeng etc.)
  • A computer and an internet connection.

This article does not cover any AllStarLink node setup or configuration; as a recommendation for ease of setup, the HamVoip option is well documented with YouTube how-to

To run the various software components needed, a temporary ‘clean machine’ is built by making a new SD card image for a Raspberry Pi. This ensures the process will be reproducible for everyone since no spurious software is involved. Once the updates are made, the Raspberry Pi can be put back to it previous tasks.

Below are the steps in detail, you can also view Hayden’s “Ham Radio DX” video on YouTube where he goes through the entire process:

1 Preparing the Raspberry Pi for programming your AIOC or URC

You’ll need a Raspberry Pi (v3b or later) and a spare Micro SD card to load the specific software for making the AIOC or URC AllStartLink compatible.

If you are using an existing Raspberry Pi from your AllStarLink node to perform this process, shut down your node, remove the SD card and store it safely.

Using the Raspberry Pi software imager burn the Raspberry Pi OS Legacy 32-BIT (Bullseye) image onto the new card.

Use the option to pre-configure your WiFi and admin login.

If you don’t have a screen and keyboard connected to the Pi then use the SERVICES tab to enable SSH with password authentication so you can log in with Putty.

When the image creation is complete, insert the SD card into the Raspberry Pi and boot it up.

Use a screen and keyboard connected to the Pi, or an SSH login with Putty, to get to the terminal prompt. Use the username and password created in the imager software. (if you need info for connecting to a Pi without a screen/keyboard attached, this can help)

Once logged-in to the terminal, at the prompt, enter the following three command lines (pressing enter after each one) to set up the software:

wget www.g1lro.uk/runmeonce.sh
chmod +x runmeonce.sh
./runmeonce.sh

When the script is running, you may be asked to confirm ‘Y’ a few times, go ahead and do this to complete the installation of the software.

This automatic install process will load:

  • The firmware and flash utility to upgrade your URC or AIOC to V1.3
  • Scripts to alter the identity of the AIOC CPU to emulate the CM108 device that AllStarLink is expecting to see.
  • A script to put the AIOC CPU back to the default ‘AIOC’ identity.

2 Upgrading the AIOC or URC Firmware

Before attaching the AIOC or URC to the raspberry Pi, it’s important to put it into DFU programming mode. This needs to be done prior to attaching the USB plug connected to the Pi.

For the AIOC single board, put a wire link across the programming holes. Be very careful as it’s quite possible to destroy the AIOC if the wire touches the wrong place.

Use something like a breadboard wire to connect between the two end holes of the connector area next to the USB port. When you connect the USB lead from the Pi, the AIOC will be in DFU mode and no lights will show. Go to 2.1 below.

For the URC, there will either be a physical jumper in the rear corner, or a button SW1 on the main board.

Put the unit into DFU mode to load: press the button or have a jumper (borrowed from the attenuator) installed when plugging-in the cable from the Pi. (You can release the button 2 seconds after connecting the cable).

With the AIOC or URC in DFU (firmware loading) mode, the lights will not come on, if they do, unplug and try again, something is not right with the button or jumper.

2.1 Run the Firmware Update on the AIOC or URC in DFU mode

At the Pi terminal prompt type the following command:

./flash1.3.sh

The Pi will now load the V1.3 firmware into the AIOC CPU and you should see something like this:

Press Ctrl-C to abort the flashing process as it will repeat every 10 seconds. Don’t stop it mid-download.

Unplug the USB cable remove any jumpers and and plug it back in again, make sure the lights illuminate on the AIOC or URC. It is now running the latest 1.3 firmware.

You do not need to repeat any of the above steps again. Your device can remain on the latest V1.3 firmware permanently.

3 Change the AIOC identity for AllStarLink

The AllStarLink SimpleUSB setup (as used by HamVoip and others), is expecting to see the regular CM108 sound-card fob attached. The following process makes the AIOC CPU emulate the CM108 identity so the AllStarNode software thinks that it has a CM108 attached.

Software in the V1.3 firmware also provides a virtual-COS function to detect when the radio is receiving a signal and indicate this to the AllStarNode software.

With the AIOC or URC upgraded to V1.3, and plugged into the Pi with the lights on, run the following command:

sudo python aioc.py

You should see the following output:

Manufacturer: AIOC
Product: All-In-One-Cable
Serial No: 218077db
Magic: b'AIOC'
Loading Defaults...
Now USBID: 000c0d8c
Storing...

The AIOC or URC is now configured ready for AllStarNode.

Verify this by unplugging and re-plugging the AIOC or URC from the Pi and then run the lsusb command to list USB devices, your Pi may display something different, but you should see C-Media adapter listed.

lsusb

4 Connecting up to AllStarNode

  • Put the SD card for AllStarNode back in the Pi if you took it out to run the programming tasks.
  • Connect the AIOC or URC to one of the USB ports
  • Plug the AIOC into the HT or connect the radio using the URC using for TX & RX audio and PTT in whatever way works for the radio..
  • Boot up AllStarNode and run the SimpleUSB tune menu to set the audio levels. Remember that the volume control on the radio will have a large effect on the RX audio level.

SimpleUSB Settings

To make the transmit and carrier sense work in the correct way, make the following changes in the AllStarLink “simpleusb-tune menu” application in the ASL admin menu:

  • Set option I: PTT Mode to 'active LOW'
  • Set option J: COSFROM to 'usbinvert
  • Set option L: CTCSSFROM to 'no

You can now tune the audio levels using option 3 and 2 (it’s easiest to set the RX audio using the volume knob on the HT).

That’s it, you are ready to go!

5 Reverting the AIOC identity.

The re-programmed AIOC or URC will show up as “C-Media Electronics, Inc. Audio Adapter” for any software that is looking at audio devices, this does not affect the operation of the device, but if desired the configuration can be reverted to the original AIOC identity.

To revert the AIOC or URC to its previous identity,

  • Boot a Raspberry Pi with the SD card we have made above.
  • DO NOT run the ‘runemeonce.sh’ program
  • Once logged into the terminal and with the AIOC or URC plugged-in, run the following command:
sudo python aioc-revert.py

You should see the following result:

Manufacturer: AIOC
Product: All-In-One-Cable
Serial No: 218077db
Magic: b'AIOC'
Loading Defaults...
Now USBID: 73881209
Storing...

The AIOC CPU is now reverted and will show up as “Generic All-In-One-Cable” or “AIOC” in any software.

Verify this by unplugging and re-plugging the AIOC or URC from the Pi and then run the lsusb command, you should see All-In-One-Cable listed

lsusb

Changing COS overhang timer

If you find the COS overhang of 1.5 seconds doesn’t meet your needs then the parameter can be changed in the aioc.py file.

1) Boot Pi with the SD card created by the above process (or make a new one to the end of step 1 if you have lost it). Login to the terminal/PuTTY

2) using an editor, open the file aioc.py for editing

nano aioc.py

3) locate the section toward the end of the file “# Set VCOS trail time”

if True:
    # Set VCOS trail time
    vcos_trail_ms = 1500
    write(aioc, Register.VCOS_TIMCTRL, (vcos_trail_ms << 4))
    print(f’Now VCOS_TIMCTRL: {read(aioc, Register.VCOS_TIMCTRL):08x}’)

4) Edit the value 1500 to meet your needs (this is in milliseconds so 1500 is 1.5 seconds). Save the file with your changes (ctrl-x).

To apply this update to your existing AIOC or URC:

  • 5) Attach the AIOC or URC to the Pi on the USB (not in firmware mode, the lights should be on)
  • 6) Run this commands:
sudo python aioc-revert.py

You should see the following output with the part highlighted meaning the AIOC identity is restored:

Manufacturer: AIOC
Product: All-In-One-Cable
Serial No: 218077db
Magic: b'AIOC'
Loading Defaults...
Now USBID: 73881209
Storing...
  • 7) Now unplug and re-plug the USB to your AOIC or URC
  • 8) Run this command:
sudo python aioc.py

You should see the following output, check the highlighted parts are there to confirm everything is ready.

Manufacturer: AIOC
Product: All-In-One-Cable
Serial No: 218077db
Magic: b'AIOC'
Loading Defaults...
Now USBID: 000c0d8c
Now VCOS_TIMCTRL: 00005dc0
Storing...
  • 9) The new timer setting is applied, the VCOS_TIMCTRL parameter may be different for your setting.
  • 10) go ahead and re-install the AIOC or URC into ASL and test.

Posted

in

by

Tags: