mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-28 19:20:54 +00:00
re-enable inquiry scan after sleep if it was on before
This commit is contained in:
parent
8c394fbd1d
commit
0a90cc4090
@ -537,6 +537,7 @@ void hci_init(hci_transport_t *transport, void *config, bt_control_t *control, r
|
|||||||
|
|
||||||
// no connections yet
|
// no connections yet
|
||||||
hci_stack.connections = NULL;
|
hci_stack.connections = NULL;
|
||||||
|
hci_stack.discoverable = 0;
|
||||||
|
|
||||||
// empty cmd buffer
|
// empty cmd buffer
|
||||||
hci_stack.hci_cmd_buffer = malloc(3+255);
|
hci_stack.hci_cmd_buffer = malloc(3+255);
|
||||||
@ -830,7 +831,7 @@ void hci_run(){
|
|||||||
hci_send_cmd(&hci_write_page_timeout, 0x6000);
|
hci_send_cmd(&hci_write_page_timeout, 0x6000);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
hci_send_cmd(&hci_write_scan_enable, 2); // page scan
|
hci_send_cmd(&hci_write_scan_enable, 2 | hci_stack.discoverable); // page scan
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
#ifndef EMBEDDED
|
#ifndef EMBEDDED
|
||||||
|
Loading…
x
Reference in New Issue
Block a user