mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-10-30 19:51:59 +01:00
Multi-radio: radios[].sx1262 replaces the top-level section instead of overlaying it, so a TCXO board comes up with no clock (noise floor -125 dBm, no RX) #162
Reference in new issue
Block a user
Summary
In multi-radio mode, a
radios[]entry'ssx1262:block replaces the top-levelsx1262:sectionwholesale instead of overlaying it. Any hardware key the entry omits silently takes the code default,
even when the top-level section (which the setup wizard fills in) has the right value. For a board
that needs
use_dio3_tcxo: true— RAK6421 + RAK13302, and every other preset with a TCXO — theresult is an SX1262 with no clock: it initialises, reports
radio_status: ok, shows a noise floor of−125…−127 dBm, and never decodes a packet. The same config works in single-radio mode.
The shipped
config.yaml.examplemulti-radio block reproduces this: itssx1262:entries list onlythe pins, no
use_dio3_tcxo,use_dio2_rf,dio3_tcxo_voltageoren_pins.Where
repeater/config.py,_merge_radio_entry(13eb8b2, line 760):and
get_radio_for_board, line 564:So with
radios[0].sx1262present but lacking those keys, the daemon buildsSX1262Radio(use_dio3_tcxo=False, use_dio2_rf=False)regardless of what the top-levelsx1262:says. The docstring on_merge_radio_entrydescribes the intent as "shared top-level settings are inherited unless the entry supplies its own", which is what happens for whole sections, not for keys within them.Reproduce
RAK6421 + RAK13302 (slot 1), openHop Repeater 1.1.4 / core 1.1.3, Docker.
rak6421-13300x-slot1preset. Top-levelsx1262:hasuse_dio3_tcxo: true,use_dio2_rf: true. RX works, noise floor ≈ −100 dBm.config.yaml.example: addradios:with the same pins under- id: local/sx1262:, plus twomodem_tcpradios./api/stats→config.radios[0].sx1262showsuse_dio3_tcxo: false, use_dio2_rf: false;noise_floor_dbm: -127.5;radio_status: ok; over 24 h zero rows taggedrx_radio_id: localwhile the modem_tcp radios receive normally. No warning in the log.use_dio3_tcxo: true,dio3_tcxo_voltage: 1.8,use_dio2_rf: trueto theradios[0].sx1262block, restart → noise floor −99.6 dBm,localdecodes at the same rate as the other two radios within a minute.Suggested fix
Overlay per-radio hardware sections on the top-level ones instead of replacing them, so an entry only needs to state what differs:
Alongside that, or instead if the replace semantics are intended:
config.yaml.example's multi-radio block should carry the full hardware key set (use_dio3_tcxo,dio3_tcxo_voltage,use_dio2_rf,en_pin/en_pins,is_waveshare), or a comment saying the entry must be complete because nothing is inherited from the top-level section.validate_configcould warn when aradios[]sx1262 entry omits a key the top-level section sets to a non-default value — that's the exact case that bites here.A silent noise floor of −125 dBm with
radio_status: okis also worth a log warning on its own; it's a reliable sign the TCXO isn't running.I believe this is fixed on dev. Can you verify that it is working the way you intended?