Skip to content

fix: disable LBT phase-2 optimisation for loramac-node sx127x backend#31

Open
seagull9000 wants to merge 1 commit into
liquidraver:devfrom
seagull9000:fix/sx127x-lbt
Open

fix: disable LBT phase-2 optimisation for loramac-node sx127x backend#31
seagull9000 wants to merge 1 commit into
liquidraver:devfrom
seagull9000:fix/sx127x-lbt

Conversation

@seagull9000

Copy link
Copy Markdown

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.

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>
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