- C 53.6%
- HTML 22.5%
- Python 14.8%
- Shell 4.4%
- JavaScript 4.3%
- Other 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| c | ||
| docs | ||
| openwrt | ||
| .gitignore | ||
| AGENTS.md | ||
| INSTALL.md | ||
| LICENSE | ||
| netcheck.py | ||
| README.md | ||
| testclient.py | ||
mango-remote: an open SCU-LAN10 replacement
Yaesu sells the SCU-LAN10 to operate the FT-710 and similar radios over a network. It is a small box that sits between the radio's USB port and the LAN, and it costs several hundred euros. Inside, the job is modest: pass CAT commands, audio and the band scope between USB and UDP.
A travel router with OpenWrt does the same job. The GL.iNet GL-MT300N-V2 "Mango" costs about 30 euros,
has a USB port, and draws a few watts. mango-remote runs on it, talks to the FT-710 over USB, and speaks the
SCU-LAN10 protocol on the network. Programs written for the SCU-LAN10, such as
POTACAT on the desktop,
FT-Control on iPhone and iPad, or Yaesu's own
SCU-LAN10 Remote for Windows (download on Yaesu's
FT-710 page),
connect to it as they would to the real unit: CAT, receive and transmit audio, band scope.
Because the router is an ordinary Linux machine, it can do more than the box it replaces:
- Checks before every transmission: tuner on, frequency inside the band plan, power within the licence
class, SWR guard while keyed, a longest-PTT limit, and
TX0;after a client goes quiet. - A web page for the phone: radio on and off, unkey, the client that is connected and which program it runs.
- A WSPR beacon generated on the router, sent on request or on a daily schedule that switches the radio on before and off after, with a map of who heard it (from wspr.live).
- Home Assistant over MQTT: power switch, transmit state, beacon controls.
- Open source code that can be read, changed and extended.
Why this project exists: the SCU-LAN10's protocol is not published, and its software and firmware are
closed. Anyone who wants to use the radio over the network with other programs, add a safety check or run
it from a cheaper or more capable device depends on Yaesu. mango-remote is written independently and speaks
the same protocol for one reason: so that programs written for the SCU-LAN10 work with it. It contains no
Yaesu code or firmware and does not modify the radio.
Not affiliated with or endorsed by Yaesu. Yaesu, FT-710 and SCU-LAN10 are trademarks of their owners and are named here only to say what this software works with.
Use at your own risk. This software switches a transmitter on and off and keys it. It comes without any warranty (see the licence). The author is not liable for damage to the radio, the router, antennas or other equipment, for interference, or for transmissions that break the rules where you operate. You are responsible as the licensed operator for everything your station sends.
Installation: see INSTALL.md.
The phone page (openwrt/www/mango-remote/), here with POTACAT connected and the WSPR beacon's receivers of the
last 24 hours:
Parts:
c/mango-remote.c– the server (C, static, 230 KB). Safety rules and protocol notes in the file header.c/wspr.c– WSPR encoder and tone generator for the beacon (see below).c/mango-remote-mqtt.c– Home Assistant bridge over MQTT (separate process, see below).openwrt/mango-remote.init– procd service for the Mango; settings inopenwrt/mango-remote.config(/etc/config/mango-remote).openwrt/luci/– LuCI page (Services → Radio remote): live status, radio on/off, emergency unkey, settings, log.openwrt/deploy.sh <router>installs server, service, config and pages.openwrt/www/mango-remote/– a phone page athttp://<router>/mango-remote/(icon, web app manifest for the home screen). Tabs Radio / Spots / Schedule / Settings (bottom bar on a phone; on a desktop the spots stay on the right), the radio state in the header on every tab, one save bar that appears only with unsaved changes. Contents: status, radio on/off, unkey, a series of N beacon transmissions (one every 2/4/6/10 min) on the bands picked there, in turn from the first (wspr send N K HZ,HZ; no restart), "heard by" (receivers as list and map, straight from wspr.live in the browser; Leaflet from cdnjs, OpenStreetMap tiles), beacon and station settings. Radio power shows as on/off: the CAT chip runs on USB power and stays when the radio is off, the audio codec goes; without a client the server also asksPS;every 3 s. It logs in to rpcd as root over/ubus(session kept 24 h in the browser) and uses the same status and control files as LuCI.c/test/– a simulated radio on a pseudo terminal, to test the keying logic without RF.testclient.py– test client for the SCU-LAN10 protocol (login, CAT, RX and TX audio), see below.netcheck.py– before/after measurement of the network path (ping, CAT round trip, RX audio gaps).
Build, deploy, test
MANGO=192.0.2.10 # the router's address
make -C c ZIG=/path/to/zig # mango-remote (x86_64) + mango-remote-mipsel; with Nix: ZIG=$(nix build --no-link --print-out-paths nixpkgs#zig)/bin/zig
./openwrt/deploy.sh $MANGO # server, init script, default config (kept if present), LuCI page; restarts the service
c/test/start.sh [AC000;] # simulated radio + server on 127.0.0.1:51000
c/test/stop.sh
On the Mango: /usr/share/mango-remote/mango-remote, service /etc/init.d/mango-remote (starts at boot), credentials
/etc/mango-remote/credentials (line 1 user, line 2 password, mode 600), settings /etc/config/mango-remote
(allow_tx off by default; saving in LuCI restarts the service). The server writes /tmp/mango-remote.status
(JSON, every second) and reads /tmp/mango-remote.ctl, which accepts only power on, power off, unkey,
wspr next, wspr send N K [HZ,HZ...] (N transmissions, one in every K-th slot, on these dial frequencies in turn from the first) and wspr cancel – the web page cannot send arbitrary CAT. Packages: kmod-usb-audio kmod-usb-serial-cp210x alsa-utils.
Checked against the simulated radio: TX1; and KY go out only after AC001; and are refused on
AC000; or without an answer; TX0; after 2 s of client silence; commands queued behind a held-back
TX0; keep their order.
Only one client at a time, like the real unit: a second login from the same address takes the session over. Close POTACAT before measuring with the test client.
Band plans
Before every key-down the server checks that the whole signal lies inside the band plan and that the power
setting is within the limit there (band_plan, LuCI "Band plan"):
band_plan |
Rules |
|---|---|
de-a (default) |
Germany, class A (AFuV Anlage 1): bands and power limits, no mode subbands |
us-e, us-a, us-g, us-t |
USA, FCC Part 97: Amateur Extra, Advanced, General, Technician – bands, mode subbands (CW, data, phone) and power limits; 60 m as the five channels |
none |
no check |
The occupied bandwidth is estimated from the mode (SSB 3 kHz, CW 1 kHz, AM 10 kHz, FM 16 kHz), ERP limits are
applied to the transmitter power (the antenna gain is unknown), and 2200 m and 630 m are not in the US plans.
The plans are tables in c/mango-remote.c (PLAN_*); others are welcome. Check them against the rules
that apply to you: the check is a safety net, not a substitute for knowing your privileges.
WSPR beacon
While no client is connected, mango-remote can send WSPR (type 1: plain callsign, 4-character locator, power in
dBm) in a share of the even-minute slots (LuCI section "WSPR beacon", UCI wspr_*, off by default):
- 6 s before the slot it saves the radio's VFO A frequency, mode and power, then sets the beacon dial
frequency (the list is used in turn), DATA-U and the beacon power. At +0.6 s the same pre-key checks as
for a client run (tuner on, band plan, power, lockouts), plus: transmit frequency = beacon frequency
(no split), mode DATA-U. Then
TX1;and 110.6 s of audio at 1420–1580 Hz (random per transmission), generated on the router and kept 0.3 s ahead of real time;TX0;once it has played out; the saved settings back. wspr send N K HZ,... offswitches the radio off (PS0;) when the series is over – done or ended early – unless a client is connected or the radio is keyed;wspr cancelkeeps it on. The phone page ticks "Switch the radio off afterwards" while the radio is off, switches it on first ("Radio on + Send") and queues the series once the radio reports on.- A series (
wspr send N K) goes on only after clean transmissions: a skipped slot, a refusal or a stop ends it. Withwspr_share0 the beacon sends only on request. - The band plan check uses the signal itself (dial + 1400..1600 Hz), so 60 m (5364.7 kHz) fits in Germany.
- A bad beacon setting switches the beacon off (logged, shown in the status), not the server.
- Schedule (
wspr_sched_*,--wspr-schedule HH:MM,...): one transmission at each time (local time, even minutes; odd ones are ignored with a log line), the default dial frequencies in turn. With--wspr-schedule-powerthe radio is switched on (PS1;) 90 s before when its audio codec is missing, and off (PS0;) after the slot – only if the schedule switched it on and no client connected meanwhile. The init script passes/tmp/TZasTZ, so the schedule and the log use local time. The schedule has its own bands (wspr_sched_freq,--wspr-schedule-freqs); without them it useswspr_freq. - Station, beacon and schedule settings reach the running server through
/var/run/mango-remote.conf(--config, key=value), which the init script writes from UCI; the server re-reads it within a second when it changes. Saving them on the phone page or in LuCI therefore keeps a connected client, a running series and the schedule's state; only scope, audio and buffer options change the command line and restart the service. - It stops at once (
TX0;, settings back) when a client logs in, onunkeyorwspr cancel, when the SWR guard trips or the radio returns to receive by itself (TX TIME OUT TIMER). - Timing comes from the router clock. busybox ntpd never marks the kernel clock synced, so
openwrt/ntp.hotplug(installed as/etc/hotplug.d/ntp/50-mango-remote) touches/tmp/mango-remote.ntpon every sync; without a sync in the last 30 min the beacon skips its slots. - Limits: a beacon transmission is released after 116 s, a client's PTT after
max_tx(default 90 s), so the radio's TX TIME OUT TIMER can stay at 3 min for both. - Radio: TX TIME OUT TIMER above 2 min (one transmission is 110.6 s), DATA MOD SOURCE = USB, the tuner tuned once on every beacon frequency. While the beacon is on, the radio counts as unattended whenever no client is connected: it retunes the radio for each transmission.
- Without RF:
c/test/wspr_gen.cwrites a WAV to check withwsprd(WSJT-X). - Not on the router: WSPR decoding (no FPU; wsprd would be far too slow).
- Check the licence rules for unattended automatic transmissions where you operate.
Which client is connected
The server looks the client's IP up in /proc/net/arp and reports its MAC; names are set per MAC (UCI list
client_name 'MAC=name', "Name"/"Rename" next to the client on the phone page) and shown on the page, in
LuCI and in Home Assistant (sensor "Client"). Without a name, or for clients that are not on the same link
(VPN, routed networks – they are not in the ARP table), the IP is shown. At every login the server logs the
login packet without user and password plus the first packets and CAT commands ("client fingerprint"), to
learn how client programs differ.
Home Assistant (MQTT)
mango-remote-mqtt (UCI section mqtt, the "Home Assistant (MQTT)" card on the phone page) connects to an MQTT
broker (3.1.1, plain TCP, QoS 0, written from the specification, no library) and announces the radio by
Home Assistant MQTT discovery: switch Power; binary sensors On air, Client connected, Radio link
(problem), Transmitting allowed; sensors Client (name or IP), SWR, WSPR beacon (state, all beacon fields as attributes), WSPR
transmissions, WSPR last, WSPR next scheduled; buttons Unkey, WSPR send, WSPR stop.
- A separate process on purpose: a broker problem cannot touch the radio server. It reads
/tmp/mango-remote.statusand appends to/tmp/mango-remote.ctl, so it can do what the phone page can and no more – no CAT, no keying of its own; a beacon transmission passes all the server's checks. - Topics (base
ft710by default):<base>/state(the status JSON, retained; at once when power, keying, client or beacon state change, else every 10 s),<base>/availability(last will) and<base>/server(status file fresh); commands<base>/power/setON|OFF,<base>/unkey,<base>/wspr/send,<base>/wspr/stop. Discovery is published again when Home Assistant announceshomeassistant/statusonline. - The init script writes the connection settings to
/var/run/mango-remote-mqtt.conf(mode 600); procd watches the file, so saving restarts only the bridge. The connection state goes to/tmp/mango-remote-mqtt.status.
Notes on the hardware
- The MT7628's EHCI garbles audio output to a USB 1.1 device behind the radio's USB 2.0 hub → unbind EHCI, the radio then runs over OHCI (the init script does this).
- Over WiFi, TX audio packets can arrive up to ~100 ms apart → 250 ms jitter buffer (
--tx-prebuffer-ms). - At high power the USB link can drop through RF on the cable: wind the USB cable through a ferrite ring.
- PTT over CAT. RTS keying (radio menu RPTT SELECT = RTS) keys the radio whenever the router is off or
booting – do not use it. After every reconnect the server sends
TX0;. - Band scope: the FT-710 puts its spectrum on an FTDI FT4222 (USB to SPI), driven here directly through
usbdevfs without libft4222 (protocol after flashprog, parameters after POTACAT's helpers/yaesu-scope).
4096-byte frames ending in
FF 01 EE 01, radio menu SCU-LAN10 = ON. - Load on the router with audio and scope: ~8 % CPU, ~250 KB RAM.
Test client
testclient.py is a client for the SCU-LAN10 protocol (a real unit or mango-remote): login, CAT, RX and TX
audio. Protocol description: its file header.
Prerequisites: on the FT-710 SSB MOD SOURCE = AUTO or USB, other clients closed (the unit takes one
client).
export SCU_HOST=192.0.2.20 SCU_USER=... # password is prompted for (or SCU_PASS)
-v shows every packet:
| Command | Does the radio transmit? | Does |
|---|---|---|
python3 testclient.py selftest |
no, no network | framing against captured packets |
python3 testclient.py -v login |
no | login, session id |
python3 testclient.py cat FA; MD0; PC; |
no | open the CAT channel, read |
python3 testclient.py rx --seconds 5 |
no | RX audio → rx.wav |
python3 testclient.py tx-tone --dummy-load --seconds 2 |
yes | 1 kHz tone, −12 dBFS |
python3 testclient.py tx-wav speech.wav --dummy-load |
yes | a WAV of your own (16 bit, max. 15 s, peak −6 dBFS) |
Transmit only into a dummy load or at minimum power (PC005; first), mode USB or LSB, and with the tuner
on (AC001;; transmit() aborts before TX1; otherwise). TX0; is sent three times at the end and on
Ctrl+C.
Protocol notes
- Before login the unit answers nothing, only UDP 50000 is open; health checks are sent blind first.
- Wrong user or password: no reply (no rejection).
- Login fields are 33 bytes each (not 32), otherwise the unit stays silent.
- The CAT baud rate on open must match the radio's CAT RATE (38400 by default); otherwise no replies.
- Every CAT reply comes twice with the same packet number; turn auto information off with
AI0;first. - Power on over the LAN:
PS1;twice, then wait about 3 s. - CW: the FT-710 silently discards
KY0 <text>;. What works:KM1<text>;(keyer memory 1), thenKY01;, withBI1;, withoutTX1;. DTR/RTS keying does not exist in the SCU-LAN10 protocol. - After power-on the tuner can be off (
AC000;): check it before every transmission. - The unit's setup console: telnet TCP 2023, factory IP 192.168.49.1; commands
adduser NAME PASS(password ≥ 10 characters),setaddr IP MASK GW,getrmtport,reboot.
License
GPL-3.0-or-later, see LICENSE. No warranty and no liability, as set out in sections 15 and 16 of the
licence and in the note at the top of this file.

