adafruit / Adafruit_nRF52_Arduino

Adafruit code for the Nordic nRF52 BLE SoC on Arduino
Other
629 stars 501 forks source link

support query BLEClientCharacteristic encryption level #213

Open hathach opened 5 years ago

hajdbo commented 5 years ago

Context: see comment https://github.com/adafruit/Adafruit_nRF52_Arduino/issues/183#issuecomment-452729453

Excerpt: the log indicate the pairing error, the Bluefruit.Gap.requestPairing() return code 0x85 means your keyboard does not support pairing. MIDI specs removed the pairing requirement, and only recommend instead of must support pairing now.

[BLE   ] BLE_GAP_EVT_AUTH_STATUS : Conn Handle = 0
void BLEGap::_eventHandler(ble_evt_t*): 348: status->auth_status = 0x85 /*< Pairing not supported. */

The RIGHT solution is of course you have to check the midi characteristics read/write encryption level to see if pairing is needed or not. Such as query function is not implemented yet.