MMDVMCal step by step: calibrating an MMDVM modem

Category: CalibrationDifficulty: ★★★~11 min

MMDVM hotspots built on MMDVM_HS (ZUMspot, HS_Hat, SkyBridge and the like) use a cheap TCXO that easily drifts hundreds of hertz off its nominal frequency. For voice this is almost unnoticeable, but for data and SMS even 100–300 Hz of offset can cause decoding errors and packet loss. MMDVMCal is the official interactive utility from the author of MMDVM (G4KLX); it lets you find the modem's exact operating frequency, measure BER and set TX/RX levels — all straight from the command line, without editing config files by hand.

What MMDVMCal is and how it works

MMDVMCal is a standalone program (repository g4klx/MMDVMCal) that talks directly to the modem over the serial port. While the utility is running, MMDVMHost must be stopped — the two cannot use the same port at the same time.

On Pi-Star and RadioStar this is handled automatically by the launch command. Control is keyboard-only: each key instantly changes a parameter or switches a mode. On exit (Q) the program prints the final offset values.

Important note about MMDVMHost During calibration MMDVMHost is stopped. The hotspot does not serve the air. After you exit MMDVMCal the service comes back up automatically (on Pi-Star/RadioStar) or manually.

Launching the utility

On Pi-Star and compatible images (including RadioStar) you use a wrapper:

sudo pistar-mmdvmcal

It stops MMDVMHost itself, launches MMDVMCal with the right port and config, and restores the service after you exit. On a "bare" Raspberry Pi without Pi-Star, launching looks like this:

sudo systemctl stop mmdvmhost
MMDVMCal /etc/MMDVM.ini

After launch you will see a prompt like this:

MMDVMCal (20231015) by G4KLX
H/h=help, Q/q=quit ...

MMDVMCal key reference

The program is controlled by single keypresses. The main keys:

Case matters Uppercase F raises the frequency, lowercase f lowers it. The same goes for T/t and R/r. Make sure Caps Lock is off.

Step 1: set the operating frequency

Before you start, you need to tell MMDVMCal which frequency your hotspot runs on. Press E and the utility will ask you to enter a frequency in Hz. Enter your hotspot's frequency as a whole number, without dots or spaces:

E
Enter frequency (Hz): 434250000

For the 70 cm band (430–440 MHz), typical hotspot values fall in the range 430000000440000000. For 2 m (144–146 MHz), accordingly.

Frequencies and the law in Russia In Russia the 70 cm amateur band is 430–440 MHz and the 2 m band is 144–146 MHz. The LPD band (433.075–434.775 MHz) and PMR (446 MHz) are not amateur and are technically unsuitable for a DMR hotspot. Operate within the limits of your issued license.

Step 2: BER test and frequency tuning

This is the key stage. The goal is to find the frequency at which the modem decodes your signal with the lowest BER.

  1. Press b to enter DMR Simplex BER Test mode (FEC).
  2. Transmit a short phrase from the radio (or just press PTT and hold it for a few seconds). The utility will show the BER of the last transmission.
  3. Press Z and set the step, for example 25 (Hz) — handy for fine tuning.
  4. Press F (frequency up) several times, transmitting from the radio each time and watching the BER. Keep going until the BER starts to rise or the signal disappears.
  5. Note the outermost "live" frequency. Go back with f, sweep the other direction and find the second limit.
  6. The optimal operating point is the midpoint between the two limits. That is where the BER will be at its minimum.

BER guidelines for DMR Simplex:

A real example On a 434.250 MHz hotspot, after calibration the optimal point turned out to be 434250275 Hz — an offset of +275 Hz. The BER dropped from 3.5 % to 0.09 %. For cheap MMDVM_HS boards, offsets of 100–500 Hz are normal; sometimes you even see ±1–2 kHz.

Step 3: record the final RXOffset

Once you have found the optimal frequency, press Q to quit. The utility will print a line like this:

Frequency: 434250275 Hz  Offset: +275 Hz
TXLevel: 50  RXLevel: 50

The Offset value is your RXOffset (and usually TXOffset). It needs to be entered into the MMDVMHost configuration.

On Pi-Star: "Admin" → "Expert" → "MMDVMHost" → the [Modem] section:

[Modem]
RXOffset=275
TXOffset=275

On RadioStar (our image): the offset is entered directly through the device's web panel — the "Modem" tab → the RX Offset / TX Offset fields. You don't need to restart the service manually; the panel does it for you.

RXOffset and TXOffset are different parameters RXOffset corrects the modem's receive frequency (what you just measured). TXOffset shifts the transmit frequency. On cheap MMDVM_HS boards the two are most often identical, but that is not mandatory — the radio may have its own transmitter offset.

Step 4: calibrating TXLevel and RXLevel

Deviation levels affect signal quality. The correct deviation for DMR is 2.75 kHz.

TXLevel (the hotspot's transmit level to the air):

RXLevel (the modem's receive sensitivity):

Without an oscilloscope Most hams get by without one. Leave TXLevel = 50, calibrate the frequency by BER — that covers 95% of cases. An oscilloscope is needed when building a repeater or finely tuning a multimode node.

How calibration works in the RadioStar image

The ready-made RadioStar image for Raspberry Pi includes a BER sweep right from the web panel: the device itself sweeps a range of frequencies around the nominal value and finds the point of minimum BER, with no manual stepping through keys. This is convenient if you have no physical access to SSH or want to re-run the calibration after changing radios.

The sweep result is written to RXOffset automatically. If needed, the value can be adjusted manually on the same "Modem" page.

Common mistakes and how to avoid them

Calibration is the foundation of reliable operation on the network

A precisely calibrated hotspot means stable reception of SMS, data and voice on the DMRhub network. If you don't have an image yet — build a hotspot on a Raspberry Pi in half an hour: the RadioStar image includes a web panel with a BER sweep, so manually stepping the frequency over SSH isn't needed.

Sources

  1. MMDVMCal — official repository (G4KLX) — github.com/g4klx/MMDVMCal
  2. Getting the best BER from your Pi-Star MMDVM (M1GEO, George Smart) — george-smart.co.uk
  3. MMDVMCal DVM Calibration (VK4PK) — lyonscomputer.com.au
  4. Hotspot Offset Calibration (K9NPX) — k9npx.com