In order to learn more about how DMR works, I set about trying to implement my own server. I first looked at Brandmeister and Phoenix, could I download and run my own? No, they are closed systems.

Searching around I came across HBLink3. I found lots of references to it and even a few forks.

I quickly set up a simple bridge in a docker container, and was able to handle a conversation. I invited a few other people on play as well, and quickly discovered that all traffic was sent to all peers (Pi-stars) registered. This turns out to be by design. Building from scratch

After further looking around I decided that I might be better off writing my own system. I had a few basic requirements

  • Small
  • compiled code for performance
  • minimum additional packages required
  • Run in docker containers
  • carry multiple concurrent calls directing traffic to required hotspots only
  • Authenticated hotspots only
  • Only pass traffic for known DMRIDs
  • Unlimited Talkgroups
  • ACL (Access Control List) to manage access to Talkgroups

I chose to use “Golang”. I Read through the tutorial in the morning and started writing the server in the afternoon. In all it took 2.5 days to write the basic DMR handling service and hook it into the management portal. Design

Using Ruby on Rails for the GUI was again a simple choice, it provided for a rapid development, testing and deployment.


title RAYNET DMR Server

package "Cronjobs" {
  [Peer Down Check]

package "Management" {
  [Rails App]

package "DMR Server" {

package "Help" {
  [help docs]

package "YSF Room" {

database "MySQL" {

package "Redis" {

HTTPS <--> [db]
[db]  <--> [GUI]
[server] <--> [API]

HTTPS <-- [YSFDashboard]
HTTPS <-- [help docs]

[GUI] <--> [Rails App]
[API] <--> [Rails App]

[Rails App] <--> [database]

[backup] <-- [database]

[dmrid-sync] --> [database]
[repeater-sync] --> [database]

[YSF2DMR] <--> [server] : TG 5023531

YSF <--> [YSFReflector] : UDP 42000
[YSFReflector] <--> [YSF2DMR]
[YSFDashboard] <-- [YSFReflector]

Hotspot <--> [server] : UDP 62030

[Peer Down Check] --> [Rails App]

@enduml Management Portal

Allowing multiple talkgroups is just the start, next is to provide a management interface for

  • Registration
  • Secure access
  • See talkgroups
  • Set and unset static Talkgroups
  • Define who can access which talkgroups
  • Monitor talkgroup activity

I plan to use Ruby on Rails to build this side, with either mysql or CockroachDB. Mysql is simple to run, but doesn’t scale too well. CockroachDB works well inside docker containers, and can scale very large if necessary. As this system will handle queries for every conversation start it’s important that it responds quickly.