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);