2 * BlueZ - Bluetooth protocol stack for Linux
4 * Copyright (c) 2015-2016 Samsung Electronics Co., Ltd.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
11 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
12 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
13 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
14 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
15 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
16 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 #ifndef __MGMT_TIZEN_H
21 #define __MGMT_TIZEN_H
23 #define TIZEN_OP_CODE_BASE 0xff00
24 #define TIZEN_EV_BASE 0xff00
26 #define MGMT_OP_SET_ADVERTISING_PARAMS (TIZEN_OP_CODE_BASE + 0x01)
27 struct mgmt_cp_set_advertising_params {
33 #define MGMT_SET_ADVERTISING_PARAMS_SIZE 6
35 #define MGMT_OP_SET_ADVERTISING_DATA (TIZEN_OP_CODE_BASE + 0x02)
36 struct mgmt_cp_set_advertising_data {
37 __u8 data[HCI_MAX_AD_LENGTH];
39 #define MGMT_SET_ADVERTISING_DATA_SIZE HCI_MAX_AD_LENGTH
40 #define MGMT_SET_ADV_MIN_APP_DATA_SIZE 1
42 #define MGMT_OP_SET_SCAN_RSP_DATA (TIZEN_OP_CODE_BASE + 0x03)
43 struct mgmt_cp_set_scan_rsp_data {
44 __u8 data[HCI_MAX_AD_LENGTH];
46 #define MGMT_SET_SCAN_RSP_DATA_SIZE HCI_MAX_AD_LENGTH
47 #define MGMT_SET_SCAN_RSP_MIN_APP_DATA_SIZE 1
49 #define MGMT_OP_ADD_DEV_WHITE_LIST (TIZEN_OP_CODE_BASE + 0x04)
50 struct mgmt_cp_add_dev_white_list {
54 #define MGMT_ADD_DEV_WHITE_LIST_SIZE 7
56 #define MGMT_OP_REMOVE_DEV_FROM_WHITE_LIST (TIZEN_OP_CODE_BASE + 0x05)
57 struct mgmt_cp_remove_dev_from_white_list {
61 #define MGMT_REMOVE_DEV_FROM_WHITE_LIST_SIZE 7
63 #define MGMT_OP_CLEAR_DEV_WHITE_LIST (TIZEN_OP_CODE_BASE + 0x06)
64 #define MGMT_OP_CLEAR_DEV_WHITE_LIST_SIZE 0
66 /* For RSSI monitoring */
67 #define MGMT_OP_SET_RSSI_ENABLE (TIZEN_OP_CODE_BASE + 0x07)
68 #define MGMT_SET_RSSI_ENABLE_SIZE 10
70 struct mgmt_cp_set_enable_rssi {
78 struct mgmt_cc_rsp_enable_rssi {
85 #define MGMT_OP_GET_RAW_RSSI (TIZEN_OP_CODE_BASE + 0x08)
86 #define MGMT_GET_RAW_RSSI_SIZE 7
88 struct mgmt_cp_get_raw_rssi {
93 #define MGMT_OP_SET_RSSI_DISABLE (TIZEN_OP_CODE_BASE + 0x09)
94 #define MGMT_SET_RSSI_DISABLE_SIZE 7
95 struct mgmt_cp_disable_rssi {
99 struct mgmt_cc_rp_disable_rssi {
105 /* RSSI monitoring */
107 /* For le discovery */
108 #define MGMT_OP_START_LE_DISCOVERY (TIZEN_OP_CODE_BASE + 0x0a)
109 struct mgmt_cp_start_le_discovery {
112 #define MGMT_START_LE_DISCOVERY_SIZE 1
114 #define MGMT_OP_STOP_LE_DISCOVERY (TIZEN_OP_CODE_BASE + 0x0b)
115 struct mgmt_cp_stop_le_discovery {
118 #define MGMT_STOP_LE_DISCOVERY_SIZE 1
121 /* For LE auto connection */
122 #define MGMT_OP_DISABLE_LE_AUTO_CONNECT (TIZEN_OP_CODE_BASE + 0x0c)
123 #define MGMT_DISABLE_LE_AUTO_CONNECT_SIZE 0
124 /* LE auto connection */
126 /* For Add LE connection parameter update procedure */
127 #define MGMT_LE_CONN_UPDATE_SIZE 14
128 #define MGMT_OP_LE_CONN_UPDATE (TIZEN_OP_CODE_BASE + 0x0d)
129 struct mgmt_cp_le_conn_update {
130 __le16 conn_interval_min;
131 __le16 conn_interval_max;
133 __le16 supervision_timeout;
136 /* Add LE connection parameter update procedure */
138 /* For Set Manufacturer Data */
139 #define MGMT_OP_SET_MANUFACTURER_DATA (TIZEN_OP_CODE_BASE + 0x0e)
140 struct mgmt_cp_set_manufacturer_data {
143 #define MGMT_SET_MANUFACTURER_DATA_SIZE 100
144 /* Set Manufacturer Data */
146 #define MGMT_OP_LE_SET_SCAN_PARAMS (TIZEN_OP_CODE_BASE + 0x0f)
147 struct mgmt_cp_le_set_scan_params {
148 __u8 type; /* le scan type */
152 #define MGMT_LE_SET_SCAN_PARAMS_SIZE 5
156 /* For device name update changes */
157 #define MGMT_EV_DEVICE_NAME_UPDATE (TIZEN_EV_BASE + 0x01)
158 struct mgmt_ev_device_name_update {
159 struct mgmt_addr_info addr;
163 /* Device name update changes */
165 /* For handling of hardware error event */
166 #define MGMT_EV_HARDWARE_ERROR (TIZEN_EV_BASE + 0x02)
167 struct mgmt_ev_hardware_error {
170 /* handling of hardware error event */
172 /* For handling of RSSI Events */
173 #define MGMT_EV_RSSI_ALERT (TIZEN_EV_BASE + 0x04)
174 struct mgmt_ev_vendor_specific_rssi_alert {
181 #define MGMT_EV_RAW_RSSI (TIZEN_EV_BASE + 0x05)
182 struct mgmt_cc_rp_get_raw_rssi {
189 #define MGMT_EV_RSSI_ENABLED (TIZEN_EV_BASE + 0x06)
191 #define MGMT_EV_RSSI_DISABLED (TIZEN_EV_BASE + 0x07)
192 /* Handling of RSSI Events */
194 /* For Add LE connection update Events */
195 #define MGMT_EV_CONN_UPDATED (TIZEN_EV_BASE + 0x08)
196 struct mgmt_ev_conn_updated {
197 struct mgmt_addr_info addr;
198 __le16 conn_interval;
200 __le16 supervision_timeout;
203 #define MGMT_EV_CONN_UPDATE_FAILED (TIZEN_EV_BASE + 0x09)
204 struct mgmt_ev_conn_update_failed {
205 struct mgmt_addr_info addr;
208 /* Add LE connection update Events */
210 #endif /* __MGMT_TIZEN_H */