BTstack for Nucleo F401RE/FRDM-KL46Z example program

Dependencies:   F401RE-USBHost mbed

The usage is the same as KL46Z-BTstack_example.
使い方はKL46Z-BTstack_exampleと同じです。
/media/uploads/va009039/f401re-btstack.jpg

Committer:
va009039
Date:
Mon Jun 09 09:03:25 2014 +0000
Revision:
0:a05a07cd6fdf
first commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
va009039 0:a05a07cd6fdf 1 /*
va009039 0:a05a07cd6fdf 2 * Copyright (C) 2009 by Matthias Ringwald
va009039 0:a05a07cd6fdf 3 *
va009039 0:a05a07cd6fdf 4 * Redistribution and use in source and binary forms, with or without
va009039 0:a05a07cd6fdf 5 * modification, are permitted provided that the following conditions
va009039 0:a05a07cd6fdf 6 * are met:
va009039 0:a05a07cd6fdf 7 *
va009039 0:a05a07cd6fdf 8 * 1. Redistributions of source code must retain the above copyright
va009039 0:a05a07cd6fdf 9 * notice, this list of conditions and the following disclaimer.
va009039 0:a05a07cd6fdf 10 * 2. Redistributions in binary form must reproduce the above copyright
va009039 0:a05a07cd6fdf 11 * notice, this list of conditions and the following disclaimer in the
va009039 0:a05a07cd6fdf 12 * documentation and/or other materials provided with the distribution.
va009039 0:a05a07cd6fdf 13 * 3. Neither the name of the copyright holders nor the names of
va009039 0:a05a07cd6fdf 14 * contributors may be used to endorse or promote products derived
va009039 0:a05a07cd6fdf 15 * from this software without specific prior written permission.
va009039 0:a05a07cd6fdf 16 *
va009039 0:a05a07cd6fdf 17 * THIS SOFTWARE IS PROVIDED BY MATTHIAS RINGWALD AND CONTRIBUTORS
va009039 0:a05a07cd6fdf 18 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
va009039 0:a05a07cd6fdf 19 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
va009039 0:a05a07cd6fdf 20 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS
va009039 0:a05a07cd6fdf 21 * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
va009039 0:a05a07cd6fdf 22 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
va009039 0:a05a07cd6fdf 23 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
va009039 0:a05a07cd6fdf 24 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
va009039 0:a05a07cd6fdf 25 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
va009039 0:a05a07cd6fdf 26 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
va009039 0:a05a07cd6fdf 27 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
va009039 0:a05a07cd6fdf 28 * SUCH DAMAGE.
va009039 0:a05a07cd6fdf 29 *
va009039 0:a05a07cd6fdf 30 */
va009039 0:a05a07cd6fdf 31
va009039 0:a05a07cd6fdf 32 /*
va009039 0:a05a07cd6fdf 33 * hci_cmds.h
va009039 0:a05a07cd6fdf 34 *
va009039 0:a05a07cd6fdf 35 * Created by Matthias Ringwald on 7/23/09.
va009039 0:a05a07cd6fdf 36 */
va009039 0:a05a07cd6fdf 37
va009039 0:a05a07cd6fdf 38 #pragma once
va009039 0:a05a07cd6fdf 39
va009039 0:a05a07cd6fdf 40 #include <stdint.h>
va009039 0:a05a07cd6fdf 41
va009039 0:a05a07cd6fdf 42 #if defined __cplusplus
va009039 0:a05a07cd6fdf 43 extern "C" {
va009039 0:a05a07cd6fdf 44 #endif
va009039 0:a05a07cd6fdf 45
va009039 0:a05a07cd6fdf 46 /**
va009039 0:a05a07cd6fdf 47 * packet types - used in BTstack and over the H4 UART interface
va009039 0:a05a07cd6fdf 48 */
va009039 0:a05a07cd6fdf 49 #define HCI_COMMAND_DATA_PACKET 0x01
va009039 0:a05a07cd6fdf 50 #define HCI_ACL_DATA_PACKET 0x02
va009039 0:a05a07cd6fdf 51 #define HCI_SCO_DATA_PACKET 0x03
va009039 0:a05a07cd6fdf 52 #define HCI_EVENT_PACKET 0x04
va009039 0:a05a07cd6fdf 53
va009039 0:a05a07cd6fdf 54 // extension for client/server communication
va009039 0:a05a07cd6fdf 55 #define DAEMON_EVENT_PACKET 0x05
va009039 0:a05a07cd6fdf 56
va009039 0:a05a07cd6fdf 57 // L2CAP data
va009039 0:a05a07cd6fdf 58 #define L2CAP_DATA_PACKET 0x06
va009039 0:a05a07cd6fdf 59
va009039 0:a05a07cd6fdf 60 // RFCOMM data
va009039 0:a05a07cd6fdf 61 #define RFCOMM_DATA_PACKET 0x07
va009039 0:a05a07cd6fdf 62
va009039 0:a05a07cd6fdf 63 // Attribute protocol data
va009039 0:a05a07cd6fdf 64 #define ATT_DATA_PACKET 0x08
va009039 0:a05a07cd6fdf 65
va009039 0:a05a07cd6fdf 66 // Security Manager protocol data
va009039 0:a05a07cd6fdf 67 #define SM_DATA_PACKET 0x09
va009039 0:a05a07cd6fdf 68
va009039 0:a05a07cd6fdf 69 // debug log messages
va009039 0:a05a07cd6fdf 70 #define LOG_MESSAGE_PACKET 0xfc
va009039 0:a05a07cd6fdf 71
va009039 0:a05a07cd6fdf 72
va009039 0:a05a07cd6fdf 73 // Fixed PSM numbers
va009039 0:a05a07cd6fdf 74 #define PSM_SDP 0x01
va009039 0:a05a07cd6fdf 75 #define PSM_RFCOMM 0x03
va009039 0:a05a07cd6fdf 76 #define PSM_HID_CONTROL 0x11
va009039 0:a05a07cd6fdf 77 #define PSM_HID_INTERRUPT 0x13
va009039 0:a05a07cd6fdf 78
va009039 0:a05a07cd6fdf 79 // Events from host controller to host
va009039 0:a05a07cd6fdf 80 #define HCI_EVENT_INQUIRY_COMPLETE 0x01
va009039 0:a05a07cd6fdf 81 #define HCI_EVENT_INQUIRY_RESULT 0x02
va009039 0:a05a07cd6fdf 82 #define HCI_EVENT_CONNECTION_COMPLETE 0x03
va009039 0:a05a07cd6fdf 83 #define HCI_EVENT_CONNECTION_REQUEST 0x04
va009039 0:a05a07cd6fdf 84 #define HCI_EVENT_DISCONNECTION_COMPLETE 0x05
va009039 0:a05a07cd6fdf 85 #define HCI_EVENT_AUTHENTICATION_COMPLETE_EVENT 0x06
va009039 0:a05a07cd6fdf 86 #define HCI_EVENT_REMOTE_NAME_REQUEST_COMPLETE 0x07
va009039 0:a05a07cd6fdf 87 #define HCI_EVENT_ENCRYPTION_CHANGE 0x08
va009039 0:a05a07cd6fdf 88 #define HCI_EVENT_CHANGE_CONNECTION_LINK_KEY_COMPLETE 0x09
va009039 0:a05a07cd6fdf 89 #define HCI_EVENT_MASTER_LINK_KEY_COMPLETE 0x0A
va009039 0:a05a07cd6fdf 90 #define HCI_EVENT_READ_REMOTE_SUPPORTED_FEATURES_COMPLETE 0x0B
va009039 0:a05a07cd6fdf 91 #define HCI_EVENT_READ_REMOTE_VERSION_INFORMATION_COMPLETE 0x0C
va009039 0:a05a07cd6fdf 92 #define HCI_EVENT_QOS_SETUP_COMPLETE 0x0D
va009039 0:a05a07cd6fdf 93 #define HCI_EVENT_COMMAND_COMPLETE 0x0E
va009039 0:a05a07cd6fdf 94 #define HCI_EVENT_COMMAND_STATUS 0x0F
va009039 0:a05a07cd6fdf 95 #define HCI_EVENT_HARDWARE_ERROR 0x10
va009039 0:a05a07cd6fdf 96 #define HCI_EVENT_FLUSH_OCCURED 0x11
va009039 0:a05a07cd6fdf 97 #define HCI_EVENT_ROLE_CHANGE 0x12
va009039 0:a05a07cd6fdf 98 #define HCI_EVENT_NUMBER_OF_COMPLETED_PACKETS 0x13
va009039 0:a05a07cd6fdf 99 #define HCI_EVENT_MODE_CHANGE_EVENT 0x14
va009039 0:a05a07cd6fdf 100 #define HCI_EVENT_RETURN_LINK_KEYS 0x15
va009039 0:a05a07cd6fdf 101 #define HCI_EVENT_PIN_CODE_REQUEST 0x16
va009039 0:a05a07cd6fdf 102 #define HCI_EVENT_LINK_KEY_REQUEST 0x17
va009039 0:a05a07cd6fdf 103 #define HCI_EVENT_LINK_KEY_NOTIFICATION 0x18
va009039 0:a05a07cd6fdf 104 #define HCI_EVENT_DATA_BUFFER_OVERFLOW 0x1A
va009039 0:a05a07cd6fdf 105 #define HCI_EVENT_MAX_SLOTS_CHANGED 0x1B
va009039 0:a05a07cd6fdf 106 #define HCI_EVENT_READ_CLOCK_OFFSET_COMPLETE 0x1C
va009039 0:a05a07cd6fdf 107 #define HCI_EVENT_PACKET_TYPE_CHANGED 0x1D
va009039 0:a05a07cd6fdf 108 #define HCI_EVENT_INQUIRY_RESULT_WITH_RSSI 0x22
va009039 0:a05a07cd6fdf 109 #define HCI_EVENT_EXTENDED_INQUIRY_RESPONSE 0x2F
va009039 0:a05a07cd6fdf 110 #define HCI_EVENT_LE_META 0x3E
va009039 0:a05a07cd6fdf 111 #define HCI_EVENT_VENDOR_SPECIFIC 0xFF
va009039 0:a05a07cd6fdf 112
va009039 0:a05a07cd6fdf 113 #define HCI_SUBEVENT_LE_CONNECTION_COMPLETE 0x01
va009039 0:a05a07cd6fdf 114 #define HCI_SUBEVENT_LE_ADVERTISING_REPORT 0x02
va009039 0:a05a07cd6fdf 115 #define HCI_SUBEVENT_LE_CONNECTION_UPDATE_COMPLETE 0x03
va009039 0:a05a07cd6fdf 116 #define HCI_SUBEVENT_LE_READ_REMOTE_USED_FEATURES_COMPLETE 0x04
va009039 0:a05a07cd6fdf 117 #define HCI_SUBEVENT_LE_LONG_TERM_KEY_REQUEST 0x05
va009039 0:a05a07cd6fdf 118
va009039 0:a05a07cd6fdf 119 // last used HCI_EVENT in 2.1 is 0x3d
va009039 0:a05a07cd6fdf 120
va009039 0:a05a07cd6fdf 121 // events 0x50-0x5f are used internally
va009039 0:a05a07cd6fdf 122
va009039 0:a05a07cd6fdf 123 // BTSTACK DAEMON EVENTS
va009039 0:a05a07cd6fdf 124
va009039 0:a05a07cd6fdf 125 // events from BTstack for application/client lib
va009039 0:a05a07cd6fdf 126 #define BTSTACK_EVENT_STATE 0x60
va009039 0:a05a07cd6fdf 127
va009039 0:a05a07cd6fdf 128 // data: event(8), len(8), nr hci connections
va009039 0:a05a07cd6fdf 129 #define BTSTACK_EVENT_NR_CONNECTIONS_CHANGED 0x61
va009039 0:a05a07cd6fdf 130
va009039 0:a05a07cd6fdf 131 // data: none
va009039 0:a05a07cd6fdf 132 #define BTSTACK_EVENT_POWERON_FAILED 0x62
va009039 0:a05a07cd6fdf 133
va009039 0:a05a07cd6fdf 134 // data: majot (8), minor (8), revision(16)
va009039 0:a05a07cd6fdf 135 #define BTSTACK_EVENT_VERSION 0x63
va009039 0:a05a07cd6fdf 136
va009039 0:a05a07cd6fdf 137 // data: system bluetooth on/off (bool)
va009039 0:a05a07cd6fdf 138 #define BTSTACK_EVENT_SYSTEM_BLUETOOTH_ENABLED 0x64
va009039 0:a05a07cd6fdf 139
va009039 0:a05a07cd6fdf 140 // data: event (8), len(8), status (8) == 0, address (48), name (1984 bits = 248 bytes)
va009039 0:a05a07cd6fdf 141 #define BTSTACK_EVENT_REMOTE_NAME_CACHED 0x65
va009039 0:a05a07cd6fdf 142
va009039 0:a05a07cd6fdf 143 // data: discoverable enabled (bool)
va009039 0:a05a07cd6fdf 144 #define BTSTACK_EVENT_DISCOVERABLE_ENABLED 0x66
va009039 0:a05a07cd6fdf 145
va009039 0:a05a07cd6fdf 146 // L2CAP EVENTS
va009039 0:a05a07cd6fdf 147
va009039 0:a05a07cd6fdf 148 // data: event (8), len(8), status (8), address(48), handle (16), psm (16), local_cid(16), remote_cid (16), local_mtu(16), remote_mtu(16)
va009039 0:a05a07cd6fdf 149 #define L2CAP_EVENT_CHANNEL_OPENED 0x70
va009039 0:a05a07cd6fdf 150
va009039 0:a05a07cd6fdf 151 // data: event (8), len(8), channel (16)
va009039 0:a05a07cd6fdf 152 #define L2CAP_EVENT_CHANNEL_CLOSED 0x71
va009039 0:a05a07cd6fdf 153
va009039 0:a05a07cd6fdf 154 // data: event (8), len(8), address(48), handle (16), psm (16), local_cid(16), remote_cid (16)
va009039 0:a05a07cd6fdf 155 #define L2CAP_EVENT_INCOMING_CONNECTION 0x72
va009039 0:a05a07cd6fdf 156
va009039 0:a05a07cd6fdf 157 // data: event(8), len(8), handle(16)
va009039 0:a05a07cd6fdf 158 #define L2CAP_EVENT_TIMEOUT_CHECK 0x73
va009039 0:a05a07cd6fdf 159
va009039 0:a05a07cd6fdf 160 // data: event(8), len(8), local_cid(16), credits(8)
va009039 0:a05a07cd6fdf 161 #define L2CAP_EVENT_CREDITS 0x74
va009039 0:a05a07cd6fdf 162
va009039 0:a05a07cd6fdf 163 // data: event(8), len(8), status (8), psm (16)
va009039 0:a05a07cd6fdf 164 #define L2CAP_EVENT_SERVICE_REGISTERED 0x75
va009039 0:a05a07cd6fdf 165
va009039 0:a05a07cd6fdf 166
va009039 0:a05a07cd6fdf 167 // RFCOMM EVENTS
va009039 0:a05a07cd6fdf 168
va009039 0:a05a07cd6fdf 169 // data: event(8), len(8), status (8), address (48), handle (16), server channel(8), rfcomm_cid(16), max frame size(16)
va009039 0:a05a07cd6fdf 170 #define RFCOMM_EVENT_OPEN_CHANNEL_COMPLETE 0x80
va009039 0:a05a07cd6fdf 171
va009039 0:a05a07cd6fdf 172 // data: event(8), len(8), rfcomm_cid(16)
va009039 0:a05a07cd6fdf 173 #define RFCOMM_EVENT_CHANNEL_CLOSED 0x81
va009039 0:a05a07cd6fdf 174
va009039 0:a05a07cd6fdf 175 // data: event (8), len(8), address(48), channel (8), rfcomm_cid (16)
va009039 0:a05a07cd6fdf 176 #define RFCOMM_EVENT_INCOMING_CONNECTION 0x82
va009039 0:a05a07cd6fdf 177
va009039 0:a05a07cd6fdf 178 // data: event (8), len(8), rfcommid (16), ...
va009039 0:a05a07cd6fdf 179 #define RFCOMM_EVENT_REMOTE_LINE_STATUS 0x83
va009039 0:a05a07cd6fdf 180
va009039 0:a05a07cd6fdf 181 // data: event(8), len(8), rfcomm_cid(16), credits(8)
va009039 0:a05a07cd6fdf 182 #define RFCOMM_EVENT_CREDITS 0x84
va009039 0:a05a07cd6fdf 183
va009039 0:a05a07cd6fdf 184 // data: event(8), len(8), status (8), rfcomm server channel id (8)
va009039 0:a05a07cd6fdf 185 #define RFCOMM_EVENT_SERVICE_REGISTERED 0x85
va009039 0:a05a07cd6fdf 186
va009039 0:a05a07cd6fdf 187 // data: event(8), len(8), status (8), rfcomm server channel id (8)
va009039 0:a05a07cd6fdf 188 #define RFCOMM_EVENT_PERSISTENT_CHANNEL 0x86
va009039 0:a05a07cd6fdf 189
va009039 0:a05a07cd6fdf 190
va009039 0:a05a07cd6fdf 191 // data: event(8), len(8), status(8), service_record_handle(32)
va009039 0:a05a07cd6fdf 192 #define SDP_SERVICE_REGISTERED 0x90
va009039 0:a05a07cd6fdf 193
va009039 0:a05a07cd6fdf 194
va009039 0:a05a07cd6fdf 195 // last error code in 2.1 is 0x38 - we start with 0x50 for BTstack errors
va009039 0:a05a07cd6fdf 196
va009039 0:a05a07cd6fdf 197 #define BTSTACK_CONNECTION_TO_BTDAEMON_FAILED 0x50
va009039 0:a05a07cd6fdf 198 #define BTSTACK_ACTIVATION_FAILED_SYSTEM_BLUETOOTH 0x51
va009039 0:a05a07cd6fdf 199 #define BTSTACK_ACTIVATION_POWERON_FAILED 0x52
va009039 0:a05a07cd6fdf 200 #define BTSTACK_ACTIVATION_FAILED_UNKNOWN 0x53
va009039 0:a05a07cd6fdf 201 #define BTSTACK_NOT_ACTIVATED 0x54
va009039 0:a05a07cd6fdf 202 #define BTSTACK_BUSY 0x55
va009039 0:a05a07cd6fdf 203 #define BTSTACK_MEMORY_ALLOC_FAILED 0x56
va009039 0:a05a07cd6fdf 204 #define BTSTACK_ACL_BUFFERS_FULL 0x57
va009039 0:a05a07cd6fdf 205
va009039 0:a05a07cd6fdf 206 // l2cap errors - enumeration by the command that created them
va009039 0:a05a07cd6fdf 207 #define L2CAP_COMMAND_REJECT_REASON_COMMAND_NOT_UNDERSTOOD 0x60
va009039 0:a05a07cd6fdf 208 #define L2CAP_COMMAND_REJECT_REASON_SIGNALING_MTU_EXCEEDED 0x61
va009039 0:a05a07cd6fdf 209 #define L2CAP_COMMAND_REJECT_REASON_INVALID_CID_IN_REQUEST 0x62
va009039 0:a05a07cd6fdf 210
va009039 0:a05a07cd6fdf 211 #define L2CAP_CONNECTION_RESPONSE_RESULT_SUCCESSFUL 0x63
va009039 0:a05a07cd6fdf 212 #define L2CAP_CONNECTION_RESPONSE_RESULT_PENDING 0x64
va009039 0:a05a07cd6fdf 213 #define L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_PSM 0x65
va009039 0:a05a07cd6fdf 214 #define L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_SECURITY 0x66
va009039 0:a05a07cd6fdf 215 #define L2CAP_CONNECTION_RESPONSE_RESULT_REFUSED_RESOURCES 0x65
va009039 0:a05a07cd6fdf 216
va009039 0:a05a07cd6fdf 217 #define L2CAP_CONFIG_RESPONSE_RESULT_SUCCESSFUL 0x66
va009039 0:a05a07cd6fdf 218 #define L2CAP_CONFIG_RESPONSE_RESULT_UNACCEPTABLE_PARAMS 0x67
va009039 0:a05a07cd6fdf 219 #define L2CAP_CONFIG_RESPONSE_RESULT_REJECTED 0x68
va009039 0:a05a07cd6fdf 220 #define L2CAP_CONFIG_RESPONSE_RESULT_UNKNOWN_OPTIONS 0x69
va009039 0:a05a07cd6fdf 221 #define L2CAP_SERVICE_ALREADY_REGISTERED 0x6a
va009039 0:a05a07cd6fdf 222
va009039 0:a05a07cd6fdf 223 #define RFCOMM_MULTIPLEXER_STOPPED 0x70
va009039 0:a05a07cd6fdf 224 #define RFCOMM_CHANNEL_ALREADY_REGISTERED 0x71
va009039 0:a05a07cd6fdf 225 #define RFCOMM_NO_OUTGOING_CREDITS 0x72
va009039 0:a05a07cd6fdf 226
va009039 0:a05a07cd6fdf 227 #define SDP_HANDLE_ALREADY_REGISTERED 0x80
va009039 0:a05a07cd6fdf 228
va009039 0:a05a07cd6fdf 229 /**
va009039 0:a05a07cd6fdf 230 * Default INQ Mode
va009039 0:a05a07cd6fdf 231 */
va009039 0:a05a07cd6fdf 232 #define HCI_INQUIRY_LAP 0x9E8B33L // 0x9E8B33: General/Unlimited Inquiry Access Code (GIAC)
va009039 0:a05a07cd6fdf 233 /**
va009039 0:a05a07cd6fdf 234 * Hardware state of Bluetooth controller
va009039 0:a05a07cd6fdf 235 */
va009039 0:a05a07cd6fdf 236 typedef enum {
va009039 0:a05a07cd6fdf 237 HCI_POWER_OFF = 0,
va009039 0:a05a07cd6fdf 238 HCI_POWER_ON,
va009039 0:a05a07cd6fdf 239 HCI_POWER_SLEEP
va009039 0:a05a07cd6fdf 240 } HCI_POWER_MODE;
va009039 0:a05a07cd6fdf 241
va009039 0:a05a07cd6fdf 242 /**
va009039 0:a05a07cd6fdf 243 * State of BTstack
va009039 0:a05a07cd6fdf 244 */
va009039 0:a05a07cd6fdf 245 typedef enum {
va009039 0:a05a07cd6fdf 246 HCI_STATE_OFF = 0,
va009039 0:a05a07cd6fdf 247 HCI_STATE_INITIALIZING,
va009039 0:a05a07cd6fdf 248 HCI_STATE_WORKING,
va009039 0:a05a07cd6fdf 249 HCI_STATE_HALTING,
va009039 0:a05a07cd6fdf 250 HCI_STATE_SLEEPING,
va009039 0:a05a07cd6fdf 251 HCI_STATE_FALLING_ASLEEP
va009039 0:a05a07cd6fdf 252 } HCI_STATE;
va009039 0:a05a07cd6fdf 253
va009039 0:a05a07cd6fdf 254 /**
va009039 0:a05a07cd6fdf 255 * compact HCI Command packet description
va009039 0:a05a07cd6fdf 256 */
va009039 0:a05a07cd6fdf 257 typedef struct {
va009039 0:a05a07cd6fdf 258 uint16_t opcode;
va009039 0:a05a07cd6fdf 259 const char *format;
va009039 0:a05a07cd6fdf 260 } hci_cmd_t;
va009039 0:a05a07cd6fdf 261
va009039 0:a05a07cd6fdf 262
va009039 0:a05a07cd6fdf 263 // HCI Commands - see hci_cmds.c for info on parameters
va009039 0:a05a07cd6fdf 264 extern const hci_cmd_t btstack_get_state;
va009039 0:a05a07cd6fdf 265 extern const hci_cmd_t btstack_set_power_mode;
va009039 0:a05a07cd6fdf 266 extern const hci_cmd_t btstack_set_acl_capture_mode;
va009039 0:a05a07cd6fdf 267 extern const hci_cmd_t btstack_get_version;
va009039 0:a05a07cd6fdf 268 extern const hci_cmd_t btstack_get_system_bluetooth_enabled;
va009039 0:a05a07cd6fdf 269 extern const hci_cmd_t btstack_set_system_bluetooth_enabled;
va009039 0:a05a07cd6fdf 270 extern const hci_cmd_t btstack_set_discoverable;
va009039 0:a05a07cd6fdf 271 extern const hci_cmd_t btstack_set_bluetooth_enabled; // only used by btstack config
va009039 0:a05a07cd6fdf 272
va009039 0:a05a07cd6fdf 273 extern const hci_cmd_t hci_accept_connection_request;
va009039 0:a05a07cd6fdf 274 extern const hci_cmd_t hci_authentication_requested;
va009039 0:a05a07cd6fdf 275 extern const hci_cmd_t hci_change_connection_link_key;
va009039 0:a05a07cd6fdf 276 extern const hci_cmd_t hci_create_connection;
va009039 0:a05a07cd6fdf 277 extern const hci_cmd_t hci_create_connection_cancel;
va009039 0:a05a07cd6fdf 278 extern const hci_cmd_t hci_delete_stored_link_key;
va009039 0:a05a07cd6fdf 279 extern const hci_cmd_t hci_disconnect;
va009039 0:a05a07cd6fdf 280 extern const hci_cmd_t hci_host_buffer_size;
va009039 0:a05a07cd6fdf 281 extern const hci_cmd_t hci_inquiry;
va009039 0:a05a07cd6fdf 282 extern const hci_cmd_t hci_inquiry_cancel;
va009039 0:a05a07cd6fdf 283 extern const hci_cmd_t hci_link_key_request_negative_reply;
va009039 0:a05a07cd6fdf 284 extern const hci_cmd_t hci_link_key_request_reply;
va009039 0:a05a07cd6fdf 285 extern const hci_cmd_t hci_pin_code_request_reply;
va009039 0:a05a07cd6fdf 286 extern const hci_cmd_t hci_pin_code_request_negative_reply;
va009039 0:a05a07cd6fdf 287 extern const hci_cmd_t hci_qos_setup;
va009039 0:a05a07cd6fdf 288 extern const hci_cmd_t hci_read_bd_addr;
va009039 0:a05a07cd6fdf 289 extern const hci_cmd_t hci_read_buffer_size;
va009039 0:a05a07cd6fdf 290 extern const hci_cmd_t hci_read_le_host_supported;
va009039 0:a05a07cd6fdf 291 extern const hci_cmd_t hci_read_link_policy_settings;
va009039 0:a05a07cd6fdf 292 extern const hci_cmd_t hci_read_link_supervision_timeout;
va009039 0:a05a07cd6fdf 293 extern const hci_cmd_t hci_read_local_supported_features;
va009039 0:a05a07cd6fdf 294 extern const hci_cmd_t hci_read_num_broadcast_retransmissions;
va009039 0:a05a07cd6fdf 295 extern const hci_cmd_t hci_reject_connection_request;
va009039 0:a05a07cd6fdf 296 extern const hci_cmd_t hci_remote_name_request;
va009039 0:a05a07cd6fdf 297 extern const hci_cmd_t hci_remote_name_request_cancel;
va009039 0:a05a07cd6fdf 298 extern const hci_cmd_t hci_reset;
va009039 0:a05a07cd6fdf 299 extern const hci_cmd_t hci_role_discovery;
va009039 0:a05a07cd6fdf 300 extern const hci_cmd_t hci_set_event_mask;
va009039 0:a05a07cd6fdf 301 extern const hci_cmd_t hci_set_connection_encryption;
va009039 0:a05a07cd6fdf 302 extern const hci_cmd_t hci_sniff_mode;
va009039 0:a05a07cd6fdf 303 extern const hci_cmd_t hci_switch_role_command;
va009039 0:a05a07cd6fdf 304 extern const hci_cmd_t hci_write_authentication_enable;
va009039 0:a05a07cd6fdf 305 extern const hci_cmd_t hci_write_class_of_device;
va009039 0:a05a07cd6fdf 306 extern const hci_cmd_t hci_write_extended_inquiry_response;
va009039 0:a05a07cd6fdf 307 extern const hci_cmd_t hci_write_inquiry_mode;
va009039 0:a05a07cd6fdf 308 extern const hci_cmd_t hci_write_le_host_supported;
va009039 0:a05a07cd6fdf 309 extern const hci_cmd_t hci_write_link_policy_settings;
va009039 0:a05a07cd6fdf 310 extern const hci_cmd_t hci_write_link_supervision_timeout;
va009039 0:a05a07cd6fdf 311 extern const hci_cmd_t hci_write_local_name;
va009039 0:a05a07cd6fdf 312 extern const hci_cmd_t hci_write_num_broadcast_retransmissions;
va009039 0:a05a07cd6fdf 313 extern const hci_cmd_t hci_write_page_timeout;
va009039 0:a05a07cd6fdf 314 extern const hci_cmd_t hci_write_scan_enable;
va009039 0:a05a07cd6fdf 315 extern const hci_cmd_t hci_write_simple_pairing_mode;
va009039 0:a05a07cd6fdf 316
va009039 0:a05a07cd6fdf 317 extern const hci_cmd_t hci_le_add_device_to_whitelist;
va009039 0:a05a07cd6fdf 318 extern const hci_cmd_t hci_le_clear_white_list;
va009039 0:a05a07cd6fdf 319 extern const hci_cmd_t hci_le_connection_update;
va009039 0:a05a07cd6fdf 320 extern const hci_cmd_t hci_le_create_connection;
va009039 0:a05a07cd6fdf 321 extern const hci_cmd_t hci_le_create_connection_cancel;
va009039 0:a05a07cd6fdf 322 extern const hci_cmd_t hci_le_encrypt;
va009039 0:a05a07cd6fdf 323 extern const hci_cmd_t hci_le_long_term_key_negative_reply;
va009039 0:a05a07cd6fdf 324 extern const hci_cmd_t hci_le_long_term_key_request_reply;
va009039 0:a05a07cd6fdf 325 extern const hci_cmd_t hci_le_rand;
va009039 0:a05a07cd6fdf 326 extern const hci_cmd_t hci_le_read_advertising_channel_tx_power;
va009039 0:a05a07cd6fdf 327 extern const hci_cmd_t hci_le_read_buffer_size ;
va009039 0:a05a07cd6fdf 328 extern const hci_cmd_t hci_le_read_channel_map;
va009039 0:a05a07cd6fdf 329 extern const hci_cmd_t hci_le_read_remote_used_features;
va009039 0:a05a07cd6fdf 330 extern const hci_cmd_t hci_le_read_supported_features;
va009039 0:a05a07cd6fdf 331 extern const hci_cmd_t hci_le_read_supported_states;
va009039 0:a05a07cd6fdf 332 extern const hci_cmd_t hci_le_read_white_list_size;
va009039 0:a05a07cd6fdf 333 extern const hci_cmd_t hci_le_receiver_test;
va009039 0:a05a07cd6fdf 334 extern const hci_cmd_t hci_le_remove_device_from_whitelist;
va009039 0:a05a07cd6fdf 335 extern const hci_cmd_t hci_le_set_advertise_enable;
va009039 0:a05a07cd6fdf 336 extern const hci_cmd_t hci_le_set_advertising_data;
va009039 0:a05a07cd6fdf 337 extern const hci_cmd_t hci_le_set_advertising_parameters;
va009039 0:a05a07cd6fdf 338 extern const hci_cmd_t hci_le_set_event_mask;
va009039 0:a05a07cd6fdf 339 extern const hci_cmd_t hci_le_set_host_channel_classification;
va009039 0:a05a07cd6fdf 340 extern const hci_cmd_t hci_le_set_random_address;
va009039 0:a05a07cd6fdf 341 extern const hci_cmd_t hci_le_set_scan_enable;
va009039 0:a05a07cd6fdf 342 extern const hci_cmd_t hci_le_set_scan_parameters;
va009039 0:a05a07cd6fdf 343 extern const hci_cmd_t hci_le_set_scan_response_data;
va009039 0:a05a07cd6fdf 344 extern const hci_cmd_t hci_le_start_encryption;
va009039 0:a05a07cd6fdf 345 extern const hci_cmd_t hci_le_test_end;
va009039 0:a05a07cd6fdf 346 extern const hci_cmd_t hci_le_transmitter_test;
va009039 0:a05a07cd6fdf 347
va009039 0:a05a07cd6fdf 348 extern const hci_cmd_t l2cap_accept_connection;
va009039 0:a05a07cd6fdf 349 extern const hci_cmd_t l2cap_create_channel;
va009039 0:a05a07cd6fdf 350 extern const hci_cmd_t l2cap_create_channel_mtu;
va009039 0:a05a07cd6fdf 351 extern const hci_cmd_t l2cap_decline_connection;
va009039 0:a05a07cd6fdf 352 extern const hci_cmd_t l2cap_disconnect;
va009039 0:a05a07cd6fdf 353 extern const hci_cmd_t l2cap_register_service;
va009039 0:a05a07cd6fdf 354 extern const hci_cmd_t l2cap_unregister_service;
va009039 0:a05a07cd6fdf 355
va009039 0:a05a07cd6fdf 356 extern const hci_cmd_t sdp_register_service_record;
va009039 0:a05a07cd6fdf 357 extern const hci_cmd_t sdp_unregister_service_record;
va009039 0:a05a07cd6fdf 358
va009039 0:a05a07cd6fdf 359 // accept connection @param bd_addr(48), rfcomm_cid (16)
va009039 0:a05a07cd6fdf 360 extern const hci_cmd_t rfcomm_accept_connection;
va009039 0:a05a07cd6fdf 361 // create rfcomm channel: @param bd_addr(48), channel (8)
va009039 0:a05a07cd6fdf 362 extern const hci_cmd_t rfcomm_create_channel;
va009039 0:a05a07cd6fdf 363 // create rfcomm channel: @param bd_addr(48), channel (8), mtu (16), credits (8)
va009039 0:a05a07cd6fdf 364 extern const hci_cmd_t rfcomm_create_channel_with_initial_credits;
va009039 0:a05a07cd6fdf 365 // decline rfcomm disconnect,@param bd_addr(48), rfcomm cid (16), reason(8)
va009039 0:a05a07cd6fdf 366 extern const hci_cmd_t rfcomm_decline_connection;
va009039 0:a05a07cd6fdf 367 // disconnect rfcomm disconnect, @param rfcomm_cid(8), reason(8)
va009039 0:a05a07cd6fdf 368 extern const hci_cmd_t rfcomm_disconnect;
va009039 0:a05a07cd6fdf 369 // register rfcomm service: @param channel(8), mtu (16)
va009039 0:a05a07cd6fdf 370 extern const hci_cmd_t rfcomm_register_service;
va009039 0:a05a07cd6fdf 371 // register rfcomm service: @param channel(8), mtu (16), initial credits (8)
va009039 0:a05a07cd6fdf 372 extern const hci_cmd_t rfcomm_register_service_with_initial_credits;
va009039 0:a05a07cd6fdf 373 // unregister rfcomm service, @param service_channel(16)
va009039 0:a05a07cd6fdf 374 extern const hci_cmd_t rfcomm_unregister_service;
va009039 0:a05a07cd6fdf 375 // request persisten rfcomm channel for service name: serive name (char*)
va009039 0:a05a07cd6fdf 376 extern const hci_cmd_t rfcomm_persistent_channel_for_service;
va009039 0:a05a07cd6fdf 377
va009039 0:a05a07cd6fdf 378 #if defined __cplusplus
va009039 0:a05a07cd6fdf 379 }
va009039 0:a05a07cd6fdf 380 #endif