HKL's Notes
Cares C.V. · Linkedin · Github


Building and Running MMDVMHost + DMRGateway (2026) on Windows

By , on , tagged: ๐Ÿท๏ธProgramming  ๐Ÿท๏ธRadio 

Native MSYS2 Build + Modern BrandMeister Setup Guide

Introduction

If you are running a personal DMR hotspot on Windows, modern versions of MMDVMHost (2026) no longer behave reliably with direct BrandMeister connections.

The recommended architecture is now:

Radio / Hotspot
      โ†“
  MMDVMHost
      โ†“
  DMRGateway
      โ†“
 BrandMeister

This guide combines:

and shows how to:

โœ… Compile from source on Windows โœ… Build standalone .exe binaries โœ… Connect successfully to BrandMeister โœ… Use OpenGD77 hotspot hardware โœ… Run latest 2026 versions stably


Why Use DMRGateway in 2026?

Older MMDVMHost versions could connect directly to BrandMeister.

Modern builds increasingly expect:

So instead of:

MMDVMHost โ†’ BrandMeister

Use:

MMDVMHost โ†’ DMRGateway โ†’ BrandMeister

Part 1 โ€“ Build on Windows (MSYS2 UCRT64)


Step 1 โ€“ Install MSYS2

Download:

๐Ÿ‘‰ https://www.msys2.org/

Install 64-bit version.

Then open:

MSYS2 UCRT64 Shell

Step 2 โ€“ Install Required Packages

pacman -Syu
pacman -Su

pacman -S --needed base-devel mingw-w64-ucrt-x86_64-toolchain git
pacman -S mingw-w64-ucrt-x86_64-libmosquitto
pacman -S mingw-w64-ucrt-x86_64-nlohmann-json
pacman -S mingw-w64-ucrt-x86_64-openssl
pacman -S mingw-w64-ucrt-x86_64-libserialport

Step 3 โ€“ Clone Source Code

cd /d/workspace

git clone https://github.com/g4klx/MMDVMHost.git
git clone https://github.com/g4klx/DMRGateway.git

Step 4 โ€“ Patch Makefiles for Windows

Both projects need:


MMDVMHost

cd /d/workspace/MMDVMHost

sed -i 's/-lutil //' Makefile
sed -i 's/LIBS    = -lpthread -lmosquitto/LIBS    = -lpthread -lmosquitto -lws2_32 -liphlpapi/' Makefile

DMRGateway

cd /d/workspace/DMRGateway

sed -i 's/-lutil //' Makefile
sed -i 's/LIBS    = -lpthread -lmosquitto/LIBS    = -lpthread -lmosquitto -lws2_32 -liphlpapi/' Makefile

Step 5 โ€“ Compile

cd /d/workspace/MMDVMHost
make clean
make -j$(nproc)

cd /d/workspace/DMRGateway
make clean
make -j$(nproc)

Part 2 โ€“ Make Standalone Windows EXE

Copy runtime DLLs beside each EXE:

cp /ucrt64/bin/libgcc_s_seh-1.dll .
cp /ucrt64/bin/libstdc++-6.dll .
cp /ucrt64/bin/libwinpthread-1.dll .
cp /ucrt64/bin/libmosquitto.dll .
cp /ucrt64/bin/libssl-3-x64.dll .
cp /ucrt64/bin/libcrypto-3-x64.dll .

Now they run in:


Part 3 โ€“ Install MQTT Broker

Modern builds require MQTT support.

Install Mosquitto:

๐Ÿ‘‰ https://mosquitto.org/download/

Run:

mosquitto.exe

Part 4 โ€“ Configure MMDVMHost

MMDVMHost.ini

[General]
Callsign=BG7KUH
Id=4615604
Duplex=0

[Modem]
Protocol=uart
UARTPort=\\.\COM8
UARTSpeed=115200

[DMR]
Enable=1
Id=461560401
ColorCode=1

[DMR Network]
Enable=1
GatewayAddress=127.0.0.1
GatewayPort=62031
LocalAddress=127.0.0.1
LocalPort=62032
Slot1=0
Slot2=1

Part 5 โ€“ Configure DMRGateway

DMRGateway.ini

[General]
Callsign=BG7KUH
Id=4615604

[DMR Network 1]
Enabled=1
Name=BM
Address=4602.master.brandmeister.network
Port=62031
Password=YOUR_HOTSPOT_PASSWORD
Location=1
Debug=0

TGRewrite=2,9,2,9,1
TGRewrite=2,46007,2,46007,1
TGRewrite=2,46020,2,46020,1

PassAllTG=2
PassAllPC=1
PassAllPC=2

Part 6 โ€“ Start Programs

Launch in this order:

DMRGateway.exe DMRGateway.ini
MMDVMHost.exe MMDVMHost.ini

Expected Output

DMR, Sending authorisation
DMR, Logged into the master successfully

Recommended Single Hotspot Settings (China)

Always-On Talkgroups

TGUse
9Local
46007China National
46020Guangdong
46001China Regional

OpenGD77 Users

Use:

Duplex=0
Slot2=1

Because OpenGD77 hotspot mode is single simplex, not real duplex.


Troubleshooting


Cannot connect to BM

Check:


Some TG need PTT first

That means Dynamic TG subscription.

Use BM SelfCare Static TG:

46020 TS2 Static

EXE Missing DLL

Copy runtime DLLs from:

/ucrt64/bin/

Download Ready-to-Use Package

๐Ÿ‘‰ http://qsl.net/bg7kuh/MMDVMHost&DRMGateway(2026-04).zip


Final Notes

Modern MMDVM on Windows is now very stable when using:

MMDVMHost + DMRGateway + MQTT

This architecture gives:

โœ… Better BM compatibility โœ… Cleaner TG routing โœ… Future-proof setup โœ… Stable OpenGD77 hotspot support


73 de BG7KUH



Articles are licensed under CC BY-NC 4.0