weechat-radio:$
UTC --:--:--
LCL --:--

guides › Install on your computer › Raspberry Pi gateway

weechat-radio:$ Raspberry Pi gateway

A Raspberry Pi and a Digirig make an always-on station: a gateway between the radio and the hub, with email. You look after it from a phone or laptop browser on your own network. About 20 minutes.

How it fits together

How a Raspberry Pi gateway fits together G4ABC, out walking with a handheld, sends a message on 144.950 FM. At home, the gateway's radio hears it on the mast antenna, the Digirig passes the sound over USB to the Raspberry Pi, and modem73 on the Pi decodes it. WeeChat Radio on the Pi passes it to the hub, where internet stations such as G4XYZ read it. A phone on the home Wi-Fi shows it live on the Pi's web page. The Pi then keys the radio through the Digirig and sends a receipt back on the air. G4ABC [ok] on the air home radio Digirig USB Raspberry Pi internet hub internet stations Wi-Fi your phone G4ABC → #walk receipt sent How a Raspberry Pi gateway fits together G4ABC, out walking with a handheld, sends a message on 144.950 FM. At home, the gateway's radio hears it, the Digirig passes the sound over USB to the Raspberry Pi, and the Pi passes it to the hub for internet stations such as G4XYZ. A phone on the home Wi-Fi shows it live on the Pi's web page. The Pi then sends a receipt back on the air. G4ABC [ok] on the air home radio Digirig USB Raspberry Pi internet hub internet stations Wi-Fi your phone G4ABC #walk receipt sent

The radio, Digirig and Pi stay at home. The Pi links the radio to the hub, and you check on it from your phone.

What you need

  • A Raspberry Pi 3, 4 or 5 A 16 GB+ microSD card for Raspberry Pi OS Lite (64-bit), and the official power supply: a weak one makes the Pi drop the Digirig.
  • A Digirig Or another USB sound card with VOX or CM108 PTT. Use a USB-C cable that carries data, not a charge-only one.
  • A radio left on one frequency It must be able to transmit: a gateway sends receipts and answers mail requests.
  • A phone or laptop on the same network The Pi on Ethernet is the most reliable; Wi-Fi works.

Install and start it

Start with a fresh microSD card. Everything after step 1 happens on the Pi, logged in as your own user (not root), over SSH or with a keyboard and screen.

  1. Write the SD card

    On your laptop, open Raspberry Pi Imager. Pick your Pi model, then under Operating System → Raspberry Pi OS (other) choose Raspberry Pi OS Lite (64-bit). It must be the 64-bit image: the installer only has a 64-bit build. Lite is enough, there is no desktop to run.

    When Imager asks to apply OS customisation, say Edit settings: set the hostname (raspberrypi is fine), your username and password, your Wi-Fi if the Pi is not on Ethernet, and on the Services tab turn on SSH. Write the card, put it in the Pi, power it on and wait about two minutes. Then from your laptop: ssh you@raspberrypi.local (or the Pi’s IP address from your router).

  2. Install WeeChat Radio
    curl -fsSL https://weechatradio.com/install.sh | sh

    On a 64-bit Pi this fetches the linux-aarch64 build of wcr and modem73 into ~/.local/bin, and installs the few libraries modem73 needs with apt. No desktop is needed. If anything is missing, the installer stops and names it.

  3. Let your user reach the Digirig
    sudo usermod -aG dialout,audio $USER

    Log out and back in.

  4. Set the station up
    wcr setup

    Choose Handheld + Digirig (or your radio), the preset for the band, and the frequency the radio stays on. The serial and audio pickers start on the Digirig (plughw:CARD=Device,DEV=0), so Enter is right; the Pi’s own Headphones card cannot hear the radio. With a radio and the internet, setup picks internet-radio mode, which is what a gateway needs.

  5. Choose a password for the web page
    wcr web password

    At least 8 characters.

  6. Run it at boot
    sudo ~/.local/bin/wcr web install

    This adds the wcr-web service, which runs as your user and restarts by itself after a crash. Check it with systemctl status wcr-web; its log is journalctl -u wcr-web -f.

  7. Press Start on the page

    Open the page (below), log in and press Start. It asks first, because the station then transmits. Start and Stop are remembered: after a reboot or an update the station goes back on the air only if you left it running.

Open the page

From a phone or laptop on the same network, open https://raspberrypi.local:8443 (your Pi’s name), or its IP address, for example https://192.168.1.158:8443. Right after the first boot the .local name can take a few minutes to work; hostname -I on the Pi shows the address.

Or let a laptop find it: run wcr webui on any computer with WeeChat Radio. It finds the Pi on your network, prints the address and opens it. --qr also prints a QR code for a phone.

  • HTTPS. The Pi makes its own certificate, so the browser warns once. Check it is your Pi’s address, then continue.
  • Password. A login lasts 12 hours of use.
  • Your network only. The page answers only local addresses. Do not forward port 8443 on your router. modem73’s own ports listen only on the Pi itself, so nobody on the network can key the radio through them.

The Station view

