mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-17 07:19:42 +00:00
example/sm_peripheral + sm_central: improve comment, add example config for keyboard entry
This commit is contained in:
parent
1a7e85f4f8
commit
321122182e
@ -69,7 +69,7 @@
|
||||
#define REMOTE_SERVICE 0x1111
|
||||
|
||||
// Fixed passkey - used with sm_pairing_peripheral. Passkey is random in general
|
||||
#define FIXED_PASSKEY 12346
|
||||
#define FIXED_PASSKEY 123456
|
||||
|
||||
|
||||
static btstack_packet_callback_registration_t hci_event_callback_registration;
|
||||
@ -134,10 +134,14 @@ static void sm_pairing_central_setup(void){
|
||||
sm_set_io_capabilities(IO_CAPABILITY_DISPLAY_YES_NO);
|
||||
sm_set_authentication_requirements(SM_AUTHREQ_SECURE_CONNECTION|SM_AUTHREQ_MITM_PROTECTION);
|
||||
|
||||
// LE Legacy Pairing, Passkey entry initiator enter, responder (us) displays
|
||||
// sm_set_io_capabilities(IO_CAPABILITY_DISPLAY_ONLY);
|
||||
// LE Secure Pairing, Passkey entry initiator (us) enters, responder displays
|
||||
// sm_set_io_capabilities(IO_CAPABILITY_KEYBOARD_ONLY);
|
||||
// sm_set_authentication_requirements(SM_AUTHREQ_SECURE_CONNECTION|SM_AUTHREQ_MITM_PROTECTION);
|
||||
// sm_use_fixed_passkey_in_display_role(FIXED_PASSKEY);
|
||||
|
||||
// LE Secure Pairing, Passkey entry initiator (us) displays, responder enters
|
||||
// sm_set_io_capabilities(IO_CAPABILITY_DISPLAY_ONLY);
|
||||
// sm_set_authentication_requirements(SM_AUTHREQ_SECURE_CONNECTION|SM_AUTHREQ_MITM_PROTECTION);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ static void sm_peripheral_setup(void){
|
||||
#ifdef ENABLE_LE_SECURE_CONNECTIONS
|
||||
|
||||
// enable LE Secure Connections Only mode - disables Legacy pairing
|
||||
sm_set_secure_connections_only_mode(true);
|
||||
// sm_set_secure_connections_only_mode(true);
|
||||
|
||||
// LE Secure Connections, Just Works
|
||||
// sm_set_io_capabilities(IO_CAPABILITY_DISPLAY_YES_NO);
|
||||
@ -120,10 +120,14 @@ static void sm_peripheral_setup(void){
|
||||
sm_set_io_capabilities(IO_CAPABILITY_DISPLAY_YES_NO);
|
||||
sm_set_authentication_requirements(SM_AUTHREQ_SECURE_CONNECTION|SM_AUTHREQ_MITM_PROTECTION);
|
||||
|
||||
// LE Legacy Pairing, Passkey entry initiator enter, responder (us) displays
|
||||
// LE Secure Pairing, Passkey entry initiator enter, responder (us) displays
|
||||
// sm_set_io_capabilities(IO_CAPABILITY_DISPLAY_ONLY);
|
||||
// sm_set_authentication_requirements(SM_AUTHREQ_SECURE_CONNECTION|SM_AUTHREQ_MITM_PROTECTION);
|
||||
// sm_use_fixed_passkey_in_display_role(123456);
|
||||
|
||||
// LE Secure Pairing, Passkey entry initiator displays, responder (us) enter
|
||||
// sm_set_io_capabilities(IO_CAPABILITY_KEYBOARD_ONLY);
|
||||
// sm_set_authentication_requirements(SM_AUTHREQ_SECURE_CONNECTION|SM_AUTHREQ_MITM_PROTECTION);
|
||||
#endif
|
||||
|
||||
// setup ATT server
|
||||
|
Loading…
Reference in New Issue
Block a user