Maximum array limit in BLE

Hello
My app is recieving array on BLE. Up to array size 20 Bytes, everything is ok, but I am not able to receive array more than 20 bytes.
Please suggest way to solve this.

component_method

  • RequestMTU – Requests a new minimum transmission unit (MUT) for the BluetoothLE connection. This feature is only supported when both devices support Bluetooth 4.2 or higher. If the MTU is changed successfully, the MTUChanged event will be run. The default MTU is 20.This block is intended for advanced apps that need to change the size of the messages sent between the BLE devices. Most developers will not need to adjust this value.Parameters:
    • bytes (number) — The desired MTU size.

Maybe "minimum transmission unit" should read "maximum transmission unit"?

1 Like

I changed the MTU but it is not working. I see MTU for HM-10 can not be changed as it is BLE4.0
Please suggest a way to receive data more than 20 byte.

What's in the array?

there are 30 voltage sensors,, one byte data from each sensor.

You could send text readings, one at a time, in YAML format:
println('v1:', nnn);
println('v2:', nnn);
...
println('v30:', nnn);

(I don't know how to send text in BLE)

On the receiving end, split each incoming message at ':' to get the ID in item 1 and the reading in item 2.

i made it work... i set the flag and receiving alternatively 15 bytes each time...

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.