You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[CV1] - Sometimes Omi can't sent battery percentage over BLE #4077
what do you think about adding flow control for this bug? I'm thinking of adding a counting semaphore in transport.c where all the audio packet acquires semaphore before sending and release it once properly transmitted via callback
I currently see that there are 10 BLE TXbuffer slot(CONFIG_BT_L2CAP_TX_BUF_COUNT), so we can reserve maybe 3-5 for audio and leave the rest for button/battery notifications.
from my review, this shouldn't add any bottleneck - audio is produced at 4kb/s and BLE transmits at ~5ms at most so even only reserving 3 slots should be more than enough headroom
@TuEmb Scoring system v1 triage update: I OCR’d the attachment and it shows repeated BLE stack errors like "bt_conn: Unable to allocate buffer within timeout", "bt_att: Unable to allocate buffer for op 0x1b", "bt_gatt: No buffer available to send notification", and "transport: Error updating battery level: -12" alongside battery ADC/voltage logs. This still looks like intermittent BLE battery reporting; I scored it as Layer Capture / P3 / Needs Info with score 12 (w=5, sev 2, trust 1, freq 3, lev 3, cost 5). Please reply if any factor seems off, and confirm if this is reproducible; if yes, share device model, firmware/app versions, steps to reproduce, how often it happens, and whether other BLE notifications fail too.
Activity
kevtae commentedon Jan 22, 2026
what do you think about adding flow control for this bug? I'm thinking of adding a counting semaphore in transport.c where all the audio packet acquires semaphore before sending and release it once properly transmitted via callback
I currently see that there are 10 BLE TXbuffer slot(CONFIG_BT_L2CAP_TX_BUF_COUNT), so we can reserve maybe 3-5 for audio and leave the rest for button/battery notifications.
from my review, this shouldn't add any bottleneck - audio is produced at 4kb/s and BLE transmits at ~5ms at most so even only reserving 3 slots should be more than enough headroom
beastoin commentedon Jan 23, 2026
@TuEmb Scoring system v1 triage update: I OCR’d the attachment and it shows repeated BLE stack errors like "bt_conn: Unable to allocate buffer within timeout", "bt_att: Unable to allocate buffer for op 0x1b", "bt_gatt: No buffer available to send notification", and "transport: Error updating battery level: -12" alongside battery ADC/voltage logs. This still looks like intermittent BLE battery reporting; I scored it as Layer Capture / P3 / Needs Info with score 12 (w=5, sev 2, trust 1, freq 3, lev 3, cost 5). Please reply if any factor seems off, and confirm if this is reproducible; if yes, share device model, firmware/app versions, steps to reproduce, how often it happens, and whether other BLE notifications fail too.
by AI for @beastoin
TuEmb commentedon Jan 25, 2026
@kevtae that's good idea. I agree with the semaphore approach. A few implementation notes:
Feel free to open a PR with this fix. Happy to review! 🚀
kevtae commentedon Jan 28, 2026
for the log to track the dropped packet, is the LOG_ERR standard way?
TuEmb commentedon Jan 29, 2026
@kevtae yes, please enable the LOG configures in
*.conffileFeat - refactor SD card, improve bluetooth throughput, remove wifi fe…
Feat - refactor SD card, improve bluetooth throughput, remove wifi fe…