Skip to content

Peek & pop separately when pushing messages to BLE client#1902

Open
weebl2000 wants to merge 2 commits into
meshcore-dev:devfrom
weebl2000:no-fire-and-forget-ble-message-popping
Open

Peek & pop separately when pushing messages to BLE client#1902
weebl2000 wants to merge 2 commits into
meshcore-dev:devfrom
weebl2000:no-fire-and-forget-ble-message-popping

Conversation

@weebl2000
Copy link
Copy Markdown
Contributor

@weebl2000 weebl2000 commented Mar 2, 2026

I've noticed very often that the first few messages can get lost after reconnecting with BLE. This should fix that.

Try for yourself by building here

Comment thread examples/companion_radio/MyMesh.cpp Outdated
@weebl2000 weebl2000 force-pushed the no-fire-and-forget-ble-message-popping branch from c520542 to 782118d Compare March 3, 2026 14:37
@weebl2000 weebl2000 force-pushed the no-fire-and-forget-ble-message-popping branch from ef73ffe to 4457394 Compare March 23, 2026 13:27
robekl added a commit to robekl/MeshCore that referenced this pull request Mar 23, 2026
Reimplements meshcore-dev/MeshCore PR meshcore-dev#1902 on top of 467959c for the 1.14.1 maintenance branch.

References:
PR: meshcore-dev#1902
Companion radio source: https://github.com/meshcore-dev/MeshCore/tree/467959cc3bfc884e5f3425caac89453a450151b6/examples/companion_radio

Rationale:
This patch changes the companion BLE transmit path so frames are only removed from the offline queue after the push succeeds, instead of using a fire-and-forget pop flow. The change is localized to companion radio queue handling and reduces the chance of dropping queued data when BLE delivery fails or stalls. It preserves existing interfaces and protocol behavior while making the queue semantics safer.
@weebl2000 weebl2000 force-pushed the no-fire-and-forget-ble-message-popping branch from 4457394 to 8e3e883 Compare April 4, 2026 11:18
weebl2000 added 2 commits May 26, 2026 11:51
I've noticed very often that the first few messages can get lost after
reconnecting with BLE. This should fix that.
It shouldn't ever happen that it's less so why not
@weebl2000 weebl2000 force-pushed the no-fire-and-forget-ble-message-popping branch from 8e3e883 to b8edd48 Compare May 26, 2026 09:52
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.

2 participants