Skip to content

Fix handling of registerForNotify in BLERemoteCharacteristic.cpp #4063

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 30, 2020

Conversation

buxtronix
Copy link
Contributor

Some devices (eg some cheap iTag buttons) don't have descriptor 0x2902. Make it optional instead. For these devices, notify still works.

Debugged with ESP Exception Decoder:

PC: 0x400d56ff: BLERemoteDescriptor::writeValue(unsigned char*, unsigned int, bool) at /home/bb/Desktop/Arduino/libraries/ESP32_BLE_Arduino/src/BLERemoteDescriptor.cpp line 40
EXCVADDR: 0x00000030

Decoding stack results
0x400d56ff: BLERemoteDescriptor::writeValue(unsigned char*, unsigned int, bool) at /home/bb/Desktop/Arduino/libraries/ESP32_BLE_Arduino/src/BLERemoteDescriptor.cpp line 40
0x400d4d6f: BLERemoteCharacteristic::registerForNotify(void (*)(BLERemoteCharacteristic*, unsigned char*, unsigned int, bool), bool) at /home/bb/Desktop/Arduino/libraries/ESP32_BLE_Arduino/src/BLERemoteCharacteristic.cpp line 485
0x400d19ea: connectToServer(BLEAddress) at /home/bb/Desktop/Arduino/itag-test/itag-test.ino line 104
0x400d1bbe: loop() at /home/bb/Desktop/Arduino/itag-test/itag-test.ino line 120
0x400d90c9: loopTask(void*) at /home/bb/.arduino15/packages/esp32/hardware/esp32/1.0.2/cores/esp32/main.cpp line 19
0x40092c55: vPortTaskWrapper at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/port.c line 143

@me-no-dev me-no-dev merged commit 342b9cf into espressif:master Sep 30, 2020
@buxtronix buxtronix deleted the notify-fix branch October 1, 2020 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants