mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-23 01:21:28 +00:00
emit SM_IDENTITY_RESOLVING_STARTED event
This commit is contained in:
parent
c3d83d1ea0
commit
cb0c1216da
@ -117,7 +117,6 @@ static void app_packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *
|
||||
// reset connection MTU
|
||||
att_connection.mtu = 23;
|
||||
att_advertisements_enabled = 0;
|
||||
att_ir_lookup_active = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -149,6 +148,9 @@ static void app_packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SM_IDENTITY_RESOLVING_STARTED:
|
||||
att_ir_lookup_active = 1;
|
||||
break;
|
||||
case SM_IDENTITY_RESOLVING_SUCCEEDED:
|
||||
att_ir_lookup_active = 0;
|
||||
att_ir_central_device_db_index = ((sm_event_identity_resolving_t*) packet)->central_device_db_index;
|
||||
@ -203,7 +205,6 @@ static void att_run(void){
|
||||
return;
|
||||
}
|
||||
if (att_ir_lookup_active){
|
||||
// search ongoing,
|
||||
return;
|
||||
}
|
||||
if (att_ir_central_device_db_index < 0){
|
||||
|
@ -1277,14 +1277,15 @@ static void sm_event_packet_handler (void * connection, uint8_t packet_type, uin
|
||||
printf("Incoming connection, own address ");
|
||||
print_bd_addr(sm_s_address);
|
||||
|
||||
// try to lookup device
|
||||
sm_central_device_test = 0;
|
||||
sm_central_device_matched = -1;
|
||||
|
||||
// request security
|
||||
if (sm_s_request_security){
|
||||
sm_state_responding = SM_STATE_SEND_SECURITY_REQUEST;
|
||||
}
|
||||
|
||||
// try to lookup device
|
||||
sm_central_device_test = 0;
|
||||
sm_central_device_matched = -1;
|
||||
sm_notify_client_identity_resolving(SM_IDENTITY_RESOLVING_STARTED, 0);
|
||||
break;
|
||||
|
||||
case HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST:
|
||||
|
@ -229,8 +229,9 @@ extern "C" {
|
||||
#define SM_PASSKEY_DISPLAY_CANCEL 0xb3
|
||||
#define SM_PASSKEY_INPUT_NUMBER 0xb4
|
||||
#define SM_PASSKEY_INPUT_CANCEL 0xb5
|
||||
#define SM_IDENTITY_RESOLVING_FAILED 0xb6
|
||||
#define SM_IDENTITY_RESOLVING_SUCCEEDED 0xb7
|
||||
#define SM_IDENTITY_RESOLVING_STARTED 0xb6
|
||||
#define SM_IDENTITY_RESOLVING_FAILED 0xb7
|
||||
#define SM_IDENTITY_RESOLVING_SUCCEEDED 0xb8
|
||||
|
||||
// last error code in 2.1 is 0x38 - we start with 0x50 for BTstack errors
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user