Skip to content

Commit 6077421

Browse files
committed
NimBLEClient::handleGapEvent() {
case BLE_GAP_EVENT_PASSKEY_ACTION: } else if (event->passkey.params.action == BLE_SM_IOACT_INPUT || event->passkey.params.action == BLE_SM_IOACT_DISP) { ... } } Add BLE_SM_IOACT_DISP action. This action is necessary when using NimBLEDevice::setSecurityIOCap(BLE_HS_IO_DISPLAY_ONLY).
1 parent 6f0b9dd commit 6077421

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NimBLEClient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1205,7 +1205,7 @@ int NimBLEClient::handleGapEvent(struct ble_gap_event* event, void* arg) {
12051205
// pClient->onOobPairingRequest(pkey.oob);
12061206
// rc = ble_sm_inject_io(event->passkey.conn_handle, &pkey);
12071207
// NIMBLE_LOGD(LOG_TAG, "ble_sm_inject_io result: %d", rc);
1208-
} else if (event->passkey.params.action == BLE_SM_IOACT_INPUT) {
1208+
} else if (event->passkey.params.action == BLE_SM_IOACT_INPUT || event->passkey.params.action == BLE_SM_IOACT_DISP) {
12091209
NIMBLE_LOGD(LOG_TAG, "Enter the passkey");
12101210
pClient->m_pClientCallbacks->onPassKeyEntry(peerInfo);
12111211
} else if (event->passkey.params.action == BLE_SM_IOACT_NONE) {

0 commit comments

Comments
 (0)