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;

DMRGateway Configuration 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.

[General]

Option

Default

Description

RptAddress=<ip address>

127.0.0.1

Connect to this MMDVMHost instance. Typically this is 127.0.0.1 unless you’re running MMDVMHost on a different host.

RptPort=<port number>

62032

Connect to this port on the MMDVMHost instance.

LocalAddress=<ip address>

127.0.0.1

Use this local address for the connection. Typically this is 127.0.0.1 however if you are connecting to MMDVMHost on a different host, then you can use this to steer the connection out of a particular interface.

LocalPort=<port number>

62031

Use this local port for the connection. Make sure the specified port is not already in use.

RuleTrace=[0|1]

0

Enables tracing of rewrite rules into the logs. 0=False, 1=True.

Daemon=[0|1]

0

Run the DMRGateway program as a background daemon.

Debug=[0|1]

0

Enable additional debug logging.

RFTimeout=<integer>

10 Seconds

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>

10 Seconds

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 - Disabled

  • 1 - Debug

  • 2 - Message

  • 3 - Information

  • 4 - Warning

  • 5 - Error

  • 6 - Fatal

[Log]

Option

Default

Description

DisplayLevel=<integer>

0

Set the DMRGateway logging level emitted to the terminal. If DMRGateway is run as a daemon, then this is disabled.

FileLevel=<integer>

0

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=[0|1]

1 (Enabled)

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.

[Voice]

Option

Default

Description

Enabled=<integer>

1

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 /usr/local/etc/DMR_Audio.

[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.

[Info]

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>

0

Radio output power in watts. NOTE: This not used by DMRGateway. It is inserted for use by WPSD.

Latitude=<Signed decimal degrees>

0.0

The latitude of the station. This is specified in decimal degrees with a - prefix for north of the equator and no prefix for south of the equator. For example Canberra, Australia is at -35.28000.

Longitude=<Signed decimal degrees>

0.0

The longitude of the station. This is specified in decimal degrees with a - prefix for west of the International Reference Meridian (old Grenwich Meridian) and no prefix for east of the International Reference Meridian. For example Santiago, Chile is at -70.65047.

Height=<Height above MSL in meters>

0

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.

[XLX Network]

Option

Default

Description

Enabled=[0|1]

0

Enable the XLX linking functionality

Startup=<integer>

4000

Specifies the XLX server that will be automatically connected when the Relink timer expires. 4000 specifies do not link.

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 XLXHosts.txt.

Port=<port number>

62030

Remote port on the XLX server to connect to.

Local-<port number>

0

Local port number that the UDP packets will originate from. Must not be used by anything else. If 0 a random port will be used.

Password=<string>

passw0rd

A custom password for the XLX server you are connected to. Only needed if specified by the XLX server.

ReloadTime=<integer minutes>

60

Time in minutes for DMRGateway to reload the XLXHosts file.

Slot=[1|2]

2

DMR Slot to rx/tx XLX transmissions on.

TG=<integer talkgroup number>

8

This is the talkgroup number that you use to communicate with XLX reflectors. DMRGateway has a hardcoded default of 8, but in WPSD this is changed to 6 via the default configuration file. Communication on this talkgroup will be sent to the reflector, and where received audio appears.

Base=<integer>

84000 - Changed to 64000 in WPSD default configuration file

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 base+<reflector number> to connect to that reflector. ie. make a private call to 64301 (in default WPSD) to connect to XLX301.

Module=<char A-Z>

None - WPSD default configuration is E

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>

0 - WPSD default is 60 minutes.

This specifies how long DMRGateway will wait without RF or network traffic before reconnecting to the default reflector, if configured.

Debug=[0|1]

0

Enable extra debugging output in the DMRGateway log.

Id=<integer DMR ID>

0

What DMR Id to present to the XLX reflector. 0 pulls your DMR id from MMDVMHost.

UserControl=[0|1]

1

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.

[DMR Network x]

Option

Default

Description

Enabled=[0|1]

0

Enable connection to this DMR Network.

Address=<DMR master>

None

The DNS name of the DMR master.

Port=<integer port>

0

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>

"passw0rd"

Password required to access the remote DMR master.

Id=<DMR Id>

0

What DMR id you want to present this gateway as to the remote DMR network. A 0 pulls this DMR id from MMDVMHost.

WPSD_AutoRewrites=[0|1]

1

Custom DMR network automatic rewrite rules switch. If you turn it off (0), WPSD will not automatically adjust rewrite rules for the custom DMR network according to network prefixes. This is so that you can manually configure them in the mmdvmhost configuration file without the web configuration overwriting them. This only applies to the Custom DMR Network.

Debug=[0|1]

0

Enable additional logging.

Location=[0|1]

1

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>

None

A nice readable name for this DMR network for display in logs and on the dashboard.

Options=<quoted string>

None

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>

0

Defines the local port to be used for outbound connections. 0 means a random port.

[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.

[GPSD]

Option

Default

Description

Enable=[0|1]

0

Enable calling a GPSD server for location.

Address=<IP Address>

None

The IP Address of the GPSD server.

Port=<integer port>

None

What port the GPSD Server is listening on. This is typically 2947.

[APRS]

This section configures DMRGateway to send APRS position and status updates to the specified APRS-IS server.

[APRS]

Option

Default

Description

Enable=[0|1]

0

Enable APRS status updates.

Address=<IP Address>

None

IP Address of the APRS-IS Server

Port=<integer port>

None

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 - must be 9 characters or less in length. Typical use for a DMR station would be D. See the APRS SSID Specification

Description=<String>

None

A small text description to send to APRS

Symbol=”<String>”

None

The APRS Symbol to display on your station. This is a complex topic documented on the APRS Symbol Page. WPSD defaults to "Wi".

[Dynamic TG Control]

This section configures a UDP port to receive control messages to manage dynamic TG rewrites.

[Dynamic TG Control]

Option

Default

Description

Enabled=[0|1]

0

Enable Dynamic TG Control

Port=<integer port>

3769

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.

[Remote Control]

Option

Default

Description

Enable=[0|1]

0

Enable Remote Control functionality.

Port=<integer port>

0

UDP port to listen on.

Address=<IP Address>

127.0.0.1

IP Address to bind the UDP socket to.