DMRGateway Configuration File¶
DMRGateway allows for the connection of up to 6 different DMR networks to one MMDVM system. One of the networks is defined as being an XLX reflector, while the other five may be any combination of DMR+, BrandMeister, TGIF, or local HBLink systems.
The software uses rewriting rules in each DMR network definition to remap talkgroup numbers for each network into a single number range so all the enabled networks are presented to the DMR client radio as if they were all in a single network. These rewriting rules are documented in the chapter DMRGateway Rewrite Rules.
This chapter looks at all the other options in the DMRGateway file.
Let’s start by looking at a complete DMRGateway file;
[General]
RptAddress=127.0.0.1
RptPort=62032
LocalAddress=127.0.0.1
LocalPort=62031
RuleTrace=0
Daemon=1
Debug=0
RFTimeout=20
NetTimeout=20
Suffix=R
[Log]
DisplayLevel=0
FileLevel=1
FilePath=/var/log/pi-star
FileRoot=DMRGateway
[Voice]
Enabled=1
Language=en_US
Directory=/usr/local/etc/DMR_Audio
[Info]
Enabled=0
RXFrequency=431150000
TXFrequency=431150000
Power=1
Latitude=0.0
Longitude=0.0
Height=0
Location="Town, L0C4T0R"
Description="Country"
URL=https://w0chp.radio
[XLX Network]
Enabled=0
Startup=493
File=/usr/local/etc/XLXHosts.txt
Port=62030
Password=passw0rd
ReloadTime=60
Slot=2
TG=6
Base=64000
Relink=60
Debug=0
Id=1234567
UserControl=1
Module=E
[DMR Network 1]
Enabled=0
Address=3102.master.brandmeister.network
Port=62031
TGRewrite0=2,9,2,9,1
PCRewrite0=2,94000,2,4000,1001
TypeRewrite0=2,9990,2,9990
SrcRewrite0=2,4000,2,9,1001
PassAllPC0=1
PassAllTG0=1
PassAllPC1=2
PassAllTG1=2
Password="passw0rd"
Id=1234567
Debug=0
Location=1
Name=BM_3102_United_States
[DMR Network 2]
Enabled=0
Address=usacentral.ddns.net
Port=62031
TGRewrite0=2,8,2,9,1
PCRewrite0=2,84000,2,4000,1001
Password="passw0rd"
Id=1234567
Debug=0
Location=0
Name=FreeDMR_USA-Central
PCRewrite1=1,8009990,1,9990,1
PCRewrite2=2,8009990,2,9990,1
PCRewrite3=1,4000001,1,1,999999
PCRewrite4=2,4000001,2,1,999999
TypeRewrite1=1,8009990,1,9990
TypeRewrite2=2,8009990,2,9990
TGRewrite1=1,8000001,1,1,999999
TGRewrite2=2,8000001,2,1,999999
SrcRewrite1=1,9990,1,8009990,1
SrcRewrite2=2,9990,2,8009990,1
SrcRewrite3=1,1,1,8000001,999999
SrcRewrite4=2,1,2,8000001,999999
[DMR Network 3]
Enabled=0
Name=HBLink
Address=1.2.3.4
Port=5555
TGRewrite=2,11,2,11,1
Password="PASSWORD"
Location=0
Debug=0
#Id=specific_id
TGRewrite0=2,11,2,11,1
[DMR Network 4]
Enabled=0
Address=tgif.network
Port=62031
PCRewrite0=1,4009990,1,9990,1
PCRewrite1=2,4009990,2,9990,1
TypeRewrite0=1,4009990,1,9990
TypeRewrite1=2,4009990,2,9990
TGRewrite0=1,4000001,1,1,999999
TGRewrite1=2,4000001,2,1,999999
SrcRewrite0=1,9990,1,4009990,1
SrcRewrite1=2,9990,2,4009990,1
SrcRewrite2=1,1,1,4000001,999999
SrcRewrite3=2,1,2,4000001,999999
Password="passw0rd"
Location=1
Name=TGIF_Network
Debug=0
[DMR Network 5]
#Id=specific_id
Address=dmr.freestar.network
Password="passw0rd"
Port=62031
Name=SystemX_United_Kingdom
TGRewrite0=2,4,2,9,1
PCRewrite0=2,44000,2,4000,1001
PCRewrite1=1,4009990,1,9990,1
PCRewrite2=2,4009990,2,9990,1
TypeRewrite1=1,4009990,1,9990
TypeRewrite2=2,4009990,2,9990
TGRewrite1=1,4000001,1,1,999999
TGRewrite2=2,4000001,2,1,999999
SrcRewrite1=1,9990,1,4009990,1
SrcRewrite2=2,9990,2,4009990,1
SrcRewrite3=1,1,1,4000001,999999
SrcRewrite4=2,1,2,4000001,999999
Options="RelinkTime=30;UserLink=1;TS1_1=2350;"
Enabled=1
Location=0
Debug=0
PCRewrite3=1,4000001,1,1,999999
PCRewrite4=2,4000001,2,1,999999
[DMR Network Custom]
#Id=specific_id
Enabled=0
WPSD_AutoRewrites=1
Name=W0CHP_DMR
Address=urf493.w0chp.radio
Port=62030
Password="passw0rd"
TGRewrite0=2,11,2,9,1
TGRewrite1=1,9000001,1,1,999999
TGRewrite2=2,9000001,2,1,999999
PCRewrite0=2,94000,2,4000,1001
PCRewrite1=1,9000001,1,1,999999
PCRewrite2=2,9000001,2,1,999999
TypeRewrite1=1,9009990,1,9990
TypeRewrite2=2,9009990,2,9990
SrcRewrite1=1,1,1,9000001,999999
SrcRewrite2=2,1,2,9000001,999999
Location=0
Debug=0
[GPSD]
Enable=0
Address=127.0.0.1
Port=2947
[APRS]
Enable=0
Address=127.0.0.1
Port=8673
Suffix=D
Description=APRS for DMRGateway
Symbol="Wi"
[Dynamic TG Control]
Enabled=1
Port=3769
[Remote Control]
Enable=1
Port=7643
Address=127.0.0.1
[DMR Network 5]
Location=0
Debug=0
Id=1234567
Address=usa.freestar.network
Password="passw0rd"
Port=62031
Name=SystemX_United_States
TGRewrite0=2,4,2,9,1
PCRewrite0=2,44000,2,4000,1001
PCRewrite1=1,4009990,1,9990,1
PCRewrite2=2,4009990,2,9990,1
PCRewrite3=1,4000001,1,1,999999
PCRewrite4=2,4000001,2,1,999999
TypeRewrite1=1,4009990,1,9990
TypeRewrite2=2,4009990,2,9990
TGRewrite1=1,4000001,1,1,999999
TGRewrite2=2,4000001,2,1,999999
SrcRewrite1=1,9990,1,4009990,1
SrcRewrite2=2,9990,2,4009990,1
SrcRewrite3=1,1,1,4000001,999999
SrcRewrite4=2,1,2,4000001,999999
Enabled=0
DMRGatewway Sections¶
The DMRGateway configuration file is an ini style file with defined sections configuring various program options. The sections are;
[General]¶
This section configures global DMRGateway options.
Option |
Default |
Description |
|---|---|---|
RptAddress=<ip address> |
|
Connect to this MMDVMHost instance. Typically this is |
RptPort=<port number> |
|
Connect to this port on the MMDVMHost instance. |
LocalAddress=<ip address> |
|
Use this local address for the connection. Typically this is |
LocalPort=<port number> |
|
Use this local port for the connection. Make sure the specified port is not already in use. |
RuleTrace=[0|1] |
|
Enables tracing of rewrite rules into the logs. 0=False, 1=True. |
Daemon=[0|1] |
|
Run the DMRGateway program as a background daemon. |
Debug=[0|1] |
|
Enable additional debug logging. |
RFTimeout=<integer> |
|
When the user initiates traffic, the timeslot involved is solely linked to that DMR Network for a small period of time. This stops other DMR networks interfering with the conversation. These options configure how long that slot is linked to that DMR network based on where the last transmission came from. |
NetTimeout=<integer> |
|
When the traffic comes in via a DMR network (Net) the timeslot involved is solely linked to that DMR Network for a small period of time. This stops other DMR networks interfering with the conversation. These options configure how long that slot is linked to that DMR network based on where the last transmission came from. |
[Log]¶
This section defines general logging options for the DMRGateway daemon.
The logging levels are;
0- Disabled1- Debug2- Message3- Information4- Warning5- Error6- Fatal
Option |
Default |
Description |
|---|---|---|
DisplayLevel=<integer> |
|
Set the DMRGateway logging level emitted to the terminal. If DMRGateway is run as a daemon, then this is disabled. |
FileLevel=<integer> |
|
Set DMRGateway logging level for logging to the logfile. |
FilePath=<file path> |
None |
Set the directory where logfiles will be stored. |
FileRoot=<string> |
None |
Set the first part of the filename for the log. The filename will be <FilePath>/<FileRoot>-YYYY-mm-dd.log if FileRotate below is true, or just the FileRoot if false. |
FileRotate= |
|
Enables DMRGateway to rotate the logfiles each day. |
[Voice]¶
This section enables over-the-air voice prompts and selects which language from the available pre-encoded ambe files to use.
Option |
Default |
Description |
|---|---|---|
Enabled=<integer> |
|
Enable prompts. |
Language=<Language> |
en_GB |
Which language to use. These are in in ISO Language format, but there are currently only 11 languages with a corresponding ambe prompt file. Look in the directory listed below for the current ones. NOTE: While DMRGateway itself defaults to en_GB, WPSD overrides this default to en_US. |
Directory=<file path> |
None |
Where the ambe prompt files and there associated indexes reside. In WPSD this is usually |
[Info]¶
Some station information. This information is only used to send updates to APRS-IS if that facility is enabled. It is not used for anything else.
Option |
Default |
Description |
|---|---|---|
RXFrequency=<Frequency in Hertz> |
None |
What frequency, in Hz, where the radio is listening. NOTE: This not used by DMRGateway. It is inserted for use by WPSD. |
TXFrequency=<Frequency in Hertz> |
None |
What frequency, in Hz, where the radio is transmitting. NOTE: This not used by DMRGateway. It is inserted for use by WPSD. |
Power=<integer> |
|
Radio output power in watts. NOTE: This not used by DMRGateway. It is inserted for use by WPSD. |
Latitude=<Signed decimal degrees> |
|
The latitude of the station. This is specified in decimal degrees with a |
Longitude=<Signed decimal degrees> |
|
The longitude of the station. This is specified in decimal degrees with a |
Height=<Height above MSL in meters> |
|
Station height above Mean Sea Level in meters. |
Location=”<string>” |
None |
A short free text string identifying where you are. |
Description=”<string>” |
None |
A short free text string describing your station. |
URL=<URL> |
None |
A pointer to your station website. |
[XLX Network]¶
This section configures connections into the XLX reflector network.
Option |
Default |
Description |
|---|---|---|
Enabled= |
|
Enable the XLX linking functionality |
Startup=<integer> |
|
Specifies the XLX server that will be automatically connected when the |
File=<filename> |
None |
This file contains the mapping of XLX reflectors to their IPv4 address. It is updated regularly by WPSD. While there is no default in the software, by convention this filename is |
Port=<port number> |
|
Remote port on the XLX server to connect to. |
Local-<port number> |
|
Local port number that the UDP packets will originate from. Must not be used by anything else. If |
Password=<string> |
|
A custom password for the XLX server you are connected to. Only needed if specified by the XLX server. |
ReloadTime=<integer minutes> |
|
Time in minutes for DMRGateway to reload the XLXHosts file. |
Slot= |
|
DMR Slot to rx/tx XLX transmissions on. |
TG=<integer talkgroup number> |
|
This is the talkgroup number that you use to communicate with XLX reflectors. DMRGateway has a hardcoded default of |
Base=<integer> |
|
This is the base private call number used for controlling DMRGateway to connect or disconnect from a reflector. To use it, make a private call to the base (ie 84000 in this example.) to disconnect from the current reflector. Make a private call to the |
Module=<char A-Z> |
|
XLX reflectors can have up to 26 separate modules, each appears like a different “channel”. This specifies which module to connect to when the XLX reflector is linked automatically. |
Relink=<integer minutes> |
|
This specifies how long DMRGateway will wait without RF or network traffic before reconnecting to the default reflector, if configured. |
Debug= |
|
Enable extra debugging output in the DMRGateway log. |
Id=<integer DMR ID> |
|
What DMR Id to present to the XLX reflector. |
UserControl= |
|
Allow users to control XLX linking from the radio side. |
[DMR Network x]¶
This section configures connections into multiple DMR networks. DMRGateway supports connection to up to 5 DMR networks at the same time. Rewrite rules map talkgroups (group calls) and private calls into a single talkgroup range so all of these networks appear like a single network to the radio client.
The x in the section header are the numbers 1 to 5 or the word Custom. Each section is mostly identical apart from that labelling, so will be described below only once with any differences identified.
Option |
Default |
Description |
|---|---|---|
Enabled= |
|
Enable connection to this DMR Network. |
Address=<DMR master> |
|
The DNS name of the DMR master. |
Port=<integer port> |
|
The port on the destination DMR master for the connection. |
Rewrite Rules |
Put the rewrite rules here that modify talkgroups and private calls as they transit DMRGateway. These are complex and are covered in a separate chapter DMRGateway Rewrite Rules. |
|
Password=<string> |
|
Password required to access the remote DMR master. |
Id=<DMR Id> |
|
What DMR id you want to present this gateway as to the remote DMR network. A |
WPSD_AutoRewrites= |
|
Custom DMR network automatic rewrite rules switch. If you turn it off ( |
Debug= |
|
Enable additional logging. |
Location= |
|
This enables sending the location field of the hotspot to the DMR master via the MMDVM protocol. Some DMR networks may use this to update an APRS location, others don’t. This is completely seperate to any radio based location provided by radio clients. |
Name=<string> |
|
A nice readable name for this DMR network for display in logs and on the dashboard. |
Options=<quoted string> |
|
A line of options to send to the DMR Master. This is dependant on the particular DMR network to which you are connecting, so check with them to configure this properly. |
Local=<integer port> |
|
Defines the local port to be used for outbound connections. |
[GPSD]¶
This section configures DMRGateway to obtain the location of the DMRGateway host via a network connection to a GPSD server. This will then be used instead of the latitude and longitude specified in the [INFO] section.
Option |
Default |
Description |
|---|---|---|
Enable= |
|
Enable calling a GPSD server for location. |
Address=<IP Address> |
|
The IP Address of the GPSD server. |
Port=<integer port> |
|
What port the GPSD Server is listening on. This is typically |
[APRS]¶
This section configures DMRGateway to send APRS position and status updates to the specified APRS-IS server.
Option |
Default |
Description |
|---|---|---|
Enable= |
|
Enable APRS status updates. |
Address=<IP Address> |
|
IP Address of the APRS-IS Server |
Port=<integer port> |
|
Port on the APRS-IS server. |
Suffix=<string> |
|
A small string providing the callsign suffix. Originally this was the SSID from the AX.25 packet and so was limited to the numbers 0-15, but this AX.25 limitation doesn’t apply here. You can use any simple string, but this string, your callsign, and a dash |
Description=<String> |
|
A small text description to send to APRS |
Symbol=”<String>” |
|
The APRS Symbol to display on your station. This is a complex topic documented on the APRS Symbol Page. WPSD defaults to |
[Dynamic TG Control]¶
This section configures a UDP port to receive control messages to manage dynamic TG rewrites.
Option |
Default |
Description |
|---|---|---|
Enabled= |
|
Enable Dynamic TG Control |
Port=<integer port> |
|
UDP port for recieving control messages. |
[Remote Control]¶
This section configures a UDP port to receive control messages to provide some remote control capabilites for DMRGateway.
Option |
Default |
Description |
|---|---|---|
Enable= |
|
Enable Remote Control functionality. |
Port=<integer port> |
|
UDP port to listen on. |
Address=<IP Address> |
|
IP Address to bind the UDP socket to. |