mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-04-16 08:42:28 +00:00
removed hci_write_authentication_enable from code
This commit is contained in:
parent
219eea5f01
commit
c6d71a3daa
@ -556,10 +556,6 @@ static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packe
|
||||
BD_ADDR_COPY(&connAddr, address);
|
||||
connPSM = psm;
|
||||
connAuth = authentication;
|
||||
|
||||
// send write authentication enabled
|
||||
bt_send_cmd(&hci_write_authentication_enable, authentication);
|
||||
state = kW4AuthenticationEnableCommand;
|
||||
#endif
|
||||
return 0;
|
||||
};
|
||||
|
@ -243,8 +243,10 @@ static void packet_handler (void * connection, uint8_t packet_type, uint16_t cha
|
||||
case BTSTACK_EVENT_STATE:
|
||||
// bt stack activated, get started - set local name
|
||||
if (packet[2] == HCI_STATE_WORKING) {
|
||||
// dumpCmds = 1;
|
||||
hci_send_cmd(&hci_write_authentication_enable, 1);
|
||||
printLine("Inquiry");
|
||||
state = inquiry;
|
||||
hci_send_cmd(&hci_inquiry, HCI_INQUIRY_LAP, INQUIRY_INTERVAL, 0);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -293,12 +295,6 @@ static void packet_handler (void * connection, uint8_t packet_type, uint16_t cha
|
||||
break;
|
||||
|
||||
case HCI_EVENT_COMMAND_COMPLETE:
|
||||
if (COMMAND_COMPLETE_EVENT(packet, hci_write_authentication_enable)){
|
||||
printLine("Inquiry");
|
||||
state = inquiry;
|
||||
hci_send_cmd(&hci_inquiry, HCI_INQUIRY_LAP, INQUIRY_INTERVAL, 0);
|
||||
break;
|
||||
}
|
||||
if (COMMAND_COMPLETE_EVENT(packet, hci_inquiry_cancel) ) {
|
||||
// inq successfully cancelled
|
||||
// printLine("Connecting");
|
||||
|
@ -84,9 +84,9 @@ void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint
|
||||
break;
|
||||
|
||||
case BTSTACK_EVENT_STATE:
|
||||
// bt stack activated, get started - set local name
|
||||
// bt stack activated, get started
|
||||
if (packet[2] == HCI_STATE_WORKING) {
|
||||
bt_send_cmd(&hci_write_authentication_enable, 0);
|
||||
bt_send_cmd(&hci_write_class_of_device, 0x2540);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -177,8 +177,8 @@ void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint
|
||||
break;
|
||||
|
||||
case HCI_EVENT_COMMAND_COMPLETE:
|
||||
if ( COMMAND_COMPLETE_EVENT(packet, hci_write_authentication_enable) ) {
|
||||
bt_send_cmd(&hci_write_class_of_device, 0x2540);
|
||||
if ( COMMAND_COMPLETE_EVENT(packet, hci_write_class_of_device) ) {
|
||||
printf("Ready\n");
|
||||
}
|
||||
default:
|
||||
// other event
|
||||
|
@ -106,16 +106,13 @@ void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint
|
||||
run_loop_set_timer(&timer, 3000);
|
||||
// run_loop_add_timer(&timer);
|
||||
} else {
|
||||
bt_send_cmd(&hci_write_authentication_enable, 0);
|
||||
bt_send_cmd(&hci_write_class_of_device, 0x38010c);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case HCI_EVENT_COMMAND_COMPLETE:
|
||||
// use pairing yes/no
|
||||
if ( COMMAND_COMPLETE_EVENT(packet, hci_write_authentication_enable) ) {
|
||||
bt_send_cmd(&hci_write_class_of_device, 0x38010c);
|
||||
}
|
||||
if ( COMMAND_COMPLETE_EVENT(packet, hci_write_class_of_device) ) {
|
||||
bt_send_cmd(&l2cap_create_channel_mtu, addr, PSM_TEST, PACKET_SIZE);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user