Max. size of data over BLE connection #1083
Replies: 2 comments
-
Posted at 2022-09-30 by @fanoush This is a limit to to save memory, it can be tuned here OTOH even 130 is pretty high and you will have this limit anyway so maybe better solution is to handle lower MTU too. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-09-30 by @fanoush Also you may do a search for this topic, it is not so simple as higher MTU == better/faster, it also has some shortcomings. Larger packets may be more susceptible to noise => more errors/retries when 2.4GHz radio band is crowded. Also larger packets may not fit well into connection interval (typically there can be more smaller packets sent in same connection interval) so larger MTU may not increase speed and can even make things slower. EDIT: good article is https://interrupt.memfault.com/blog/ble-throughput-primer it gets more interesting near the end |
Beta Was this translation helpful? Give feedback.
-
Posted at 2022-09-29 by Mr-Mime
Hello there,
I am creating an app to connect my bangle.js 2 to an energy measuring device.
The connection is done via BLE.
The problem I am facing comes with reading 'large' data.
The maximum size I get from
readValue()
is 130 Bytes.Reading the same with e.g. the NRF Connect app I get all 438 Bytes.
Data <130 Bytes works fine.
Thus I am asking myself if there is any limitation on the bangle.js side.
In general I am aware of the BLE protocol but I am missing something here.
Note:
Normally the preferred MTU size of the energy measuring device is set to 517.
When I change it to 23 Bytes, the bangle.js 2 only reads 22 bytes.
If any additional information is needed, I'll provide it ASAP.
Thanks for helping.
Beta Was this translation helpful? Give feedback.
All reactions