Jonathan Naylor
84a33449c4
Merge pull request #17 from MW0MWZ/remove-wxwidgets-cpp17
4 months ago
Andy Taylor
c2406d9f11
Remove wxWidgets, port to standalone C++17 with cross-platform support
...
Replace the wxWidgets dependency with standard C++17 throughout the
entire codebase, producing a clean, portable, thoroughly reviewed CLI
daemon that builds on Linux, Windows, and macOS without any GUI toolkit.
== Removed ==
- GUI application and config editor (DStarRepeaterFrame, DStarRepeaterConfig/)
- GUI widget library (GUICommon/)
- Windows USB drivers (WindowsUSB/)
- Visual Studio solutions and project files (.sln, .vcxproj)
- NSIS installer scripts, platform-specific makefiles
- wxWidgets-specific files (LogEvent, LogRedirect, GMSKModemWinUSB)
- Dead code: unused GUI constants, vestigial command methods, unused
DTMF/queue constants in non-TRX thread variants
== Core conversion (all source files) ==
- wxString -> std::string, wxArrayString -> std::vector<std::string>
- wxFloat32 -> float, wxUint8/16/32 -> uint8_t/16_t/32_t
- wxThread -> std::thread, wxMutex -> std::mutex
- wxStopWatch -> std::chrono::steady_clock
- wxRegEx -> std::regex, wxDynLib -> dlopen/dlsym
- wxFFile -> FILE*, wxTextFile -> std::ifstream
- WX_DECLARE_STRING_HASH_MAP -> std::unordered_map
- volatile -> std::atomic for ring buffer and cross-thread flags
- NULL -> nullptr throughout
== INI config format (MMDVMHost compatible) ==
- [Section]/Key=Value INI format replaces flat key=value
- Config file path is the single required command-line argument:
dstarrepeaterd <config-file>
- [Log] section: FilePath, FileLevel, DisplayLevel, MQTTLevel
(levels 0-6 matching MMDVMHost convention)
- [Paths] section: Data and Audio directories from config
- [Whitelist]/[Blacklist]/[Greylist] file paths from config
- All compile-time path defines (CONF_DIR, LOG_DIR) removed
- Example config: Data/dstarrepeater.ini.example
== Build system ==
- Plain g++ -std=c++17, no wx-config dependency
- Defaults: release build, MQTT on, GPIO auto-detected
- GPIO auto-detection checks uname -s (Linux only) and uname -m
(arm/aarch64) to avoid false match on macOS Apple Silicon
- Zero warnings with -Wall on GCC 13
- Verified on Ubuntu 24.04, Debian Trixie, and Alpine 3.21
== Install layout ==
- Binary: /usr/bin/dstarrepeaterd
- AMBE voice data: /usr/share/dstarrepeater/
- Config directory: /etc/dstarrepeater/ (created on install)
- Example config: /etc/dstarrepeater/dstarrepeater.ini.example
== Cross-platform support ==
- EndianCompat.h: byte-swap functions for Linux, macOS, and Windows
- Serial ports: Win32 CreateFile/ReadFile/WriteFile alongside POSIX
- Sockets: Winsock2 with RAII WSAStartup alongside POSIX
- Sound card: PortAudio for Windows/macOS, ALSA for Linux
- All platform code is additive (#ifdef _WIN32), no Linux code changed
== Standalone logger ==
- Thread-safe file logger with std::mutex and daily UTC rotation
- Level-based filtering for file, display (stdout), and MQTT sinks
- LogLevel enum matches MMDVMHost numbering (1=Debug through 6=Fatal)
- Thread-safe gmtime via gmtime_r/gmtime_s
- Atomic singleton for safe cross-thread access
== Display-Driver MQTT compatibility ==
- All JSON messages match Display-Driver's expected format exactly
- D-Star start/end/lost events with callsigns and source (rf/net)
- BER updates during active RF
- DVAP RSSI signal strength publishing
- Slow-data text forwarding
- MMDVM idle mode transitions
- JSON escaping on all callsign/text fields from over-the-air data
- JSON schema: schema.json with validated $defs structure
== Security and safety fixes ==
- All cross-thread bool flags: std::atomic<bool>
- MQTTConnection m_connected and DVAP m_signal/m_squelchOpen: atomic
- RingBuffer: std::atomic<unsigned int> for ARM correctness
- All sprintf -> snprintf to prevent buffer overflows
- JSON escaping for all MQTT output from untrusted sources
- DVTOOLFileWriter filename sanitization (path traversal prevention)
- Thread-safe localtime_r/localtime_s in DVTOOLFileWriter
- GatewayProtocolHandler: bounded string from network buffer
- Integer underflow guards in protocol handler readData()
- Buffer bounds checks in writePoll()/writeRegister()
- MMDVM printDebug() minimum length guards
- PID file: /var/run with O_NOFOLLOW, PID written for systemd
- Exception-safe createThread() with full cleanup on failure
- Deprecated gethostbyname() replaced with getaddrinfo()
- CRLF stripping in callsign list loader
- Infinite loop exits in DVAP resync() and serial getResponse()
- Null guards in SoundCardReaderWriter::close()
- RingBuffer::hasSpace() off-by-one fixed
== Memory safety ==
- Delete protocol handler, modem, controller on open()/start() failure
- Thread destructors clean up all owned objects with null-after-delete
- Callsign lists properly deleted in TX/RX/TXRX thread no-op setters
- BeaconUnit buffer allocation matched to actual write size (DV_FRAME)
- Null dereference fix in endOfNetworkData() for network-first streams
== Functional fixes ==
- Restored DTMF command execution (system() via checkControl())
- Fixed getControl() parameter order (commands 3-6 were swapped)
- Fixed getStatus() argument order in idle branch (BER was at wrong
position, causing MQTT to report garbage BER when idle)
- Added missing GMSK interface type config parsing
- Fixed IcomController uninitialized buffer and sync check order
- Fixed SplitController format string vulnerability
- Fixed DVAPController dumpPackets() dead loop
- Inline const arrays in DStarDefines.h (ODR compliance)
== Documentation ==
- Comprehensive comments added to all source files
- README.md: quick start, dependency tables, usage guide
- CONFIGURATION.md: complete INI format reference
- MQTT.md: updated for INI config, Display-Driver integration
- BUILD.md: per-platform instructions (Linux, Windows, macOS)
- CHANGELOG.md: version history, newest first
- schema.json: JSON schema for all MQTT messages
Version bumped to 20260319.
4 months ago
Jonathan Naylor
630ff49231
Merge pull request #16 from MW0MWZ/mqtt-support
...
Add optional MQTT support with Display-Driver compatibility
5 months ago
Andy Taylor
6dc8097d20
Add optional MQTT support, Display-Driver compatibility, and documentation
...
MQTT telemetry (build with make MQTT=1)
---------------------------------------
Add optional MQTT publishing to DStarRepeater, following the same
conventions as MMDVMHost: CMQTTConnection wrapping libmosquitto,
topic-prefix convention ({name}/topic), log-level filtering, PID-based
client IDs, and matching config key names. All MQTT code is guarded by
#if defined(MQTT) — without the flag, the binary is unchanged.
Three topics are published:
{name}/log Timestamped log messages filtered by severity
{name}/status JSON repeater state snapshot, once per second
{name}/json Display-Driver-compatible events at state transitions
Display-Driver compatibility
----------------------------
Publish event-driven JSON on the "json" topic in the exact format that
Display-Driver expects, enabling OLED/TFT display output with no
changes to Display-Driver. Events: D-Star start (RF/net with callsign
fields), end, lost (watchdog), idle, and BER. Hooks added at every
state transition point in all four thread variants (TRXThread,
RXThread, TXThread, TXRXThread).
Shutdown safety
---------------
Add mosquitto_loop_stop() before mosquitto_destroy() in close() to
prevent use-after-free from the background network thread. Add Wait()
after kill() in OnExit() so the repeater thread has fully exited
before tearing down MQTT. Both issues also exist in MMDVMHost.
Config parser bug fix
---------------------
The config file parser called GetNextLine() inside comment and
no-equals handlers before continuing, but the for-loop increment
already advances — silently skipping the line after every comment or
blank line. Remove the redundant calls and add an empty-line guard.
Comments and blank lines now work correctly in config files.
Documentation and config
------------------------
Add MQTT.md with build instructions, config keys, topic structure,
JSON examples, and Display-Driver compatibility details. Add
CONFIGURATION.md as a full reference guide for every config setting.
Update README.md with gateway links (ircDDBGateway, DStarGateway) and
MQTT build instructions. Rename and update the example config with
corrected defaults, missing icomPort, and MQTT settings.
5 months ago
Jonathan Naylor
fd7f1a181c
Merge pull request #13 from f1rmb/fix_MMDVM_support
...
Fix MMDVM support.
5 years ago
Daniel Caujolle-Bert
fea6b5a87c
Fix buffer length checking on MMDVMController::getResponse():
...
many frame length are 114 bytes long, limit is hardcoded to 100, hence use BUFFER_LENGTH instead (200).
5 years ago
Jonathan Naylor
7897a1db96
Merge pull request #11 from sq7lrx/makefile-improvements
...
Improve Linux build
6 years ago
Adam Kolakowski
52537aca8f
Improve Linux build
...
Introduces several improvements to Makefiles:
* BUILD=[debug|release] flag with CFLAGS consistent with vcproj
* DESTDIR for staged builds
* installation paths can be overridden in make arguments
* `make install` makes sure install dirs are present
* debug build adds GDB debug symbols
6 years ago
Jonathan Naylor
cbfc82c50c
Update to VS2019.
7 years ago
Jonathan Naylor
ace248cb40
Reduce the logging for the DVMega driver.
7 years ago
Jonathan Naylor
112780e7e7
Merge pull request #8 from dg0tm/dep_fix
...
Makefile fixes
8 years ago
Christoph Kottke
9282b0d6ca
Makefile fixes
...
* MakefileGUIPi
add lost depency (libusb-1.0)
* Makefile.Pi
rename to reflect the same namingschema
8 years ago
Jonathan Naylor
a98432885d
Fix for PortAudio with changed API.
8 years ago
Jonathan Naylor
3cf276ce53
Reduce logging of Icom radio traffic.
8 years ago
Jonathan Naylor
2bafb2f67c
Merge pull request #6 from dg0tm/master
...
compiler fixes
8 years ago
Jonathan Naylor
b27c2fbb40
Update the logger to the latest wxWidgets API.
8 years ago
Christoph Kottke
ca7afe11bf
compiler fixes
...
* DStarRepeater/DStarRepeaterApp.cpp
suggest explicit braces to avoid ambiguous ‘else’
* Common/AudioCallback.h
* Common/SoundCardController.cpp
* Common/SoundCardController.h
* Common/SoundCardReaderWriter.cpp
comparison between signed and unsigned integer expressions
backport from MMDVM-UDRC "Fix signed integer issues with compiler"
by mcdermj
fix issue #4
8 years ago
Christoph Kottke
1a6b2cb31f
Makefile Tweaks
8 years ago
Jonathan Naylor
3e939b06f1
Merge pull request #3 from F4FXL/MakefileTweaks
...
Makefile improvements an dependencies checks
8 years ago
Geoffrey Merck F4FXL - KC3FRA
cbf40eb482
Added dependencies check
8 years ago
Geoffrey Merck F4FXL - KC3FRA
05e62545d8
Use $(MAKE) variable
...
This allows to propagate flags passed on the commande line
8 years ago
Jonathan Naylor
e24432fbde
Merge pull request #1 from F4FXL/LogWithDate
...
Revert to log files with dates
8 years ago
Geoffrey Merck F4FXL - KC3FRA
d45f3ab49b
Revert to log files with dates
...
This also restores the original log files behavior
8 years ago
Jonathan Naylor
e79b45418f
Update to the latest version.
8 years ago
Jonathan Naylor
4e1bea5b8c
Put missing return variable declaration in.
8 years ago
Jonathan Naylor
c315c69a18
Add GUI clean of the D-Star Repeater.
8 years ago
Jonathan Naylor
30b518ff94
Make the Icom data receiving much stricter.
8 years ago
Jonathan Naylor
8a5e8b7dcb
Simplify the connected logic.
8 years ago
Jonathan Naylor
91d2645011
Add the serial timeout to the Windows serial port handler.
8 years ago
Jonathan Naylor
2cde6fb014
Re-instate logging.
8 years ago
Jonathan Naylor
83b98f35c8
Bump the version date.
8 years ago
Jonathan Naylor
229e9b9894
Remove the extra logging.
8 years ago
Jonathan Naylor
18404ca325
Revert to a cycle rate of 200/s from 100/s.
8 years ago
Jonathan Naylor
596a9eae5e
Another incorrect variable name.
8 years ago
Jonathan Naylor
8941f6b6d2
Use the correct variable.
8 years ago
Jonathan Naylor
10021d07f8
Handle missing ACK responses from the radio.
8 years ago
Jonathan Naylor
51437e1fc0
Handle the different Icom ack types better.
8 years ago
Jonathan Naylor
f478f8dd0d
Fix GUI install on a Pi.
8 years ago
Jonathan Naylor
8922928e59
Small changes to reduce/improve logging and maybe reliability.
8 years ago
Jonathan Naylor
6860a9f44b
Add more debugging statements.
8 years ago
Jonathan Naylor
a90479a174
Enable debugging messages to track down bug.
8 years ago
Jonathan Naylor
b28d8991a5
Fix GUI install.
8 years ago
Jonathan Naylor
53b40b8a3a
Attempt to fix Icom controller hanging.
8 years ago
Jonathan Naylor
9187e31665
Increase the transmit buffer size.
8 years ago
Jonathan Naylor
3e87e64c4a
Add the new web page for the VC2017 redist downloads.
8 years ago
Jonathan Naylor
4dce5ac764
Add Linux GUI and GUI + GPIO makefiles.
8 years ago
Jonathan Naylor
59f2d613ad
Add 32- and 64-bit NSIS installers.
8 years ago
Jonathan Naylor
f42b41aa91
Update the text files for this version.
8 years ago
Jonathan Naylor
1d53af00d1
Add error handling code.
8 years ago
Jonathan Naylor
747f8de150
Update the positions of the VC2017 run-time redistributable packages.
8 years ago