• 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/A¬≠ndroid-BLE-Library/issues/3

  • Thanks for that explanation @fanoush!

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Why does NRF.updateServices only sends the first 20 bytes of the characteristic value?

Posted by Avatar for cmumford @cmumford