This project aims to develop a dirt-cheap, open-source, highly reconfigurable, wireless PC-radio interface to support various packet radio modes. This ESP32-based device attaches to the mic/audio-in and speaker/audio-out jacks of virtually any ham radio and connects to a controlling PC via USB, Wifi, or Bluetooth. The device provides two operating modes: 1) audio relay services for use with modem software on the controlling PC, and 2) as a packet radio modem. It will be functionally similar to a combination of a wireless version of the Signalink USB soundcard ($140) and a Mobilinkd TNC3 ($120), for a small fraction of the price of each of these commercial units individually. I'm estimating ~$20 for parts.
This project started on a whim. I am a new ham, with a mobile radio, a couple of HTs, a modest budget, and an interest in supporting emergency communications. After I joined the local ARES chapter in March, I tuned in to an over-the-air activity day, learned about this group's use of Winlink for coordination between EMCOMM stations, and observed an exercise simulating an emergency scenario. Unable to participate without a digital interface for my radios, I dug through my parts bin and had the idea of using an ESP32 as a Bluetooth audio relay. That got me thinking about many other ways the ESP32 could be used as a packet radio interface, not only as an audio relay but also as a full-blown packet modem, an audio signal analyzer, and an APRS modem or gateway.
For this project, I will interface to an Icom ID-5100a and a Boafeng UV-5R, since that's what I have, but the modem will be easily reconfigurable for virtually any HF or VHF/UHF radio, with some manual cable or headset hacking. I intend to minimize parts as much as possible, although some electronics in addition to the ESP32 are inherently necessary, i.g. for audio leveling and bias. Lastly, this will be a learning experience. I intend to take the hard way and reinvent the wheel in many cases in order to truly understand how packet radio works and to be able to optimize as needed. Lastly, I will document my progress here for anyone interested in the thought process, and I will make demos available as I go along, and ultimately the entire codebase will be on github.
I hope someone finds some part of this useful. If that's you, please leave a comment to let me know :)
73!
Status/To-Do:
☑ Design data vis UI
☑ Develop analog->digital conversion (Rx)
☑ Develop digital->analog conversion (Tx)
☑ Develop audio streaming over UDP (PC->ESP32 ☑, ESP32->PC ☑)
☐ Develop audio streaming over BT (deprioritized)
☑ Develop KISS interface
☑ Research and prioritize modulation modes
☐ Develop FSK modulation
☐ Develop FSK demodulation - IN PROGRESS
☐ Design and test radio interface circuits (☑ UV-5R)
☐ Design state machine for switching between modes (☑ Audio relay Tx/Rx only)
☐ Design html UI
☐ Test with Winlink (☑ Audio relay with Soundmodem)
☐ Test with APRS (☑ Audio relay with Soundmodem)
Some considerations regarding interfaces:
- Strong desire to handle up to
9600 baudon VHF.- (9600 not possible without access to radio modulator)
- perhaps I can add this later if people with compatible radios show interest
- Priority: AFSK 1200 bd
- maybe BPSK 1200 Bd, BPSK 2400 Bd, QPSK 2400 bps, QPSK 3600 bps?
- other modes via soundcard modem, with ESP32 as audio relay
- (9600 not possible without access to radio modulator)
- Ideally, the device should also support HF as well, at lower baud.
- ...in case I get an HF or tri-band rig later, or for other users
- Priority: HF Packet, 300 baud
- other modes via soundcard modem, with ESP32 as audio relay
- Support APRS (should be easy since open source libraries are available)
- i.g. @Evan 's ESP32 TNC project which ports Mark Qvist's APRS libraries to ESP32
54 ways to transfer data between PC and modem:- AF relay mode: audio to/from PC software modem,
over Bluetooth (A2DP 2-way?)(deprioritized)- over 802.11 (UDP if TCP not practical)
- KISS over bluetooth low energy (BLE) serial profile, or
- KISS over 802.11 TCP
- KISS over USB serial port
- AF relay mode: audio to/from PC software modem,
- Wifi (802.11 b/g/n):
- Initially will hardcode my home network SSID and password. Later, will implement a generalized wifi config method similar to most IoT devices, so the modem will default as its own AP but will provide html interface to configure it for any network.
- Will provide telnet port to allow terminal computer to configure the radio and send and receive digital data over wifi instead of USB or BT serial.
- Will serve an HTML modem and radio configuration page
- Will provide HTTP REST server for modem and radio config.
- Maybe also use this to send and receive text messages. Interesting...
- Provide signal analysis UI?
- Use the ID-5100 TTL serial port to control VFO selection, squelch, frequency, etc.
- Will probably manually code this. Hamlib looks too heavy.
- Not easily adaptable to other radios. The modem will still work but operator has to manually configure the radio.
- Support HTs
- Physical interfaces:
- Tx "arm" switch? Breaks ESP32-radio PTT and tx AF links
- Use screw terminals for users to manually adapt any hacked-up cables
- i.g. cut-up ethernet cable and 3.5mm stereo audio cable for Icom, and a cut-up Baofeng headset for Baofeng HTs (and many others with same interface).
- Need onboard regulator to allow variety of power sources (ideally sourced by the radio where possible)