A C++ Qt application for MeshCore LoRa-based mesh network communication.
- USB serial and Bluetooth Low Energy (BLE) communication with MeshCore devices
- Group channel messaging
- Device initialization and configuration
- Send and receive messages through channels
- Command-line interface
- Transport abstraction layer supporting multiple connection types
- Qt 6.x
- C++17 compatible compiler
- macOS (tested), Linux (should work), or Windows (untested)
# Install Qt6 (if not already installed)
brew install qt@6
# Configure CMake
mkdir -p cmake-build-debug
cd cmake-build-debug
cmake .. -DCMAKE_PREFIX_PATH="$(brew --prefix qt@6)" -DCMAKE_BUILD_TYPE=Debug
# Build
cmake --build .
# Run
./MeshCoreQtThe application supports both USB serial and Bluetooth Low Energy connections:
./MeshCoreQt
connect /dev/ttyUSB0 # Linux
connect /dev/cu.usbserial-* # macOS
connect COM3 # Windows./MeshCoreQt
connect ble:MyMeshDevice # Connect by device name
connect ble:AA:BB:CC:DD:EE:FF # Connect by MAC addressNote: BLE discovery may take a few seconds. The device name is the advertised BLE name of your MeshCore device.
init # Initialize device
channels # List available channels
send 0 Hello World! # Send to channel 0 (public)
msg abc123def456 Hi there! # Send direct message (pubkey hex)
sync # Pull next message from queue
status # Show connection status
help # Show all commandsMeshCore Qt implements the MeshCore Companion Radio Protocol:
- Baud Rate: 115200
- Frame Format:
<(0x3c) + 2-byte LE length + data - Protocol Version: 3 (supports SNR data in messages)
CMD_DEVICE_QUERY→RESP_CODE_DEVICE_INFOCMD_APP_START→RESP_CODE_SELF_INFOCMD_GET_CONTACTS→RESP_CODE_END_OF_CONTACTS
- Radio receives message → sends
PUSH_CODE_MSG_WAITING - App sends
CMD_SYNC_NEXT_MESSAGE - Radio responds with
RESP_CODE_CHANNEL_MSG_RECV_V3 - Repeat until
RESP_CODE_NO_MORE_MESSAGES
- Transport Layer:
IConnectioninterface for transport abstractionSerialConnectionfor USB serial communication (frame parsing state machine)BLEConnectionfor Bluetooth Low Energy communication (Nordic UART Service)
- Protocol Layer: CommandBuilder/ResponseParser for binary encoding
- Application Layer: MeshClient orchestrator with Qt signals/slots
- Uses QSerialPort
- Frame format:
<(0x3c) + 2-byte LE length + data - Default baud rate: 115200
- Uses Qt Bluetooth with Nordic UART Service (NUS)
- Service UUID:
6E400001-B5A3-F393-E0A9-E50E24DCCA9E - RX Characteristic:
6E400002-B5A3-F393-E0A9-E50E24DCCA9E(write to device) - TX Characteristic:
6E400003-B5A3-F393-E0A9-E50E24DCCA9E(notifications from device) - Frame format: Raw data (length implicit in BLE characteristic)
# Linux - add user to dialout group
sudo usermod -a -G dialout $USER
# Log out and back in
# macOS - usually no permission issues