1 parent
2c6526fcdb
commit
717bdb1f06
2 files changed
+3
No files matched your search
@@ -569,6 +569,8 @@ void BLEconnect() {
|
|||||||
if (pRemoteCharacteristic->canNotify()) {
|
if (pRemoteCharacteristic->canNotify()) {
|
||||||
Log.trace(F("Registering notification" CR));
|
Log.trace(F("Registering notification" CR));
|
||||||
pRemoteCharacteristic->subscribe(true, notifyCB);
|
pRemoteCharacteristic->subscribe(true, notifyCB);
|
||||||
|
delay(BLE_CNCT_TIMEOUT);
|
||||||
|
pClient->disconnect();
|
||||||
} else {
|
} else {
|
||||||
Log.notice(F("Failed registering notification" CR));
|
Log.notice(F("Failed registering notification" CR));
|
||||||
pClient->disconnect();
|
pClient->disconnect();
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ extern void MQTTtoBT(char* topicOri, JsonObject& RFdata);
|
|||||||
#define BLEdelimiterLength 16
|
#define BLEdelimiterLength 16
|
||||||
#define CRLR "0d0a"
|
#define CRLR "0d0a"
|
||||||
#define CRLR_Length 4
|
#define CRLR_Length 4
|
||||||
|
#define BLE_CNCT_TIMEOUT 3000
|
||||||
|
|
||||||
#define ServicedataMinLength 29
|
#define ServicedataMinLength 29
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user