1.1 KiB
1.1 KiB
Py Qt configurator for RX/TX firmware
Desktop GUI (PyQt6) that talks to the device over USB CDC (virtual COM). It sends line-delimited JSON commands and applies changes immediately when you edit controls.
Setup
cd py_app
python3 -m venv .venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
pip install -r requirements.txt
python main.py
Protocol expected on the device side
The firmware should read UTF-8 lines from the USB CDC serial port and handle JSON commands:
{"cmd": "set_params", "params": {freq_mhz, band, bw_khz, sf, cr, tx_power_dbm, period_ms, tx_enabled, payload}}— apply and persist as needed.{"cmd": "get_status"}— respond with JSON status (e.g. metrics, current params).{"cmd": "reboot_bootloader"}— reboot into ROM bootloader for flashing.
The GUI logs any text received, so returning JSON or human-readable lines works.
Notes
- Bands offered: 430/868/915/L/S/2.4G; frequency control is in MHz (150–2500).
- Payload length is limited to 31 chars to match the firmware UI constraint.
- Changes are debounced by 150 ms; dragging a spinbox will send the last value when you stop.