- Notifications
You must be signed in to change notification settings - Fork231
Allow valueSize changes after initialization to adjust to MTU size#391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
CLAassistant commentedApr 9, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
codecovbot commentedApr 9, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## master #391 +/- ##=========================================- Coverage 9.62% 9.56% -0.07%========================================= Files 28 28 Lines 3656 3679 +23 ========================================= Hits 352 352- Misses 3304 3327 +23 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Memory usage change @d22a91c
Click for full report table
Click for full report CSV |
When trying to implement a BLE MIDI wrapper on top of ArduinoBLE I was losing data because the MTU negotiated with the server (in this case Apple Mac or iOS devices) was not matching the valueSize / buffer. Normally this might not be an issue but in the particular case of MIDI over BLE, the official spec and parsing of the data requires that packets are handled discreetly, so if the server thinks the packet size is X and we (the client) think it's Y then messages are sent incorrectly.
I suspect there are also other situations where matching the buffer size in the BLE parsing code and the MTU is better, more efficient and/or the only way to be accurate.
This implementation adds the methods necessary to resize, check the MTU size and be notified of MTU negotiation changes, but leaves the decision to resize up to the user of the library.