360e04fa36
* BLERemoteChar: fix descriptor 2902 write for characteristic notifications When registering a notification on a characteristic, the 2902 descriptor (CCCD) value is set to 1 (or 2 for indication). According to the BLUETOOTH CORE SPECIFICATION Version 5.2, Revision Date 2019-12-31, section 4.12.3 "Write Characteristic Descriptors" (page 1588), the characteristic descriptor write must expect a response. Currently, the descriptor write is performed without expecting a reponse, which prevents the notification to be functional with some BLE stacks. This commit modify the write to expect the response. Signed-off-by: Jimmy Durand Wesolowski <jimmy.durand.wesolowski@commsolid.com> * BLERemoteChar: forward GATT client event to characteristic descriptors This commits prevents a permanent wait when calling BLERemoteDescriptor readValue function, on the m_semaphoreReadDescrEvt semaphore. ESP32 BLE stack calls to remote characteristic - notification, - value read - value write and remote characteristic descriptor - value read are asynchronous. When such a call is performed by this library, a semaphore is taken prior to the BLE stack read or write operation, and waited on after it. Releasing the semaphore is done by the characteristic event handling function (gattClientEventHandler), when the appropriate event is received. However, the characteristic descriptor events are discarded, and the value read semaphore is never released. This commits forwards the GATT client events from the remote characteristic down to their remote characteristic descriptor, and implements their event handling. Adding a semaphore for the remote characteristic descriptor value write will be done in a separate commit. Signed-off-by: Jimmy Durand Wesolowski <jimmy.durand.wesolowski@commsolid.com> * BLERemoteDescriptor: add semaphore to characteristic descriptor write This adds a semaphore to characteristic descriptor value write, to mimic the value read function, and to ensure completion of the operation before we carry on. Signed-off-by: Jimmy Durand Wesolowski <jimmy.durand.wesolowski@commsolid.com> Co-authored-by: Jimmy Durand Wesolowski <jimmy.durand.wesolowski@commsolid.com> |
||
---|---|---|
.github | ||
cores/esp32 | ||
docs | ||
libraries | ||
package | ||
tools | ||
variants | ||
.gitignore | ||
.gitmodules | ||
.travis.yml | ||
boards.txt | ||
CMakeLists.txt | ||
component.mk | ||
Kconfig.projbuild | ||
LICENSE.md | ||
Makefile.projbuild | ||
package.json | ||
platform.txt | ||
programmers.txt | ||
README.md |
Arduino core for the ESP32
Need help or have a question? Join the chat at
Contents
- Development Status
- Installation Instructions
- Decoding Exceptions
- Issue/Bug report template
- ESP32Dev Board PINMAP
Development Status
Installation Instructions
- Using Arduino IDE Boards Manager (preferred)
- Using Arduino IDE with the development repository
- Using PlatformIO
- Building with make
- Using as ESP-IDF component
- Using OTAWebUpdater
Decoding exceptions
You can use EspExceptionDecoder to get meaningful call trace.
Issue/Bug report template
Before reporting an issue, make sure you've searched for similar one that was already created. Also make sure to go through all the issues labelled as for reference.
Finally, if you are sure no one else had the issue, follow the ISSUE_TEMPLATE while reporting any issue.
ESP32Dev Board PINMAP
Tip
Sometimes to program ESP32 via serial you must keep GPIO0 LOW during the programming process