Documentation & Configuration Guide
Updated: June 23, 2025
Author: VE3RD (ve3zrd@gmail.com)
History:
- 2023-06-09: DMRGateway-5 Created
- 2024-03-10: Upgraded to DMRGateway-6
⚠️ IMPORTANT: READ EVERYTHING BEFORE DOING ANYTHING.
Overview & Key Features
This DMRGateway version adds critical filtering missing in the standard Pi-Star version. It provides an efficient method to handle 7-digit talk groups (TGs) and introduces the following stability enhancements:
- Network Locking: Locks a network to prevent other networks from bleeding through to your radio.
- Stop Arbitrary Switching: Prevents the hotspot from changing talk groups based on external network activity.
- TX Mode Protection: Stops the hotspot from going into TX mode due to unwanted network activity (which causes a busy light with no audio), ensuring you don’t miss traffic on your radio’s tuned TG.
The RawNet Parameter
A new parameter RawNet has been added to /etc/dmrgateway in the [General] section.
- RawNet=0: DMRGateway-6 will not assume any network is running in RAW Mode.
- RawNet=1 to 6: The designated network will be forced into Raw Mode, regardless of whether the rest of the DMRGateway is running in 7-digit or 8-digit mode.
Examples:
- If
GWMode=8andRawNet=4(Assuming Net4 = TGIF, Net5 = MNET):- Entering
31665routes to Net 4 (TGIF) via Raw Mode. - Entering
15031665routes to Net 5 (MNET) via 8-Digit Mode.
- Entering
- If
GWMode=7:- Entering
5031665routes to Net 5 (MNET) via 7-Digit Mode.
- Entering
Operational Modes
DMRGateway-6 runs in one of three distinct modes:
1. Raw Mode
- Function: Radio on
31665will pass31665straight to the server. Handles 7-digit talk groups out of the box. - Network Selection: Keying TG9001 to TG9006 selects and locks Network 1 through Network 6 (similar to OpenSpot profile selection).
2. 7-Digit Mode
- Function: The leftmost digit (1 through 7) selects and locks the corresponding network.
- Example:
4031665selects TG31665on Network 4. - Limitation: This mode WILL NOT handle 7-digit talk groups unless a raw mode network is mapped.
3. 8-Digit Mode
- Function: The leftmost two digits (11 to 16) select and lock the corresponding network (Network 1 to Network 6).
- Example:
14031665selects TG31665on Network 4. - 7-Digit Support: Handles all 7-digit talk groups via a rewrite rule:
TGRewrite1=2,1000001,2,1000001,899999
Special Commands & Limitations
- XLX Mode Activation: Sending TG9007 turns off all DMRGateway networks and enables XLX mode. Audio returns on TG6 (if enabled). Sending a standard 9001–9006, 7-digit, or 8-digit TG turns off XLX and reverts to the corresponding network mode.
- Network 6 Limitation: Network 6 has a hardware high-number limit. It only accepts values just under $2^{24}$ (16,777,216), translating to approximately
777200as the highest accessible talk group.
Installation & Updates
Fresh Installation / Upgrade from Legacy Version
Run the following commands in your terminal:
Bash
sudo su
rpi-rw
sudo git clone https://github.com/ve3zrd/DMRGateway-6
cd DMRGateway-6
./GWConfig.sh #
(Replace # with your HotSpot Number 0-9)
Updating an Existing DMRGateway-6 Installation
Run the following commands to pull the latest updates:
Bash
cd /home/pi-star/DMRGateway-6
rpi-rw
sudo su
git pull
make clean
make
make install
./GWConfig.sh #
(Replace # with your HotSpot Number 0-9)
Configuration Script Menu (GWConfig.sh)
When running the configuration script, you will be presented with the following options:
1Create/Edit the DMRGateway Password File(Mandatory for new installs). Creates/edits an offline repository for your network security codes to enable desired networks.2Install DMRGateway & Update/etc/dmrgateway– Basic ModeOverwrites the configuration with defaults, compiles a new binary if needed, and sets up Basic Mode (e.g., use31665in radio CPS, key9001–9006to switch networks). Handles 7-digit TGs.3Select Network for Raw/Basic Mode 0-6 (default=0)Selects a specific network to run in basic mode.0disables this feature. Handles 7-digit TGs via:TGRewrite1=2,1000001,2,1000001,55999994Install DMRGateway & Update/etc/dmrgateway– 8-Digit Translation ModeOverwrites configuration for 8-digit mode. (e.g., use14031665for TG 31665 on Network 4). Handles 7-digit TGs.5Install DMRGateway & Update/etc/dmrgateway– 7-Digit Translation ModeMatches default Pi-Star gateway layout (e.g.,4031665for Net 4). Does not support 7-digit TGs unless a raw mode network is assigned.6Install DMRGateway NO Config File UpdateCompiles and installs the new binary file without touching your existing configuration settings.7Restore Original DMRGateway Binary FileRestores the stock backup from/usr/local/bin/DMRGateway.origif available.8QuitExits the configuration script.
⚠️ CAUTION: This script cannot anticipate all unique configurations. Use
nano /etc/dmrgatewayto manually review and complete your setup.
Technical Appendix & Examples
Pi-Star Update Warning
Pi-Star updates regularly overwrite modified files. If an update overwrites your setup, re-run the GWConfig.sh script in the DMRGateway-6 directory to restore your functionality.
Typical Rewrite Rules (Network 5 in 8-Digit Mode)
Plaintext
TGRewrite0=2,15000001,2,1,999999 // TGs 15000001-15999999 -> 1-999999 (Max 6 digits)
TGRewrite1=2,1000001,2,1000001,899999 // Allows 7-digit TGs after locking via an 8-digit TG
PCRewrite0=2,15000001,2,1,999999
SrcRewrite0=2,1,2,VE3RD,9999999
Log Output Reference Example
Plaintext
I: Rewrite RF: 2:TG15000001-TG15999999 -> 2:TG1-TG999999
I: Rewrite Net: 2:TG1-TG999999 -> 2:TG15000001-TG15999999
I: Rewrite RF: 2:TG1000001-TG999999 -> 2:TG1000001-TG999999
I: Rewrite Net: 2:TG1000001-TG999999 -> 2:TG1000001-TG999999
I: Rewrite RF: 2:15000001-15999999 -> 2:1-999999
I: Rewrite Net: 2:1-9999999 -> 2:TG0
Author’s Personal 8-Digit Arrangement Example
- Net 1: BrandMeister (
11xx) - Net 2: DMR+ (
12xx) - Net 3: YSF2DMR (
13xx) - Net 4: TGIF (
14xx) - Net 5: MNET (
15xx) - Net 6: Not Used (
16xx)(Wherexx=000000. XLX is treated conceptually as Network 7).