Hotspot RSSI calibration: correct receive level
Once a hotspot is configured and running, almost everyone stops there. But there is one parameter most people ignore: RSSI — the received signal strength. Until it is calibrated, the portal shows either zeros or numbers that mean nothing. Fill in the mapping table just once, and real decibels appear in the DMRhub last-heard. You can see who comes in strong and who is hanging on by a thread.
What RSSI means in the MMDVM context
RSSI (Received Signal Strength Indicator) is an approximate estimate of the received radio signal power, usually expressed in dBm. The closer the value is to zero, the stronger the signal; the more negative it is, the weaker. A typical range for a hotspot in a room runs from −50 dBm (radio nearby) to −110 dBm (at the edge of reception).
Inside the MMDVM modem there is no "ready-made" value in dBm — there is a raw integer value from the ADC (analog-to-digital converter). That number depends on the specific modem circuitry and does not fit any standard. The job of calibration is to teach MMDVMHost to convert that raw number into real decibels.
How MMDVMHost works with RSSI
MMDVMHost reads a mapping table whose path is set in the RSSIMappingFile parameter of the [Modem] section in the MMDVM.ini file. The file contains "raw value — dBm" pairs. When the modem sends a raw number, the host finds the two nearest points in the table and computes the result by linear interpolation. The resulting dBm value is passed to the network and shown in the logs, the dashboard, and on the portal.
If the RSSIMappingFile parameter is not set or the file is empty, RSSI is not transmitted at all. Most recent images (Pi-Star, WPSD, RadioStar) leave it empty out of the box.
Support depends on the modem
Not all modems output a raw RSSI value. Full support is provided by the MMDVM HS Hat (ZUMspot, NanoDMR and STM32-based compatibles) and most professional repeater boards (STM32-DVM and others). Simple DVMEGA-compatible AVR-based modems may not transmit RSSI at all — in which case calibration is pointless.
The RSSI.dat file format
The file is plain text. Each line is: raw value, space, value in dBm. Comment lines start with #. Lines with a third field (voltage in volts) are also allowed — MMDVMHost ignores the third field.
# RSSI calibration for MMDVM HS Hat
# raw_value dBm
# (можно добавить #voltage как комментарий)
1461 -46
1446 -55
1381 -61
1300 -70
1200 -80
1100 -90
1020 -95
997 -100
Rules you need to follow:
- No duplicates in the raw-value column.
- You must have a point for a very strong signal and a point for a very weak one. Values outside the table range are clamped to the extremes.
- If the real relationship is nonlinear, add more points — then the piecewise-linear approximation will produce a smaller error.
- Row order does not matter: MMDVMHost sorts them itself.
Three ways to obtain reference points
Method 1: MMDVMCal in S-mode (recommended)
MMDVMCal is the standard MMDVM calibration utility, included with Pi-Star, WPSD and the RadioStar image. It has a dedicated S-mode (RSSI) in which the utility continuously reads and prints the raw RSSI value from the modem. You feed a signal of known power into the antenna input and record a "reading — dBm" pair. Repeat for several levels.
To access MMDVMCal you need to connect to the Raspberry Pi over SSH and stop MMDVMHost (it occupies the modem port):
sudo systemctl stop mmdvmhost
# на RadioStar/Pi-Star демон может называться иначе:
# sudo pistar-stop или sudo systemctl stop pistar-watchdog
# запуск калибровки:
sudo MMDVMCal /dev/ttyAMA0
# для USB-модема обычно:
sudo MMDVMCal /dev/ttyUSB0
Inside the utility, press S to switch to RSSI mode. The utility will start printing raw values. Bring a radio of known power close and record the readings.
Method 2: Ready-made tables from the MMDVMHost repository
In the official g4klx/MMDVMHost repository, the RSSI/ folder contains ready-made calibration files for several donor radios (Motorola GM340, FC-302 and others). If your modem is built on the same base, you can take a matching file as a starting point. Accuracy will be lower than with individual calibration, but it is better than nothing.
Method 3: Linear stub (quick start)
If you do not have equipment for precise calibration but still want to see at least something in the portal, create a simplified table with two or three points roughly spanning the whole range. The values will be approximate, but RSSI will start to display. You can refine it later.
# Упрощённая заглушка — только для проверки
# уточните по реальным замерам!
1500 -40
1200 -70
900 -100
Linking the file in MMDVM.ini
Open MMDVM.ini (in Pi-Star/WPSD via Expert Mode, in RadioStar directly over SSH):
[Modem]
# ... другие параметры ...
RSSIMappingFile=/usr/local/etc/RSSI.dat
The path may differ depending on the image. In Pi-Star the file is looked up by default in /usr/local/etc/RSSI.dat, and the same in WPSD. After editing, restart MMDVMHost:
sudo systemctl start mmdvmhost
# или для Pi-Star:
sudo pistar-start
Check the log — an RSSI field in dBm should appear in the receive lines.
What changes on the DMRhub portal
The DMRhub portal receives the RSSI value from the hotspot as part of the metadata of every slot. After calibration, the signal level in dBm is shown next to each session in the last-heard section. This gives you a practical picture:
- Values of −50…−65 dBm — radio nearby, signal solid.
- Values of −80…−95 dBm — acceptable, but little margin.
- Values worse than −100 dBm — on the edge: elevated BER is likely, packet loss possible.
Common problems
- RSSI does not appear in the logs after adding the file — check that the path in MMDVM.ini is correct and that the file is accessible (chmod 644 /usr/local/etc/RSSI.dat).
- Values are clearly wrong (for example, −200 dBm) — the table does not cover the modem's real raw-value range; add the extreme points.
- MMDVMCal won't start — "port busy" — MMDVMHost is not stopped; make sure the service is really stopped (systemctl status mmdvmhost).
- The modem does not output RSSI at all — some boards (old DVMEGA) do not implement RSSI. Check the documentation for your specific board.
Want to see signal level in last-heard?
After RSSI calibration, the bars in the DMRhub last-heard become meaningful: you can see who is working with a solid signal and who is hanging on by a thread. Join the network — register and get your private DMR ID, build a hotspot image, and monitor link quality right from the portal.
Sources
- RSSI configuration wiki (N4IRS/MMDVM-Install) — github.com/N4IRS/MMDVM-Install
- MMDVM HS Hat: Enable RSSI.dat — mmdvmhshat.blogspot.com
- MMDVMHost sources, RSSI.dat file and examples in RSSI/ — github.com/g4klx/MMDVMHost
- STM32-DVM RSSI discussion — forum.pistar.uk