sandeepmistry / arduino-BLEPeripheral

An Arduino library for creating custom BLE peripherals with Nordic Semiconductor's nRF8001 or nR51822.
MIT License
462 stars 179 forks source link

[Question] Sending long string BLECharacteristic #288

Open jLynx opened 3 years ago

jLynx commented 3 years ago

Hi so I am still new to this and learning so forgive me if I have not understood something correctly.

I am trying to send a 80 character long string with BLECharacteristic.

My current code I have:

BLEService testService = BLEService("CCC0");
BLECharacteristic testCharacteristic = BLECharacteristic("CCC1", BLERead, "LSZ09ABBASETWFACUGBJYPN5Z042JK26X332H60JT58W16YCMTGG5F3B3YUAV5VASR0OH4NKGYXMUKBZ");

But when I request the value on my phone, I only get the first 20 characters which are LSZ09ABBASETWFACUGBJ

So my question is, what do I need to do in order to send the full string across?

Is there a way to do it in one go, or does it need to be broken up into multiple transmissions of 20 characters?

I have also seen something about changing the default MTU size from 20 to something higher, is this possible to do?

Thanks!