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

How is nrfConnect android app able to send more than 20 bytes from android app to raspberrypi?

Hi,

I am trying to write a 120 byte data through ble to raspberrypi from my android app(I increased the MTU to the required limit). But all I am able to transfer is first 20 bytes. When I tried to search on the internet, I see that android limits the size to 20 byte for ble transfers and I will have to send multiple 20 byte packets.

But why I tried to end the same data from nrfConnect android app, I see that the data is being transferred without any issue. Can you help me understand how nrfConnect is able to do it with you writing it as packets?

I tried to use reliableWrite(below). But even that has sent on 20 bytes.

            gatt.beginReliableWrite();
            gatt.writeCharacteristic(characteristic);
            return gatt.executeReliableWrite();

Related