Hi everyone,
my colleague developed a firmware using Arduino Nano 33 BLE and PlatformIO. Now I have to rewrite the code using Segger Embedded Studio. The problem is in the declaration of the characteristics of a service. There are in fact two characteristics that have different base UUIDs.
My colleague added these characteristics using the following code:
//Battery Service
BLEService Battery_service("72050700-df73-4f35-8e62-965e9d019cb3");
BLEStringCharacteristic Battery_SerialID("72050701-df73-4f35-8e62-965e9d019cb3", BLERead, 17);
BLEStringCharacteristic Battery_Hardware_rev("72050702-df73-4f35-8e62-965e9d019cb3", BLERead, 12);
BLEStringCharacteristic Battery_Firmware_rev("72050703-df73-4f35-8e62-965e9d019cb3", BLERead, 12);
BLEUnsignedCharCharacteristic Battery_charge("72050704-df73-4f35-8e62-965e9d019cb3", BLERead | BLENotify);
BLEShortCharacteristic Battery_temperature("72050705-df73-4f35-8e62-965e9d019cb3", BLERead | BLENotify);
BLEUnsignedCharCharacteristic Battery_health("72050706-df73-4f35-8e62-965e9d019cb3", BLERead);
BLEUnsignedShortCharacteristic Battery_cycles("72050707-df73-4f35-8e62-965e9d019cb3", BLERead);
BLEUnsignedCharCharacteristic Battery_warning("72050708-df73-4f35-8e62-965e9d019cb3", BLERead | BLEWrite);
BLEUnsignedCharCharacteristic Battery_settings("72050709-df73-4f35-8e62-965e9d019cb3", BLERead | BLEWrite);
//Authentication Service
BLEService Autentication_service("00000001-0000-4f35-8e62-965e9d019cb3");
BLEUnsignedShortCharacteristic KeyA("00000001-0001-4f35-8e62-965e9d019cb3", BLERead);
BLEUnsignedShortCharacteristic KeyB("00000001-0002-4f35-8e62-965e9d019cb3", BLERead | BLEWrite);
...
//Battery Service --> Add Characteristics
Bluetooth::Battery_service.addCharacteristic(Battery_SerialID);
Bluetooth::Battery_service.addCharacteristic(Battery_Hardware_rev);
Bluetooth::Battery_service.addCharacteristic(Battery_Firmware_rev);
Bluetooth::Battery_service.addCharacteristic(Battery_charge);
Bluetooth::Battery_service.addCharacteristic(Battery_temperature);
Bluetooth::Battery_service.addCharacteristic(Battery_health);
Bluetooth::Battery_service.addCharacteristic(Battery_cycles);
Bluetooth::Battery_service.addCharacteristic(Battery_warning);
Bluetooth::Battery_service.addCharacteristic(Battery_settings);
//Authentication Service
Bluetooth::Autentication_service.addCharacteristic(KeyA);
Bluetooth::Autentication_service.addCharacteristic(KeyB);
I know well how to implement the battery service and its characteristics using Segger Embedded Studio.
In fact, the characteristics of the battery have a UUID that respects the 7205xxxx-df73-4f35-8e62-965e9d019cb3 structure. As indicated in this guide.
The authentication service, on the other hand, has two characteristics that do not respect the aforementioned structure.
How do I add these two characteristics?
Thanks so much.
