DMRGateway Rewrite Rules¶
Different DMR networks typically have talkgroup numbers that overlap. WPSD is currently designed for Brandmeister to be the primary DMR network and alternate networks, when enabled, are accessed via different prefixes.
If this configuration doesn’t suit you then you will need to manually configure the rewrite rules in the DMRGateway file. The easiest way is to use the Full Editors menu in the Advanced section of the web interface.
Important
Making any change in the main Configuration page will overwrite any changes you have made to the DMRGateway file itself. You can either take a copy of the file and store it elsewhere, or use the Profiles feature to recover.
Tip
This page is taken almost completely from Jonathan Naylor’s documentation on Github. If a command below doesn’t seem to be working as it should, it might be worth checking out his page to see if things have changed.
DMRGateway File¶
The DMRGateway file contains all the configuration for connecting the hotspot/controller to one or more DMR networks. This section of the documentation is concerned solely with the part of the configuration file that manages rewriting talkgroup and private call numbers on-the-fly to allow a correctly programmed radio to access multiple networks simply by selecting the right talkgroup or private call number.
General Usage¶
DMR Gateway will only pass traffic to the different networks if it’s referenced in a rewrite rule in the .ini file.
TGRewrite¶
TGRewrite allows you to translate one talk group ID to another, and to alter the time slot. TGRewrite can also be used to route a talk group and slot combination to a particular network. ‘from’ applies to DMR frames entering the Gateway via MMDVMHost (RF), and ‘to’ is where they are routed on the network side (Net). The rules apply to DMR frames traversing the gateway in both directions.
Syntax¶
TGRewrite=fromSlot,fromTG,toSlot,toTG,range
Examples¶
The rule below will translate a group call to talk group talk group 8 to talk group 9 on DMR Network 1.
[DMR Network 1]
# Reflector TG on to slot 2 TG8
TGRewrite=2,8,2,9,1
The rules below will route a group call to 9990 on time slot 1 to DMR Network 1, and a group call to 9990 on time slot 2 to DMR Network 2.
[DMR Network 1]
# Echo on slot 1 TG9990
TGRewrite=1,9990,2,9990,1
[DMR Network 2]
# Echo on slot 2 TG9990
TGRewrite=2,9990,2,9990,1
PCRewrite¶
This is almost identical to the TGRewrite except it only operates on private calls. PCRewrite can be used to add a prefix on a private call to a reflector to ‘steer’ them to a particular network. The prefix will then be removed before being routed to the DMR network. This rule only works on DMR frames passing from the RF side to the network.
Typically used to remap reflector control calls to a different local range to avoid clashes, and for permitting GPS position reports and private calls to a particular network.
Syntax¶
PCRewrite=fromSlot,fromId,toSlot,toId,range
Examples¶
The rules below will route any private calls on time slot 2 in the range 94000 - 95000 to 4000 - 5000 on DMR Network 1, and the range 84000 - 85000 to 4000 - 5000 on DMR Network 2.
[DMR Network 1]
# Reflector control command slot 2 94000->4000 to 95000->5000
PCRewrite=2,94000,2,4000,1001
[DMR Network 2]
# Reflector control command slot 2 84000->4000 to 85000->5000
PCRewrite=2,84000,2,4000,1001
SrcRewrite¶
SrcRewrite will rewrite the source/from Talk Group ID to another ID.
Syntax¶
SrcRewrite=fromSlot,fromId,toSlot,toTG,range
Examples¶
The rule below will rewrite calls from 4000-5000 on DMR Network 1, to talk group 9 on slot 2. This is useful for ensuring reflector announcements are heard on talk group 9. This rule only works on DMR frames passing from the network side to the RF side.
[DMR Network 1]
# Reflector status returns
SrcRewrite=2,4000,2,9,1001
TypeRewrite¶
TypeRewrite maps a group call to a private call. This rule only works on DMR frames passing from the RF side to the network side.
Syntax¶
TypeRewrite==fromSlot,fromId,toSlot,toId
Example¶
The rules below translate a group call to 9990 on slot 1, to a private call on DMR Network 1. The SrcRewrite rule then allows the reply to traverse the gateway.
This could be used for converting Brandmeister’s private call echo service to a group call method like DMR+, to make the usage more uniform across the networks.
[DMR Network 1]
# Echo on RF slot 1 TG9990 to network slot 1 9990
TypeRewrite=1,9990,1,9990
SrcRewrite=1,9990,1,9990,1
PassAllTG¶
Passes all talk groups without specific matching rules, and can only be used on a single DMR network. The rules apply to DMR frames traversing the gateway in both directions.
Syntax¶
PassAllTG=Slot
Example¶
The rules below allow group calls to traverse from DMR network 2 to either time slot on the RF side.
[DMR Network 2]
# Pass all of the other talk group traffic on slot 1 and slot 2
PassAllTG=1
PassAllTG=2
PassAllPC¶
Passes all private calls without specific rules, and can only be used on a single DMR network. The rules apply to DMR frames traversing the gateway in both directions.
Syntax¶
PassAllPC=Slot
Example¶
The rules below allow private calls to traverse from DMR network 2 to either time slot on the RF side.
[DMR Network 2]
# Pass all of the other private traffic on slot 1 and slot 2
PassAllPC=1
PassAllPC=2
TGDynRewrite¶
This is designed to handle dynamic talkgroups on the one particular network and may be of limited use on other networks.
The aim is for a group of dynamic talk groups can be mapped to a single talk group, along with voice acknowledgements and control over which one is being used.
Syntax¶
TGDynRewrite=slot,start TG,disconnect TG,status TG,comms TG,Number of TGs
Example¶
TGDynRewrite=2,23500,4000,5000,9,100
The 2 means using slot 2 for all of the following talk groups and private calls. The 23500 is the first of the dynamic talk groups, and the 100 at the end is the number of talk groups from that number to use. This maps talk groups 23500 to 23599 in this example. These are triggered by sending a private call to the desired talk group number. This cases a spoken confirmation to be transmitted. 4000 is the private call number to disconnect the dynamic talk group. This causes a spoken confirmation to be transmitted. 5000 is the private call number to cause the current talk group mapping information to be spoken. 9 is the talk group to be used for all communications to the selected dynamic talk group, as well as the voice messages.
The reason for using private calls is the ability of many radios to have front panel programming so the dynamic talk group numbers can be done manually or programmed on your radio.
IdRewrite¶
This rewrites the DMR Id of the radio on the RF side to a different DMR Id when passed to the network, and converts it back on Network to RF traffic.
This could be used to have a single DMR Id programmed into your radio, but present a different DMR Id to a connected network.
Syntax¶
IdRewrite=RFId,NetworkID
Example¶
IdRewrite=5059876,1001234
This would rewrite DMR Id 5059876, as programmed into your radio, into DMR Id 1011234 which is what the upstream network would see.