From d34dfec1ce6aedaabfb49bd93172f5f8b9be411c Mon Sep 17 00:00:00 2001 From: eddy Date: Thu, 30 Jul 2026 17:07:26 +0200 Subject: [PATCH] feat: add firmware version BLE characteristic (VERSION_UUID) --- src/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 280da7b..458a7d3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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);