feat: add firmware version BLE characteristic (VERSION_UUID)

This commit is contained in:
eddy 2026-07-30 17:07:26 +02:00
commit d34dfec1ce

View file

@ -15,6 +15,7 @@
#define SERVICE_UUID "4fafc201-1fb5-459e-8fcc-c5c9c331914b"
#define CHARACTERISTIC_UUID "beb5483e-36e1-4688-b7f5-ea07361f26d8"
#define UUID_CHAR_UUID "beb5483e-36e1-4688-b7f5-ea07361f26d9"
#define VERSION_UUID "beb5483e-36e1-4688-b7f5-ea07361f26db"
#define HMAC_PKT_SIZE 37 // 1 cmd + 4 seq + 32 hmac
#define HMAC_KEY_LEN 32
@ -202,6 +203,12 @@ void setup() {
);
pUuidChar->setValue(deviceUuid, ESP_UUID_LEN);
NimBLECharacteristic *pVersionChar = pService->createCharacteristic(
VERSION_UUID,
NIMBLE_PROPERTY::READ
);
pVersionChar->setValue(FIRMWARE_VERSION);
NimBLEAdvertising *pAdvertising = NimBLEDevice::getAdvertising();
pAdvertising->setName("SylDa_Server");
pAdvertising->addServiceUUID(SERVICE_UUID);