From b6dcc5a0e4545cdf7e1a3a2eac3fb7633d286dff Mon Sep 17 00:00:00 2001 From: PaulaScharf Date: Mon, 29 Jul 2024 18:22:44 +0200 Subject: [PATCH] add function to set MCUId --- src/SenseBoxBLE.cpp | 4 ++++ src/SenseBoxBLE.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/SenseBoxBLE.cpp b/src/SenseBoxBLE.cpp index 9068862..db7129d 100755 --- a/src/SenseBoxBLE.cpp +++ b/src/SenseBoxBLE.cpp @@ -83,6 +83,10 @@ String SenseBoxBLE::getMCUId(){ return port.parseStringResponse("AT+UMLA=1",1000); } +void SenseBoxBLE::setMCUId(String address){ + port.parseStringResponse("AT+UMLA=1,"+address,1000); +} + /** * @brief Adds a characteristic to the BLE module. * diff --git a/src/SenseBoxBLE.h b/src/SenseBoxBLE.h index e2be5e3..eddb8dc 100755 --- a/src/SenseBoxBLE.h +++ b/src/SenseBoxBLE.h @@ -32,6 +32,7 @@ class SenseBoxBLE static int setConfigCharacteristic(const char* serviceUUID, const char* characteristicUUID); static void setName(String name); static String getMCUId(); + static void setMCUId(String name); static bool write(int, float&); static bool write(int, float&, float&);