diff --git a/ESPBMS.ino b/ESPBMS.ino index 6f0c3f6..122772f 100644 --- a/ESPBMS.ino +++ b/ESPBMS.ino @@ -88,7 +88,7 @@ void loop() { } // Register callback for remote characteristic (receive channel) - Serial.println("Get BMS receive characteristic..."); + Serial.println("Register callback for remote characteristic..."); if (pRemoteCharacteristic_rx->canNotify()){ pRemoteCharacteristic_rx->registerForNotify(MyNotifyCallback); }else{ @@ -152,6 +152,7 @@ void loop() { } } Serial.println("Disconnect"); + pRemoteCharacteristic_rx->unregisterForNotify(); pClient->disconnect(); } }