From 0a90cc40903af7afed920cc23feea765fa4bbe97 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald" Date: Thu, 3 Feb 2011 19:41:43 +0000 Subject: [PATCH] re-enable inquiry scan after sleep if it was on before --- src/hci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hci.c b/src/hci.c index 75ce0ab30..03599c2ab 100644 --- a/src/hci.c +++ b/src/hci.c @@ -537,6 +537,7 @@ void hci_init(hci_transport_t *transport, void *config, bt_control_t *control, r // no connections yet hci_stack.connections = NULL; + hci_stack.discoverable = 0; // empty cmd buffer hci_stack.hci_cmd_buffer = malloc(3+255); @@ -830,7 +831,7 @@ void hci_run(){ hci_send_cmd(&hci_write_page_timeout, 0x6000); break; 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; case 5: #ifndef EMBEDDED