arduino-esp32/libraries
Jimmy Durand Wesolowski 360e04fa36
Fixing BLE GATT Characteristic notification and Characteristic Descriptor read (#4464)
* 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>
2020-11-02 18:36:25 +02:00
..
ArduinoOTA #4293 added missing '<tr>' (#4450) 2020-10-27 15:35:54 +02:00
AsyncUDP Update AsyncUDP library.json (#2837) 2019-06-05 13:43:15 +02:00
AzureIoT@5e8ffb2111 Updated AzureIoT submodule. (#4322) 2020-10-01 15:38:56 +03:00
BLE Fixing BLE GATT Characteristic notification and Characteristic Descriptor read (#4464) 2020-11-02 18:36:25 +02:00
BluetoothSerial Fix SerialBT.flush (#3579) 2020-01-20 22:34:57 +02:00
DNSServer adds debugging to dnsserver (#1046) 2020-10-03 02:59:55 +03:00
EEPROM fix EEPROM class example (#3786) 2020-09-30 14:43:05 +03:00
ESP32 Add an aditional (void *) arg to the RMT callback (much like Ticker() et.al.). (#3345) 2020-10-14 14:41:50 +03:00
ESPmDNS Update MDNSResponder::addService to return a boolean (#4365) 2020-10-01 15:44:24 +03:00
FFat Added file.close to examples (#3611) 2020-01-20 16:47:40 +02:00
FS rmdir causes issues in SPIFFS. Fixes #4138, albeit not very cleanly (#4154) 2020-10-01 13:52:24 +03:00
HTTPClient Fix support for following redirects added by ee88c42c3b (#4240) (#4385) 2020-10-14 14:32:47 +03:00
HTTPUpdate Add missing slashes in HTTPUpdate examples (#4238) 2020-10-03 02:13:27 +03:00
NetBIOS Update IDF to aaf1239 (#1539) 2018-06-27 09:01:06 +02:00
Preferences Refactored use of LOG_X(LOG_TAG, ...) to log_x(...) (#2672) 2019-04-15 17:26:35 +02:00
SD Set SD state to idle before unregister (reduces power) (#4272) 2020-10-01 15:31:16 +03:00
SD_MMC Update SD_MMC.cpp (#4020) 2020-05-22 11:07:40 +03:00
SimpleBLE Update IDF to aaf1239 (#1539) 2018-06-27 09:01:06 +02:00
SPI Small description comment correction (#4471) 2020-11-02 18:35:23 +02:00
SPIFFS Added file.close to examples (#3611) 2020-01-20 16:47:40 +02:00
Ticker Fix long Ticker period conversion: cast ms to uint64_t when calculating us (#3175) 2019-09-05 10:34:47 +03:00
Update Reinit updater md5 related fields (#4260) 2020-10-01 15:29:58 +03:00
WebServer WebServer.handleClient delay (#4350) 2020-10-01 15:42:23 +03:00
WiFi Fixes #4435 - WiFiClient improperly treats zero data available for read as an error (#4448) 2020-10-27 12:01:41 +02:00
WiFiClientSecure Add an aditional (void *) arg to the RMT callback (much like Ticker() et.al.). (#3345) 2020-10-14 14:41:50 +03:00
Wire Add Wire:setPins(sda, scl) 2020-07-19 02:21:15 +03:00
README.md Added a description README.md for libraries (#3349) 2019-10-14 20:37:09 +03:00

ESP32 Libraries

arduino-esp32 includes libraries for Arduino compatibility along with some object wrappers around hardware specific devices. Examples are included in the examples folder under each library folder. The ESP32 includes additional examples which need no special drivers.

ArduinoOTA

Over The Air firmware update daemon. Use espota.py to upload to the device.

AsyncUDP

Asynchronous task driven UDP datagram client/server

AzureIoT

Library to interact with Microsoft Azure IoT services

BLE

Bluetooth Low Energy v4.2 client/server framework

BluetoothSerial

Serial to Bluetooth redirection server

DNSServer

A basic UDP DNS daemon (includes captive portal demo)

EEPROM

Arduino compatibility for EEPROM (using flash)

ESP32

Additional examples

  • AnalogOut
  • Camera
  • ChipID
  • DeepSleep
  • ESPNow
  • FreeRTOS
  • GPIO
  • HallSensor
  • I2S
  • ResetReason
  • RMT
  • Time
  • Timer
  • Touch

ESPmDNS

mDNS service advertising

FFat

FAT indexed filesystem on SPI flash

FS

Filesystem virtualization framework

HTTPClient

A simple HTTP client, compatible with WiFiClientSecure

HTTPUpdate

Download a firmware update from HTTPd and apply it using Update

NetBIOS

NetBIOS name advertiser

Preferences

Flash keystore using ESP32 NVS

SD

Secure Digital card filesystem using SPI access

SD_MMC

Secure Digital card filesystem using 4-lane access

SimpleBLE

Minimal BLE advertiser

SPI

Arduino compatible Serial Peripheral Interface driver (master only)

SPIFFS

SPI Flash Filesystem (see spiffs-plugin to upload to device)

Ticker

A timer to call functions on an interval

Update

Sketch Update using ESP32 OTA functionality

WebServer

A simple HTTP daemon

WiFi

Arduino compatible WiFi driver (includes Ethernet driver)

WiFiClientSecure

Arduino compatible WiFi client object using embedded encryption

Wire

Arduino compatible I2C driver (master only)