0.22.0 - 2021.05.19
This version implement comprehensive LESC and Legacy pairing using dynamic & static Passkey.
- Support static passkey (Legacy only)
- Support LESC on nRF52840 using hardware-accelerated ARM CryptoCell CC310 provided by Adafruit_nRFCypto. The library is included as submodule and released together with the BSP.
- Rework bonding mechanism to use IRK for peer finding. It is advisable to run
clearbonds
example to clean up bond files of previous version - Add setPins() to SPI class
- Fix bug that with saving cccd data
- Add more pinMode type: INPUT_SENSE_HIGH, INPUT_SENSE_LOW, OUTPUT_S0S1 etc ...
- Optimize mutex usage in UART
- Add analogReadVDD() function
- Update itoa.c for compiling with c++17
- Fix BLEBeacon endian for major and minor
- Fix compiling with MIDI v5, adding stub for BLEMidi's beginTransmission() and endTransmission()
- Update BSP core to work with Adafruit_TinyUSB_Arduino version 1.0.0
BLESecurity
A new class BLESecurity (access with Bluefruit.Security) is added to handle security and pairing.
- setPIN() to set static passkey, this will force to use Legacy Pairing
- setIOCaps() to congiure IO capacities
- setMITM() to enable/disable Man in The Middle protection (passkey), it is auto-enabled when using passkey
- setPairPasskeyCallback() to register callback for displaying pairing passkey to user
- setPairCompleteCallback() to register callback for the result of pairing procedure (succeeded or failed)
- setSecuredCallback() to register callback which invoked when connection is secured. This happens after he pairing procedure is complete, or we re-connect with preivously bonded peer device
Other Changes
BLECentral
- will automatically use stored Long Term Key to secure connection if paired/bonded with device previously
Bluefruit
- Bluefruit::requestPairing() is removed, please use the BLEConnection::requestPairing() instead
- Bluefruit::connPaired() is removed, please use BLEConnection::secure() instead
- Default Device name is USB_PRODUCT if available e.g CLUE, Circuit Playground Bluefruit, Feather nRF52840 Express etc ...
- Rename function for consistency BLEPeriph's setSlaveLatency() to setConnSlaveLatency()
BLEService
- Added setPermission()
BLEConnection
- BLEConnection::requestPairing() is now non-blocking, it will return right after sending request to peer device. Previously it is blocked until the pairing process is complete.
- Added BLEConnection::secured() to check if the connection is secured/encrypted
- Added BLEConnection::bonded() to check if we store Longterm Key with current peer
- Removed BLEConnection:paried(), user should either use secured() or bonded() depending on the context
- If bonded, getPeerAddr() will return peer public address instead of random address.
- Rename getConnSupervisionTimeout() to getSupervisionTimeout()
New Example Sketches
- pairing_pin to use static PIN for peripheral role
- pairing_passkey to use dyanmic Passkey for pairing. On Arcada compatible device such as
CLUE
orCircuit Playground Bluefruit
, TFT display will also be used to display passkey. - cental_pairing similar to pairing_passkey but for nRF running central role
- ancs_arcada for displaying ancs on arcada such CLUE and/or CPB.
- arduino_science_journal add sketch to run with Arduino Science Journal
- adv_AdafruitColor example to tie Arduino to CircuitPython BLE color