diff --git a/libraries/Adafruit_nRFCrypto b/libraries/Adafruit_nRFCrypto index 9b62a1b9..48b08a59 160000 --- a/libraries/Adafruit_nRFCrypto +++ b/libraries/Adafruit_nRFCrypto @@ -1 +1 @@ -Subproject commit 9b62a1b9a36df5990868f3c058422b17c5de0447 +Subproject commit 48b08a59d11b167c6b3c124db043a6df81cf5007 diff --git a/libraries/Bluefruit52Lib/examples/Peripheral/clearbonds/clearbonds.ino b/libraries/Bluefruit52Lib/examples/Peripheral/clearbonds/clearbonds.ino index 7e0c59b2..5a972055 100644 --- a/libraries/Bluefruit52Lib/examples/Peripheral/clearbonds/clearbonds.ino +++ b/libraries/Bluefruit52Lib/examples/Peripheral/clearbonds/clearbonds.ino @@ -22,7 +22,11 @@ void setup() { Serial.begin(115200); -// while ( !Serial ) delay(10); // for nrf52840 with native usb + +#if CFG_DEBUG + // Blocking wait for connection when debug mode is enabled via IDE + while ( !Serial ) yield(); +#endif Serial.println("Bluefruit52 Clear Bonds Example"); Serial.println("-------------------------------\n"); diff --git a/libraries/Bluefruit52Lib/examples/Peripheral/pairing_passkey/pairing_passkey.ino b/libraries/Bluefruit52Lib/examples/Peripheral/pairing_passkey/pairing_passkey.ino index 5d7d870e..b1f45758 100644 --- a/libraries/Bluefruit52Lib/examples/Peripheral/pairing_passkey/pairing_passkey.ino +++ b/libraries/Bluefruit52Lib/examples/Peripheral/pairing_passkey/pairing_passkey.ino @@ -119,7 +119,8 @@ void setup() // Configure and Start BLE Uart Service // Set Permission to access BLE Uart is to require man-in-the-middle protection - // This will cause central to perform pairing with static PIN we set above + // This will cause central to perform pairing with a generated passkey, the passkey will + // be printed on display or Serial and wait for our input Serial.println("Configure BLE Uart to require man-in-the-middle protection for PIN pairing"); bleuart.setPermission(SECMODE_ENC_WITH_MITM, SECMODE_ENC_WITH_MITM); bleuart.begin(); @@ -266,7 +267,7 @@ bool pairing_passkey_callback(uint16_t conn_handle, uint8_t const passkey[6], bo uint32_t justReleased; do { - // Disconnected while waiting for input + // Peer is disconnected while waiting for input if ( !Bluefruit.connected(conn_handle) ) break; // time out @@ -286,7 +287,7 @@ bool pairing_passkey_callback(uint16_t conn_handle, uint8_t const passkey[6], bo // wait until either button is pressed (30 seconds timeout) while( digitalRead(BUTTON_YES) && digitalRead(BUTTON_NO) ) { - // Disconnected while waiting for input + // Peer is disconnected while waiting for input if ( !Bluefruit.connected(conn_handle) ) break; // time out @@ -355,6 +356,9 @@ void disconnect_callback(uint16_t conn_handle, uint8_t reason) Serial.print("Disconnected, reason = 0x"); Serial.println(reason, HEX); #ifdef USE_ARCADA + tft->fillScreen(ARCADA_BLACK); + tft->setTextSize(2); + tft->setCursor(0, 0); tft->println("Advertising ..."); #endif }