From bc2af4fc4b3080aa1b4adba0d9ac70160e94f2f1 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald" Date: Mon, 10 Jan 2011 20:29:29 +0000 Subject: [PATCH] added btstack_set_discoverable command --- include/btstack/hci_cmds.h | 5 +++-- src/hci_cmds.c | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/include/btstack/hci_cmds.h b/include/btstack/hci_cmds.h index 434d69e35..2b4a346db 100644 --- a/include/btstack/hci_cmds.h +++ b/include/btstack/hci_cmds.h @@ -206,7 +206,8 @@ extern const hci_cmd_t btstack_set_acl_capture_mode; extern const hci_cmd_t btstack_get_version; extern const hci_cmd_t btstack_get_system_bluetooth_enabled; extern const hci_cmd_t btstack_set_system_bluetooth_enabled; - +extern const hci_cmd_t btstack_set_discoverable; + extern const hci_cmd_t hci_accept_connection_request; extern const hci_cmd_t hci_authentication_requested; extern const hci_cmd_t hci_create_connection; @@ -258,7 +259,7 @@ extern const hci_cmd_t rfcomm_create_channel; extern const hci_cmd_t rfcomm_decline_connection; extern const hci_cmd_t rfcomm_disconnect; extern const hci_cmd_t rfcomm_register_service; -extern const hci_cmd_t rfcomm_unregister_service; +extern const hci_cmd_t rfcomm_unregister_service; #if defined __cplusplus } diff --git a/src/hci_cmds.c b/src/hci_cmds.c index 025b0ad19..4d51da65f 100644 --- a/src/hci_cmds.c +++ b/src/hci_cmds.c @@ -342,6 +342,12 @@ const hci_cmd_t btstack_set_system_bluetooth_enabled = { OPCODE(OGF_BTSTACK, BTSTACK_SET_SYSTEM_BLUETOOTH_ENABLED), "1" }; +const hci_cmd_t btstack_set_discoverable = { +OPCODE(OGF_BTSTACK, BTSTACK_SET_DISCOVERABLE), "1" +}; + + + const hci_cmd_t l2cap_create_channel = { OPCODE(OGF_BTSTACK, L2CAP_CREATE_CHANNEL), "B2" // @param bd_addr(48), psm (16)