This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can i send more than 20 bytes in BLE 4.0?

I tested a 23byte data transition in iPhone 5s with Softdevice 3.1.0, sdk12.2 . it is ok. I know that iphone 5s is ble 4.0.

So I thought it would be possible on Android(Galaxy tab s, samsung, ble 4.0).

in nRf connect tool, I sent 23 bytes, but only 20 bytes.

Can not send more than 20 bytes at a time in Android platform BLE 4.0?

  • I'm afraid you are mixing things and mainly BLE layers. In general you can transport any amount of data over any BT LE compliant device regardless BT SIG Core specification release (4.0/4.1/4.2/5.0/...) What exactly is your interest?

  • Thank you for answer. I would like to transfer 23 byte packets regardless of iOS, android platform. However, using the nrf connect tool on the android platform seems to be limited to 20 bytes.

    Is there a 20-byte limit, depending on the mobile platform?

    With softdevice 3.1.0, can I transfer 23 bytes regardless of the mobile platform?

  • You are still not very specific;) As you are talking about mobile APIs I assume it runs over GATT layer. There is something called "default ATT_MTU size" which says what is basic "fragment" (packet if you want) exchanged on BLE Attribute Protocol layer. GATT runs on top of it and APP again on GATT. ATT/GATT overhead are 3 bytes so by default you have 20 bytes for your application. However structures (objects) which are living on GATT layer can be longer then that (up to 512 bytes) and GATT provides methods (functions/commands) how to handle such long data even ATT_MTU stays at 23 bytes. There is ATT_MTU exchange procedure defined on ATT layer where both sides exchange their capabilities and protocol automatically "upgrades" to minimum of their maximum capabilities. Today's phones typically support 150-190B but embedded devices on the other side might insist on default value 23B.

  • You can find an example that shows ATT MTU exchange and DLE with SDK 12.2 here.

Related