BLE Create a Service

Hi !!

I am reading the example codes of BLE in Arduino IDE. I would like to know if i hacecreate a new service what number i can use. In this example, is 19B10010-E8F2-537E-4F6C-D104768A1214 and for all characteristics created the application add 1 to first part of the big number:

BLEService ledService("19B10010-E8F2-537E-4F6C-D104768A1214"); // create service

// create switch characteristic and allow remote device to read and write
BLECharCharacteristic ledCharacteristic("19B10011-E8F2-537E-4F6C-D104768A1214", BLERead | BLEWrite);
// create button characteristic and allow remote device to get notifications
BLECharCharacteristic buttonCharacteristic("19B10012-E8F2-537E-4F6C-D104768A1214", BLERead | BLENotify); // allows remote device to get notifications

If i wanted to add a new characteristic to send a text message,I should create the characteristic like this:

BLECharCharacteristic textCharacteristic("19B10013-E8F2-537E-4F6C-D104768A1214", BLERead | BLENotify);

and if I want to create a default mesaage I could use :

textCharacteristic.setValue("Hello this is a message");

Thanks in advance

If your question is "is it OK to use this UUID?" then yes, that looks OK.

There is a limit on the number of bytes/characters you can store in one characteristic. That limit is defined to be 20 bytes (the size of one packet) as far as I know. So your default message may be too large. (Of course, things are changing in the background so my information may be out of date.)