BLE UART data throughput, experience?

Posted on
  • Howdy all,

    I'm wondering if any one has a handle on how much data can be pumped out of the Puck.js via the BLE UART service, in the real world, bytes/sec. I know there is a lot of over head, as long as I have a timestamp on the data, it can lag quite a bit, just needs to be error free and no dropped information.



  • Hi - I haven't got any measured figures, but:

    The connection interval can be negotiated (depending on the PC) between 7.5 and 20ms - and it can send/receive 20 bytes per interval, so that's between 1000-2700 bytes/second. For reliable comms I'd stick a little below that if possible.

    On Espruino's side, newer firmwares will warn you with a FIFO_FULL error message if they believe that they have lost some data (eg. code was busy waiting for a write to complete so didn't have time to process the data that came in)

  • Does there have to be a separate connection for each chunk of 20 bytes (or maybe 6 x 20 bytes as the Nordic docs indicate)?

  • Hi - I'm not sure I understand the question? You mean can you send more than one chunk of data per connection interval?

    I'm not 100% sure - I don't believe so. However with BLE5 (and possibly before?) the two computers can negotiate to use larger packet sizes, so you're not limited to 20 bytes. That's not part of Espruino yet, but hopefully it will be at some point in the future - however it's only possible if both ends support it.

  • Thank you, this answers my question. Stuck with 20 bytes for now.

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

BLE UART data throughput, experience?

Posted by Avatar for Rando @Rando