Skip to content

Commit e1c7840

Browse files
committed
correct parameter for pairing in central role
1 parent 0e74a76 commit e1c7840

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

libraries/Bluefruit52Lib/src/BLEGap.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,11 @@ void BLEGap::_eventHandler(ble_evt_t* evt)
318318
}
319319
};
320320

321-
VERIFY_STATUS(sd_ble_gap_sec_params_reply(evt->evt.gap_evt.conn_handle, BLE_GAP_SEC_STATUS_SUCCESS, &_sec_param, &keyset), RETURN_VOID);
321+
VERIFY_STATUS(sd_ble_gap_sec_params_reply(conn_hdl,
322+
BLE_GAP_SEC_STATUS_SUCCESS,
323+
peer->role == BLE_GAP_ROLE_PERIPH ? &_sec_param : NULL,
324+
&keyset),
325+
);
322326
}
323327
break;
324328

0 commit comments

Comments
 (0)