The MQTT client ID was generated using sprintf with %ld and time(nullptr).
On platforms with 32-bit userland but 64-bit kernel (such as Raspberry Pi OS
and some custom Alpine Linux builds), time_t is a 64-bit long long but %ld
only reads 32 bits. Since the upper 32 bits of the current Unix timestamp
are zero, this always produces a client ID ending in .0, causing collisions
when multiple instances or restarts occur.
Replace time()-based client IDs with PID-based IDs using getpid(), which is
always a portable 32-bit value and unique per process. Platform-guarded for
Windows (_getpid) and POSIX (getpid).
This is the DMR Gateway which allows for the connection of up to six 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.
This software works by use of powerful rewriting rules which allow for changes in the slot, talk group, the type, and even the destination, of the messages. Without a rewrite rule, even if it does no actual rewriting, traffic will not be passed through from that defined network to the MMDVM and back again.
For example, the default configuration moves the announcements from BrandMeister for linking and unlinking to the same talk group slot as the reflectors themselves, a far more reasonable configuration than the default BrandMeister one.
The rewrite rules don’t apply to the XLX reflector, where only the slot and the talk group used may be changed. The controls i.e. private calls, for altering the reflector are fixed. In the case of the XLX reflectors the gateway will issue voice prompts to indicate the current reflector. These are available in a number of languages.
The MMDVM .ini file should have the IP address and port number of the client in the [DMR Network] settings.
This software builds on 32-bit and 64-bit Linux systems as well as on Windows using Visual Studio 2022 on x86 and x64.
This software is licenced under the GPL v2 and is primarily intended for amateur and educational use.