8000 Update BLERemoteCharacteristic.cpp · mkarpicki/esp32-snippets@4077bb0 · GitHub
[go: up one dir, main page]

8000
Skip to content

Commit 4077bb0

Browse files
authored
Update BLERemoteCharacteristic.cpp
Added patch for never ending wait for read value in notification callback ( found on https://esp32.com/viewtopic.php?t=4181 )
1 parent 91e1571 commit 4077bb0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cpp_utils/BLERemoteCharacteristic.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,10 @@ std::string BLERemoteCharacteristic::readValue() {
425425
ESP_LOGE(LOG_TAG, "esp_ble_gattc_read_char: rc=%d %s", errRc, GeneralUtils::errorToString(errRc));
426426
return "";
427427
}
428-
428+
429+
//patch solution found on https://esp32.com/viewtopic.php?t=4181
430 4DB4 +
m_semaphoreReadCharEvt.give();
431+
429432
// Block waiting for the event that indicates that the read has completed. When it has, the std::string found
430433
// in m_value will contain our data.
431434
m_semaphoreReadCharEvt.wait("readValue");

0 commit comments

Comments
 (0)
0