Special exception message for when pairing prompt is ignored.

This commit is contained in:
Scott Shawcroft 2019-11-21 16:32:28 -08:00
parent 39f4046f70
commit e63796c7bc
No known key found for this signature in database
GPG Key ID: 9349BC7E64B1921E

View File

@ -74,7 +74,14 @@ void check_sec_status(uint8_t sec_status) {
if (sec_status == BLE_GAP_SEC_STATUS_SUCCESS) {
return;
}
mp_raise_bleio_SecurityError(translate("Unknown security error: 0x%04x"), sec_status);
switch (sec_status) {
case BLE_GAP_SEC_STATUS_UNSPECIFIED:
mp_raise_bleio_SecurityError(translate("Unspecified issue. Can be that the pairing prompt on the other device was declined or ignored."));
return;
default:
mp_raise_bleio_SecurityError(translate("Unknown security error: 0x%04x"), sec_status);
}
}
// Turn off BLE on a reset or reload.