Programming the radio module SA818

Posted by Fred C (W6BSD) on Dec 28 2020
PIRIM Raspberry-Hat
PIRIM Raspberry-Hat

My friend JC (W6IPA) and I have created PIRIM, a Raspberry-Pi Hat for Allstar1, Echolink2, or any digital mode. It is a versatile board that can be used in multiple configurations. The primary use for this board is with the SA818 radio module.

Before you can use it, the SA818 needs to be programmed with the frequency, CTCSS tone DCS, and filters. We have created a tool called sa818 to help you program this radio module.

Installing the SA818 programming software

The sa818 programming software runs on Linux, macOS, or Windows. The best and easiest way to install it is to use the python pip command. Using pip will ensure that you are running sa818 in the right python environment, and that all the dependencies are present and up to date.

To install, run the following command:

# pip install sa818
Collecting sa818
  Downloading sa818-0.1.0-py3-none-any.whl (5.7 kB)
Requirement already satisfied: pyserial in /usr/lib/python3.5/site-packages (from sa818) (3.1a0)
Installing collected packages: sa818
Successfully installed sa818-0.1.0

On Unix based systems (Linux and macOS), you need to prepend sudo to this command

The HamVoIP image is a stripped-down version of ArchLinux. You will have to install pip. Run the command sudo pacman -S python-pip to install the latest version of pip.

Programming the SA818 module

If the module is installed on the PIRIM board, use the sa818 command. For more information on all the options, use the argument --help.

To check the firmware's version of the module, use the subcommand version.

[[email protected] ~]# sa818 version
SA818: INFO: Firmware version: V4.2
[[email protected] ~]#

The subcommand radio will program all the radio settings, such as frequency, tone, and squelch. In the example below, the squelch is set to the default value.

[[email protected] ~]# sa818 radio --frequency 445.02 --ctcss 136.5
SA818: INFO: +DMOSETGROUP:0 frequency: 445.0200, tone: 136.5, squelch: 4, OK
[[email protected] ~]#

Using an FTDI dongle

You can also use a USB FTDI dongle to program the SA818 module. To connect the FTDI dongle, you will need four wires and a 10kΩ resistor connected between pin 6 and Vcc. Follow the schematic in the picture below.

Connecting the SA818 to a USB FTDI dongle
Connecting the SA818 to a USB FTDI dongle

When you run the sa818 command, you will need to specify which serial port's name to use.

√ ~ % sa818 --port /dev/cu.usbserial-110 radio --frequency 445.02 --ctcss 136.5
SA818: INFO: +DMOSETGROUP:0 frequency: 445.0200, tone: 136.5, squelch: 4, OK
√ ~ %

There are many more subcommands and options. For the full list, use the argument --help or visit the project's home page on GitHub.

The radio module SA818 is a great little 1 Watt module for your radio experiments. It is easy to use and can be useful for many of your radio project. If you are interested in experimenting with the PIRIM board, you can visit my friend's store. I think he has some PCBs left.

  1. AllStarLink is a network of Amateur Radio repeaters, remote base stations, and hot spots accessible to each other via VoIP 

  2. EchoLink allows Amateur Radio operators to communicate with one another over the Internet, using streaming-audio technology 

 Allstar      APRS      RaspberryPi