fix: disable LBT phase-2 optimisation for loramac-node sx127x backend#31
Open
seagull9000 wants to merge 1 commit into
Open
fix: disable LBT phase-2 optimisation for loramac-node sx127x backend#31seagull9000 wants to merge 1 commit into
seagull9000 wants to merge 1 commit into
Conversation
The loramac-node sx127x backend holds a modem mutex for the full duration of async RX. lora_config() returns -EBUSY if called while that mutex is held, so the phase-2 path (skip hwCancelReceive, let send_async handle RX→TX transition) leaves the mutex permanently locked and silently drops all TX. Disable LBT for backends that set _loramac_node = true so RX is always cancelled before attempting to configure for TX. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
b99634b to
c556375
Compare
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.
The T-Beam v1.x is still a useful device in the MeshCore ecosystem and a ZephCore build is viable with some supporting PRs.
This is one such PR.
The loramac-node sx127x backend holds a modem mutex for the full duration of async RX. lora_config() returns -EBUSY if called while that mutex is held, so the phase-2 path (skip hwCancelReceive, let send_async handle RX→TX transition) leaves the mutex permanently locked and silently drops all TX.
Disable LBT for backends that set _loramac_node = true so RX is always cancelled before attempting to configure for TX.
Note:
_loramac_node is a bool member of LoRaRadioBase, which is the shared base class for all radio adapters. It defaults to false in the base constructor (line 33). Only one radio adapter overrides it:
// SX127xRadio.cpp — constructor
_loramac_node = true;
Every other adapter — SX126xRadio, LR1110Radio, LR2021Radio — never touches it, so they all stay
false.