CATS Mobile Transceiver Software
This is the firmware for the CATS mobile transceiver. The hardware source is available here: https://gitlab.scd31.com/cats/mobile-transceiver
Getting Started
The transceiver is configurable over USB. It shows up as a serial device, and can be configured with your software of choice. I hear Windows people like putty
. I'm on Linux, so I use screen
: screen /dev/ttyACM0 9600
. Note that the configured baud rate is irrelevant as it will be ignored by the driver. It's a virtual serial port, and therefore has no baud rate.
Once connected, press enter a few times and you'll be presented with a >
prompt. This prompt is used to enter commands to configure the device. help
will show the available commands. As a summary, get
is used to show the current settings. set
is used to change settings. save
is used to persist them. To clear a setting, write save <parameter>
with no extra arguments. For example, clear the comment with set comment
.
On a fresh board, you'll probably want to configure your callsign and ssid:
set callsign YOURCALL
set ssid 123
You may also want to add a comment:
set comment Hello World!
And possibly enable GPS:
set gps receiver
It may also be a good idea to look at all the settings to make sure they're how you want them:
get
Don't forget to enable transmitting and save your settings:
set enable_transmit true
save
Remove USB and press the reset button on the board. The green light should come on solid. The red light will come on momentarily whenever the board transmits.
LEDs
The board contains a red and green LED which are used to convey system status to the user.
Green light | Red Light | Status |
---|---|---|
On | Momentary flashes | Board operating normally. Red flashes are on data transmissions |
Flashing | Off | Connected to USB for programming. TX disabled |
On | Flashing | TX disabled by configuration |
Flashing | Flashing | Board error, possible software or hardware issue |
Black Hole
The board provides a black_hole
setting. This setting disables the transmitter - but not the digipeater - when within a certain distance of the specified coordinates. The intended purpose of this is to prevent transmitting exact home coordinates.
The black hole can be configured with set black_hole lat lon radius_meters
. For example, set black_hole 12.34 56.78 750
. The black hole can be reset with set black_hole none
. Don't forget to save
!
Note that you probably don't want to center your black hole exactly on your house. It may be possible to work out its position based on when exactly you stop transmitting. Instead, you should configure the black hole to overlap with your house, without being centered.
Updating firmware (Linux)
NOTE: Currently, updating the firmware can only be done on Linux. If you don't have a Linux computer, a Raspberry Pi, Virtual Machine, or Live-booted distro can be used.
- Download the flasher utility from here.
- Run the utility:
chmod +x flasher-linux
sudo ./flasher-linux
- Follow the instructions on the screen. Afterwards, the board will restart automatically.
Updating firmware (Mac)
- Install dependencies
brew install arm-none-eabi-gcc
brew install dfu-util
- Download the firmware binary from here
- Put the transceiver into firmware flashing mode:
- Connect the board to your computer via USB
- Hold down the
flash
button - Momentarily press the
reset
button - Release the
flash
button - The red LED will come on, then go off. If it stays on, it means your computer isn’t communicating with the board for some reason. Check your cable!
- Flash the firmware:
arm-none-eabi-objcopy -O binary firmware.bin firmware_actual.bin
/opt/homebrew/bin/dfu-util -l # find serial
/opt/homebrew/bin/dfu-util --dfuse-address 0x08000000 -S SERIAL_NUMBER_GOES_HERE -a 0 -D firmware_actual.bin
Compiling firmware from source (Linux only)
Environment setup
First, install Rustup: https://rustup.rs
You will also need git
. After these are installed, restart your terminal, or open a new one. Then run these commands:
git clone https://gitlab.scd31.com/cats/mobile-transceiver-software
cd mobile-transceiver-software
git pull # make sure we're up to date
rustup target add thumbv7em-none-eabihf # add our board architecture, if needed
cargo install flip-link # needed for building
cargo install cargo-dfu # needed for flashing
Finally, you may need to give yourself permission to write to the board.
sudo cp udev.rules /etc/udev/rules.d/99-dfu-stm32.rules
sudo udevadm control --reload-rules && sudo udevadm trigger
Board setup
- Connect the board to your computer via USB
- Hold down the
flash
button - Momentarily press the
reset
button - Release the
flash
button
The red LED will come on, then go off. If it stays on, it means your computer isn't communicating with the board for some reason. Check your cable!
Finally, you're ready to compile and flash. This is a single command:
cargo dfu --release
This could take a few minutes, especially on an older system. Once the command completes, the board will reboot automatically. Congratulations - your firmware is now up to date!