Skip to content

LR1110: fix startReceive() passing an IRQ bit as the RX timeout 🤖🤖 - #3076

Open
MDamon wants to merge 1 commit into
meshcore-dev:devfrom
MDamon:fix/lr1110-rx-timeout
Open

LR1110: fix startReceive() passing an IRQ bit as the RX timeout 🤖🤖#3076
MDamon wants to merge 1 commit into
meshcore-dev:devfrom
MDamon:fix/lr1110-rx-timeout

Conversation

@MDamon

@MDamon MDamon commented Jul 30, 2026

Copy link
Copy Markdown

Fixes #3075

CustomLR1110::startReceive() passes RADIOLIB_LR11X0_IRQ_PREAMBLE_DETECTED as RadioLib's first argument, which is the RX timeout, not an IRQ mask. The constant is 1 << 4 = 16, so the receiver is armed with a 16-tick timeout — ~488 µs at the LR11x0's 30.52 µs tick. The radio drops out of RX before a packet can arrive, so LR1110 boards on dev transmit normally but never receive anything.

This passes RADIOLIB_LR11X0_RX_TIMEOUT_INF instead, which is what LR11x0::startReceive() itself uses. The PREAMBLE_DETECTED flag that ea5d7c8 set out to add is untouched — it lives in the second argument, where it already was — so the intent of that commit is preserved.

The sibling wrappers added in the same series (CustomLLCC68, CustomSTM32WLx, CustomSX1262, CustomSX1268) all pass *_RX_TIMEOUT_INF correctly; LR1110 was the only one passing an IRQ bit.

Testing

Two SenseCAP T1000-E units at 910.525 MHz / BW 62.5 / SF 8 / CR 5.

Before: both transmit (tx_air_secs rising) but rx_air_secs, recv_errors, last_rssi all stay at 0 — the receiver never opens long enough to log even a failed preamble.

Applying the fix to only one unit isolates the cause. The fixed repeater began receiving immediately while the unfixed companion stayed deaf:

repeater  RX delta: {'recv': 1, 'flood_rx': 1}   last_rssi -29, last_snr 17.0, noise_floor -104
companion RX delta: {'recv': 0, 'flood_rx': 0}

With both fixed, traffic flows in each direction (-29/-31 dBm, SNR ~15), verified with adverts and public-channel messages.

Build coverage

Builds clean on dev for t1000e_repeater, ThinkNode_M7_repeater, ThinkNode_M3_repeater, wio_wm1110_repeater.

Minewsemi_me25ls01_repeater does not build, but that is pre-existing on dev and unrelated to this change — examples/simple_repeater/UITask.cpp fails on user_btn / BUTTON_EVENT_* not being declared for that variant. It fails identically on a clean dev checkout without this commit.

Caveat

Behaviour confirmed on T1000-E hardware only. The other CustomLR1110 variants (wio_wm1110, minewsemi_me25ls01, thinknode_m3/m7/m9) are affected by inspection — same override, same constant — not by testing.

CustomLR1110::startReceive() passed RADIOLIB_LR11X0_IRQ_PREAMBLE_DETECTED
(1<<4 = 16) as RadioLib's first argument, which is the RX *timeout*, not an
IRQ mask. At the LR11x0's 30.52us tick that armed the receiver for ~488us, so
it dropped out of RX before any packet could arrive and the node received
nothing at all -- while transmitting normally.

Symptoms on a SenseCAP T1000-E: tx_air_secs rising, rx_air_secs stuck at 0,
recv_errors 0, and the noise floor pinned at the -120 clamp because
getCurrentRSSI() never sampled a live receiver.

Pass RADIOLIB_LR11X0_RX_TIMEOUT_INF (continuous RX), which is what
LR11x0::startReceive() itself uses, keeping the PREAMBLE_DETECTED flag in the
reported IRQ flags as intended.

Introduced in ea5d7c8 ("LR1110: add PREAMBLE_DETECTED to reported irq flags").
Verified on two T1000-E units: with only the repeater fixed it began receiving
(last_rssi -29, SNR 17.0) while the unfixed companion stayed deaf; fixing both
brought up the link in each direction.
@MDamon MDamon changed the title LR1110: fix startReceive() passing an IRQ bit as the RX timeout LR1110: fix startReceive() passing an IRQ bit as the RX timeout 🤖🤖 Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant