A MeshCore serial configuration
tool for Windows 7 and later. Plain Win32 API (no MFC), builds with
GCC/MinGW-w64, and links statically so the .exe runs on a bare machine
with no extra DLLs alongside it.
It talks to the plain-text CLI spoken by MeshCore repeater, room-server, and sensor firmware over a COM port. (Companion firmware — the kind paired with the phone app — has no text CLI and cannot be configured with this tool.)
Native Windows (MSYS2 MinGW64 shell, or a standalone MinGW-w64 install):
mingw32-makeIf g++/windres don't resolve via plain mingw32-make, pass full paths
explicitly:
mingw32-make CXX=C:\path\to\g++.exe WINDRES=C:\path\to\windres.exeCross-compiling from Linux/WSL:
make CXX=x86_64-w64-mingw32-g++ WINDRES=x86_64-w64-mingw32-windresFor a 32-bit build (only needed for 32-bit Windows 7):
make CXX=i686-w64-mingw32-g++ WINDRES=i686-w64-mingw32-windresUse MinGW-w64 specifically — the old 32-bit-only mingw.org toolchain lacks the modern Win32/commctrl headers this needs.
Build artifacts (*.o, *.exe) are not tracked in git; build from source
or download a packaged release.
- Pick a COM port and press Connect. The app runs a read-only startup
batch and fills the info grid: Name, Board, Ver, Owner, Lat, Lon, Role,
Repeat Flag, Freq, Tx Power. Everything else from the startup batch
(plus
neighbors) goes to the results panel. - Commands are grouped one row per category (Operational, Radio, System, Routing, ACL, Region, GPS, Sensors, Bridge, ...): pick a command from the row's combo box, type a parameter if it takes one, and press that row's Send. One command is in flight at a time; rows disable while the startup batch or a manual send is running. The Commands menu selects a command in its category's dropdown without sending it, so parameterized commands get a chance for a value first.
- The window is resizable; the results panel grows to fill the space.
- There is no on-screen log: all traffic (sent commands, received lines,
echo filtering, timeouts) is appended with timestamps to
KTF-MC-Config.lognext to the.exe. - Help → App Help opens
KTF-MC-Config-Help.htmlin the default browser — keep that file next to the.exe. It covers the app plus a full command reference.
| File | Purpose |
|---|---|
main.cpp |
Dialog, menus, startup batch, command dispatch, logging |
SerialPort.h/.cpp |
CSerialPort: COM port enumeration (registry), reader thread |
CommandTable.h |
The full MeshCore CLI command set shown in the UI |
app.rc, resource.h |
Dialog template, menus, version info |
app.manifest, app.ico |
Common-controls v6 manifest, application icon |
KTF-MC-Config-Help.html |
End-user help + command reference (ship next to the .exe) |
Makefile |
MinGW-w64 build, native or cross |
CommandTable.hfollows the MeshCore CLI command reference (https://docs.meshcore.io/cli_commands/). When firmware commands change, edit it and regenerate the Commands menu inapp.rcand the reference table inKTF-MC-Config-Help.htmlto match — they are not derived automatically at build time.SerialPort.cppdeliberately uses plain synchronousReadFile/WriteFilewith shortCOMMTIMEOUTS, not overlapped I/O. This is the variant confirmed working and responsive on real hardware; don't switch it back to overlapped I/O without testing on a device.- The startup batch is not paced by a fixed delay: MeshCore echoes the
command before replying and its response time varies, so
main.cppuses a settle timer (restarted on every received line) plus a safety-net timeout per command. app.icois a placeholder, not the official MeshCore logo. To replace it: downloadhttps://cdn.jsdelivr.net/gh/selfhst/icons/svg/meshcore.svg, convert to a multi-resolution.ico(at least 16/32/48/256 px — e.g.magick meshcore.svg -define icon:auto-resize=16,32,48,256 app.ico), overwriteapp.ico, and rebuild (the icon is baked in at build time).
A Go reimplementation of this tool — same command catalog, native GUI on Windows/macOS/Linux plus browser and headless CLI modes — lives at https://github.com/zfouts/k5ktf-mesh.
GPLv3 — see LICENSE.