RFnexus/modem73 是一个托管在 GitHub 上的开源项目,主要使用 C++ 编写,采用 The Unlicense 许可证,目前获得 162 个 Star、29 次 Fork。
仓库全名
RFnexus/modem73
README 摘要
MODEM73 is an open source software modem that works with any HF, VHF, or UHF radio capable of 2400 Hz of bandwidth. All you need is a sound card and audio cable for your radio. Running on a UV-K6 with an All-In-One Audio Cable (AIOC) Running natively on a Xiegu X6100 with Armbian Running over HF with an ICOM-7300 Help & Discussion Forum SSB, AM, and FM are all supported. It's plug and play compatible with any KISS…
MODEM73 is an open source software modem that works with any HF, VHF, or UHF radio capable of 2400 Hz of bandwidth. All you need is a sound card and audio cable for your radio.
Running on a UV-K6 with an All-In-One Audio Cable (AIOC)
SSB, AM, and FM are all supported. It’s plug and play compatible with any KISS application and works with rigctl, CM108 sound devices, and serial PTT out of the box.
There are three modem families each suited for covering any possible RF setup from clean line of sight FM links to poor HF band conditions. The receiver decodes all of them at the same time, so one station can hear anything another station sends without switching modes. The modem type can be changed under [ CONFIG ] -> Modem or via the control port
OFDM, based on the open source COFDMTV modem developed by Ahmet Inan / aicodix GmbH. Modulations from BPSK to QAM4096 with code rates from 1/4 to 5/6 and payloads from 256 to 6144 bytes per frame. Rates run from about 790 bits per second to over 13 kilobits per second in the same 2400 Hz.
ROBUST, a set of slow modes built for fading HF paths such as 40 and 80 meter NVIS. Five modes from 1150 bps down to 149 bps in either 2400 Hz or a 600 Hz narrow variant.
MFSK, a non-coherent mode for weak signal propagation and backup links.
On VHF/UHF FM, use any OFDM mode.
On good HF SSB paths, use OFDM at 8PSK 1/2 or below depending on your signal budget
On fading/weaker HF paths, use ROBUST modes. For very weak signals or as a backup use MFSK.
Features
KISS over TCP so it works with anything that speaks KISS: APRS clients, HamIRC, packet BBS software, Reticulum, custom applications
JSON control port API for status and configuration for writing your own programs
lightweight UI that runs straight from the terminal and headless mode for embedded use
modem73 can talk to your radio through Hamlib directly instead of going through rigctld. Install libhamlib-dev or your distro equivalent before building and the Makefile picks it up. Then set PTT to HAMLIB under [ CONFIG ], pick your rig model, and point it at the serial port or a network rig as host:port. rigctld still works the same as before if you’d rather keep that.
sudo apt install libhamlib-dev
CM108 USB PTT Support
CM108-based USB audio interfaces have GPIO pins that can be used for PTT control. To enable CM108 support, install libhidapi-dev before building. The Makefile will auto-detect it and enable the feature.
# Debian/Ubuntu/Pi - install before building
sudo apt install libhidapi-dev
Clone and build
# Clone modem73
git clone https://github.com/RFnexus/modem73
# Build
cd modem73
make
# Optional: move to /usr/local/bin
sudo make install
and run ./modem73
macOS
Apple’s default bundled ncurses is too old for the UI, so install Homebrew’s and build with the same make:
brew install ncurses
git clone https://github.com/RFnexus/modem73
cd modem73
make
The Makefile picks up Homebrew’s ncurses through brew --prefix ncurses.
if your Homebrew lives elsewhere pass the prefix explicitly with make NCURSES_PREFIX=/path/to/ncurses. Hamlib and hidapi from Homebrew are detected the same way as on Linux when pkg-config can see them.
Running & Operations
By default, MODEM73 will listen on port 8001
All of the modes provided by the OFDM modem require a bandwidth of 2400 Hz and work over both FM and SSB.
There are currently six PTT options:
NONE (speaker/mic over the air)
Hamlib (For Hamlib supported rigs)
Rigctl
VOX
Serial
CM108
# Start in UI mode
./modem73
# Start in headless mode
./modem73 --headless
# See all options with:
./modem73 --help
Selecting a mode
# OFDM (default), pick modulation, code rate and frame size
./modem73 --head-m QAM16 -r 3/4 --normal
# ROBUST, suffix S for short frames
./modem73 --robust-mode RDM-600S
# MFSK
./modem73 --mfsk-mode MFSK-16
CSMA
# Pick the busy detector, then a band and preset for the timings
./modem73 --csma-mode sync --csma-band vhf --csma-preset moderate
# Individual knobs override the preset when they come after it
./modem73 --headless --csma-band hf --csma-preset relaxed --csma-burst 3
# Connect to rigctld for PTT control
./modem73 --rigctl localhost:4532
while running rigctld
./modem73 --ptt vox --vox-freq 1200 --vox-lead 500 --vox-tail 150
# 500ms vox lead and 150ms vox tail
./modem73 --ptt com --com-port /dev/ttyUSB0 --com-line rts
# CM108 USB audio interface PTT (GPIO3 is the default)
./modem73 --ptt cm108 --cm108-gpio 3
Control port
A control port for modem73 will automatically start on port 8073 by default. View CONTROL_PORT.md for the full JSON spec
Usage
All In One Audio Cable (AIOC)
modem73 supports the AIOC out of the box. To use the All In One Audio cable, set PTT to COM, specify your COM port, and set PTT line to BOTH and Invert to INVERT RTS. Make sure you have the correct permissions and /dev/xxxx specified. The AIOC on most setups will be /dev/ttyACMx (where x is 0, 1, 2). Note that it may change after a device restart, plugging it back in, etc.
rigctl
modem73 supports Hamlib and rigctl for any rigctl supported radio for PTT. Set rigctl to your options and run rigctld -m (your model) -s (serial baud rate) -r /dev/XXXX) The d at the end of rigctl tells rigctl to run in network mode, which is what modem73 will connect to.
If you are building from source on a memory constrained device like the Pi Zero 2, you will need to increase swap space. On the Pi Zero 2, and similar this can be done with:
评论