I've got an Espruino app that changes/notifies a 240 byte characteristic at a regular interval. On the receiving end (see browser test app) I can read the characteristic value, and get the full 240 bytes, but when receiving value change notifications I only get the first 20. I'm guessing that BLE_NUS_MAX_DATA_LEN is the cause, but I haven't taken the time to look at all the places where that is used and try to figure out why it works that way. Is this an Espruino design choice due to working on a resource constrained device? Anybody know why I'm not getting the full value during notifications?
20 bytes is maximum in BLE unless both devices agree on bigger MTU size or support DLE - data length extension. and yes bigger MTU would need different build of espruino with less memory available. also before DLE or larger MTU was added to bluetooth standard, there were so called long writes, nice summary also here https://github.com/NordicSemiconductor/Android-BLE-Library/issues/3
Thanks for that explanation @fanoush!
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem