LR1110: fix startReceive() passing an IRQ bit as the RX timeout 🤖🤖 - #3076
Open
MDamon wants to merge 1 commit into
Open
LR1110: fix startReceive() passing an IRQ bit as the RX timeout 🤖🤖#3076MDamon wants to merge 1 commit into
MDamon wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3075
CustomLR1110::startReceive()passesRADIOLIB_LR11X0_IRQ_PREAMBLE_DETECTEDas RadioLib's first argument, which is the RX timeout, not an IRQ mask. The constant is1 << 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 ondevtransmit normally but never receive anything.This passes
RADIOLIB_LR11X0_RX_TIMEOUT_INFinstead, which is whatLR11x0::startReceive()itself uses. ThePREAMBLE_DETECTEDflag 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_INFcorrectly; 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_secsrising) butrx_air_secs,recv_errors,last_rssiall 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:
With both fixed, traffic flows in each direction (
-29/-31dBm, SNR ~15), verified with adverts and public-channel messages.Build coverage
Builds clean on
devfort1000e_repeater,ThinkNode_M7_repeater,ThinkNode_M3_repeater,wio_wm1110_repeater.Minewsemi_me25ls01_repeaterdoes not build, but that is pre-existing ondevand unrelated to this change —examples/simple_repeater/UITask.cppfails onuser_btn/BUTTON_EVENT_*not being declared for that variant. It fails identically on a cleandevcheckout without this commit.Caveat
Behaviour confirmed on T1000-E hardware only. The other
CustomLR1110variants (wio_wm1110,minewsemi_me25ls01,thinknode_m3/m7/m9) are affected by inspection — same override, same constant — not by testing.