2 BlueZ - Bluetooth protocol stack for Linux
4 Copyright (C) 2010 Nokia Corporation
5 Copyright (C) 2011-2012 Intel Corporation
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License version 2 as
9 published by the Free Software Foundation;
11 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
12 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
14 IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
15 CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
16 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
21 COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
22 SOFTWARE IS DISCLAIMED.
25 #ifdef CONFIG_TIZEN_WIP
27 #define TIZEN_OP_CODE_BASE 0xff00
28 #define TIZEN_EV_BASE 0xff00
30 #define MGMT_OP_SET_ADVERTISING_PARAMS (TIZEN_OP_CODE_BASE + 0x01)
31 struct mgmt_cp_set_advertising_params {
37 #define MGMT_SET_ADVERTISING_PARAMS_SIZE 6
39 #define MGMT_OP_SET_ADVERTISING_DATA (TIZEN_OP_CODE_BASE + 0x02)
40 struct mgmt_cp_set_advertising_data {
41 __u8 data[HCI_MAX_AD_LENGTH];
43 #define MGMT_SET_ADVERTISING_DATA_SIZE HCI_MAX_AD_LENGTH
44 #define MGMT_SET_ADV_MIN_APP_DATA_SIZE 1
46 #define MGMT_OP_SET_SCAN_RSP_DATA (TIZEN_OP_CODE_BASE + 0x03)
47 struct mgmt_cp_set_scan_rsp_data {
48 __u8 data[HCI_MAX_AD_LENGTH];
50 #define MGMT_SET_SCAN_RSP_DATA_SIZE HCI_MAX_AD_LENGTH
51 #define MGMT_SET_SCAN_RSP_MIN_APP_DATA_SIZE 1
53 #define MGMT_OP_ADD_DEV_WHITE_LIST (TIZEN_OP_CODE_BASE + 0x04)
54 struct mgmt_cp_add_dev_white_list {
58 #define MGMT_ADD_DEV_WHITE_LIST_SIZE 7
60 #define MGMT_OP_REMOVE_DEV_FROM_WHITE_LIST (TIZEN_OP_CODE_BASE + 0x05)
61 struct mgmt_cp_remove_dev_from_white_list {
65 #define MGMT_REMOVE_DEV_FROM_WHITE_LIST_SIZE 7
67 #define MGMT_OP_CLEAR_DEV_WHITE_LIST (TIZEN_OP_CODE_BASE + 0x06)
68 #define MGMT_OP_CLEAR_DEV_WHITE_LIST_SIZE 0
70 /* BEGIN TIZEN_Bluetooth :: RSSI monitoring */
71 #define MGMT_OP_SET_RSSI_ENABLE (TIZEN_OP_CODE_BASE + 0x07)
72 #define MGMT_SET_RSSI_ENABLE_SIZE 10
74 struct mgmt_cp_set_enable_rssi {
82 struct mgmt_cc_rsp_enable_rssi {
89 #define MGMT_OP_GET_RAW_RSSI (TIZEN_OP_CODE_BASE + 0x08)
90 #define MGMT_GET_RAW_RSSI_SIZE 7
92 struct mgmt_cp_get_raw_rssi {
97 #define MGMT_OP_SET_RSSI_DISABLE (TIZEN_OP_CODE_BASE + 0x09)
98 #define MGMT_SET_RSSI_DISABLE_SIZE 7
99 struct mgmt_cp_disable_rssi {
103 struct mgmt_cc_rp_disable_rssi {
109 /* END TIZEN_Bluetooth :: RSSI monitoring */
111 #define MGMT_OP_START_LE_DISCOVERY (TIZEN_OP_CODE_BASE + 0x0a)
112 struct mgmt_cp_start_le_discovery {
115 #define MGMT_START_LE_DISCOVERY_SIZE 1
117 #define MGMT_OP_STOP_LE_DISCOVERY (TIZEN_OP_CODE_BASE + 0x0b)
118 struct mgmt_cp_stop_le_discovery {
121 #define MGMT_STOP_LE_DISCOVERY_SIZE 1
123 /* BEGIN TIZEN_Bluetooth :: LE auto connection */
124 #define MGMT_OP_DISABLE_LE_AUTO_CONNECT (TIZEN_OP_CODE_BASE + 0x0c)
125 #define MGMT_DISABLE_LE_AUTO_CONNECT_SIZE 0
126 /* END TIZEN_Bluetooth */
128 #define MGMT_LE_CONN_UPDATE_SIZE 14
129 #define MGMT_OP_LE_CONN_UPDATE (TIZEN_OP_CODE_BASE + 0x0d)
130 struct mgmt_cp_le_conn_update {
131 __le16 conn_interval_min;
132 __le16 conn_interval_max;
134 __le16 supervision_timeout;
138 #define MGMT_OP_SET_MANUFACTURER_DATA (TIZEN_OP_CODE_BASE + 0x0e)
139 #define MGMT_SET_MANUFACTURER_DATA_SIZE 100
140 struct mgmt_cp_set_manufacturer_data {
141 __u8 data[MGMT_SET_MANUFACTURER_DATA_SIZE];
144 #define MGMT_OP_LE_SET_SCAN_PARAMS (TIZEN_OP_CODE_BASE + 0x0f)
145 struct mgmt_cp_le_set_scan_params {
146 __u8 type; /* le scan type */
150 #define MGMT_LE_SET_SCAN_PARAMS_SIZE 5
152 #define MGMT_SCO_ROLE_HANDSFREE 0x00
153 #define MGMT_SCO_ROLE_AUDIO_GATEWAY 0x01
154 #define MGMT_OP_SET_VOICE_SETTING (TIZEN_OP_CODE_BASE + 0x10)
155 struct mgmt_cp_set_voice_setting {
158 uint16_t voice_setting;
160 #define MGMT_SET_VOICE_SETTING_SIZE 9
162 #define MGMT_OP_GET_ADV_TX_POWER (TIZEN_OP_CODE_BASE + 0x11)
163 #define MGMT_GET_ADV_TX_POWER_SIZE 0
164 struct mgmt_rp_get_adv_tx_power {
168 #define MGMT_OP_ENABLE_6LOWPAN (TIZEN_OP_CODE_BASE + 0x12)
169 struct mgmt_cp_enable_6lowpan {
172 #define MGMT_ENABLE_BT_6LOWPAN_SIZE 1
174 #define MGMT_OP_CONNECT_6LOWPAN (TIZEN_OP_CODE_BASE + 0x13)
175 struct mgmt_cp_connect_6lowpan {
176 struct mgmt_addr_info addr;
178 #define MGMT_CONNECT_6LOWPAN_SIZE 7
180 #define MGMT_OP_DISCONNECT_6LOWPAN (TIZEN_OP_CODE_BASE + 0x14)
181 struct mgmt_cp_disconnect_6lowpan {
182 struct mgmt_addr_info addr;
184 #define MGMT_DISCONNECT_6LOWPAN_SIZE 7
186 #define MGMT_OP_LE_READ_MAXIMUM_DATA_LENGTH (TIZEN_OP_CODE_BASE + 0x15)
187 struct mgmt_rp_le_read_maximum_data_length {
188 __le16 max_tx_octets;
190 __le16 max_rx_octets;
193 #define MGMT_LE_READ_MAXIMUM_DATA_LENGTH_SIZE 0
195 #define MGMT_OP_LE_WRITE_HOST_SUGGESTED_DATA_LENGTH (TIZEN_OP_CODE_BASE + 0x16)
196 struct mgmt_cp_le_write_host_suggested_data_length {
197 __le16 def_tx_octets;
200 #define MGMT_LE_WRITE_HOST_SUGGESTED_DATA_LENGTH_SIZE 4
202 /* BEGIN TIZEN_Bluetooth :: name update changes */
203 #define MGMT_EV_DEVICE_NAME_UPDATE (TIZEN_EV_BASE + 0x01)
204 struct mgmt_ev_device_name_update {
205 struct mgmt_addr_info addr;
209 /* END TIZEN_Bluetooth :: name update changes */
211 /* BEGIN TIZEN_Bluetooth :: Add handling of hardware error event */
212 #define MGMT_EV_HARDWARE_ERROR (TIZEN_EV_BASE + 0x02)
213 struct mgmt_ev_hardware_error {
216 /* END TIZEN_Bluetooth */
218 /* BEGIN TIZEN_Bluetooth :: HCI TX Timeout Error */
219 #define MGMT_EV_TX_TIMEOUT_ERROR (TIZEN_EV_BASE + 0x03)
220 /* END TIZEN_Bluetooth */
222 /* BEGIN TIZEN_Bluetooth :: Add handling of RSSI Events */
223 #define MGMT_EV_RSSI_ALERT (TIZEN_EV_BASE + 0x04)
224 struct mgmt_ev_vendor_specific_rssi_alert {
231 #define MGMT_EV_RAW_RSSI (TIZEN_EV_BASE + 0x05)
232 struct mgmt_cc_rp_get_raw_rssi {
239 #define MGMT_EV_RSSI_ENABLED (TIZEN_EV_BASE + 0x06)
241 #define MGMT_EV_RSSI_DISABLED (TIZEN_EV_BASE + 0x07)
242 /* END TIZEN_Bluetooth :: Handling of RSSI Events */
244 /* BEGIN TIZEN_Bluetooth :: Add LE connection update Events */
245 #define MGMT_EV_CONN_UPDATED (TIZEN_EV_BASE + 0x08)
246 struct mgmt_ev_conn_updated {
247 struct mgmt_addr_info addr;
248 __le16 conn_interval;
250 __le16 supervision_timeout;
253 #define MGMT_EV_CONN_UPDATE_FAILED (TIZEN_EV_BASE + 0x09)
254 struct mgmt_ev_conn_update_failed {
255 struct mgmt_addr_info addr;
258 /* END TIZEN_Bluetooth :: Add LE connection update Events */
260 #define MGMT_EV_LE_DEVICE_FOUND (TIZEN_EV_BASE + 0x0a)
261 struct mgmt_ev_le_device_found {
262 struct mgmt_addr_info addr;
270 #define MGMT_EV_MULTI_ADV_STATE_CHANGED (TIZEN_EV_BASE + 0x0b)
271 struct mgmt_ev_vendor_specific_multi_adv_state_changed {
273 __u8 state_change_reason;
274 __le16 connection_handle;
277 #define MGMT_EV_6LOWPAN_CONN_STATE_CHANGED (TIZEN_EV_BASE + 0x0c)
278 struct mgmt_ev_6lowpan_conn_state_changed {
279 struct mgmt_addr_info addr;
284 #endif /* CONFIG_TIZEN_WIP */