One column, most important first. It refreshes by itself every few seconds.

  • Station card: On the air, 144.950 MHz, 2m, internet-radio, up 3 days 4 hours. Internet, hub and radio lights green. Preset vhf-fm, modem modem73, 14 frames relayed. A Stop button.
    Station. On the air or not, why, and Stop / Start. Lights for internet, hub and radio. Mode and preset pickers.
  • Receive level card: level good at -31 dBFS in the green band, RX gain 11.9 dB and TX level -6 dB sliders, and a waterfall with data bursts between 300 and 2700 Hz on dark blue noise.
    Receive level. The meter, RX gain and TX level sliders, and a live waterfall of the radio’s audio.
  • On the air list with filters All, Messages, Receipts, Beacons, Mail. Rows show receipts, direct messages, a beacon and group lines with time, who to whom, SNR, rf or internet, and Reply.
    On the air. Every frame heard or sent: messages, receipts, beacons, mail, with SNR and how it came.
  • Diagnostics card: chips CPU 14%, RAM 46%, 52 °C, power ok, disk 23%, Wi-Fi -54 dBm, and computer details for a Raspberry Pi 3.
    Diagnostics. CPU, memory, temperature, power, disk and Wi-Fi, then errors and the station log.

Screens from the Pi’s real page with made-up stations and mail. Tap one to see it full size.

Further down: Stations heard (with SNR: 10 dB or more is comfortable) and Mail through this station, with each mail’s delivery status. The radio light is green only while modem73 runs and has its sound card; if it is not, the Errors box says why. The power chip turns amber or red when the Pi has been short of power.

The App view: chat and mail in the browser

App at the top of the page (or /app) turns the Pi into a field computer you use from a phone, without the desktop app. It sends through the station exactly as the desktop app does, so the same on-air, hub and gateway rules apply.

Sending a chat line from a phone through the Pi A phone sends a line to the Raspberry Pi over the local network. The Pi keys the radio through the Digirig and the line goes on the air to G4ABC. G4ABC's receipt comes back the same way and the phone shows ok rf. G4ABC's answer arrives with its SNR. your phone /app Raspberry Pi M0GWY Digirig radio on the air G4ABC

M0GWY · App · 144.950raspberrypi.local

  1. [G4ABC] Is the gateway hearing me OK? [rf] 17 dB
  2. [M0GWY] Loud and clear, 17 dB here [..][tx][tx] [ok rf]
  3. [G4ABC] Great, heading up the ridge now [rf] 16 dB

Your line’s marks change as it goes: [..] waiting, [tx] sent on air, [ok rf] delivered by radio.
  • App view on a phone: tabs Chat, Mail, Stations, On the air, station up. A direct chat with G4ABC with rf and SNR marks on their lines and tx, ok rf on M0GWY's lines.
    Chat. Your channels and direct chats, with history. New lines appear by themselves.
  • App view Mail tab on a phone: Inbox with two received mails, and one opened, showing its route through the gateway and its text.
    Mail. Inbox, Outbox and Sent with status chips. New mail, Reply, and Retry on a failed one.

Stations lists who the station has heard, newest first; Message opens a direct chat. On the air is the same list as on the Station view, and Reply there opens a separate direct chat. Slash commands, closed channels and invites stay in the desktop app for now. Every mark is explained under marks next to the conversation name.

Set the levels once

  1. Squelch 0

    On the gateway’s radio and on the handhelds that talk to it. A data burst is short and squelch 1 chops it. Turn the speaker volume down rather than the squelch up; the hiss does not stop the gateway sending on FM. Turn off scanning, dual watch, power saving and VOX on the radio itself.

  2. Receive: RX gain

    Move RX gain on the Receive level card until the hiss sits in the meter’s green band (−45 to −12 dBFS) and nothing clips. The hint under the meter says which way to go. If RX gain is at 0 dB and it still clips, turn the radio’s volume down.

  3. Transmit: Speaker, then TX level

    The Digirig’s Speaker level sets the deviation. Set it once with alsamixer -c Device (F3 for playback), then sudo alsactl store. Fine-tune with TX level (it only turns down) while watching the far station’s SNR.

Then do the signal check below with a second station.

Quick signal check

With a second station a few metres away, on the same frequency and preset, squelch 0 on both:

  1. It hears the gateway. About a minute after Start, the gateway’s beacon shows in the other station’s heard list with an SNR.
  2. The gateway hears it. Send a bulletin from the other station. It shows under On the air with its SNR, and the meter does not say clipping.
  3. The SNR is comfortable: 10 dB or more in the same room. A few dB means a level is off.
  4. A long message gets through. About 500 characters each way arrives whole, and the sender sees [ok rf].

If 1 fails and 2 works, look at the transmit side (Speaker, TX level, PTT). If 2 fails, the receive side (RX gain, radio volume, squelch).

If something is wrong

The Digirig does not show up

lsusb should list 10c4:ea60 and 0d8c:013c. Try a USB-C cable that carries data and the official power supply. vcgencmd get_throttled must say 0x0.

raspberrypi.local does not answer

Run wcr webui on a laptop, or use the Pi’s IP address.

The radio light is red

The Errors box on the Station view says why. modem73’s full log is ~/.local/share/wcr/modem73.log.

Audio in says “not measured”

The modem73 next to wcr is an older one. Update (below).

Updating

wcr update
sudo systemctl restart wcr-web

The station comes back on the air only if it was running before. Make sure your licence allows unattended or remote operation on that band, and that you can always stop it: the Stop button, sudo systemctl stop wcr-web, or the radio’s power switch.

Every detail and setting: PI-GATEWAY.md. Related: handheld + Digirig · email · cross-frequency chat.