From 7f8c320b5adda95a98b770c32a845a2f3c04e5fe Mon Sep 17 00:00:00 2001 From: chopster44 Date: Sat, 29 Nov 2025 23:02:47 +0000 Subject: [PATCH] set command type to notify --- src/BLEOTA.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/BLEOTA.cpp b/src/BLEOTA.cpp index 2001ac4..5108fd4 100644 --- a/src/BLEOTA.cpp +++ b/src/BLEOTA.cpp @@ -7,7 +7,7 @@ BLEOTAClass::BLEOTAClass() : pVersionNumber_(new BLECharacteristic(VERSION_NUMBER_UUID, BLECharacteristic::PROPERTY_READ)), pVersionNumberDescriptor_(new BLEDescriptor(VERSION_NUMBER_DESCRIPTOR_UUID)), - pOTACommand_(new BLECharacteristic(OTA_COMMAND_UUID, BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_WRITE)), + pOTACommand_(new BLECharacteristic(OTA_COMMAND_UUID, BLECharacteristic::PROPERTY_NOTIFY | BLECharacteristic::PROPERTY_WRITE)), pOTACommandDescriptor_(new BLEDescriptor(OTA_COMMAND_DESCRIPTOR_UUID)), pOTAFile_(new BLECharacteristic(OTA_FILE_UUID, BLECharacteristic::PROPERTY_WRITE)), pOTAFileDescriptor_(new BLEDescriptor(OTA_FILE_DESCRIPTOR_UUID)) { @@ -45,6 +45,7 @@ void BLEOTAClass::setOTAcommand(otaCommand cmd) { uint8_t commandBuffer[1] = {}; commandBuffer[0] = cmd; pOTACommand_->setValue(commandBuffer, 1); + pOTACommand_->notify(); currentCommand_ = cmd; }