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 */
128 /* For device name update changes */
129 #define MGMT_EV_DEVICE_NAME_UPDATE (TIZEN_EV_BASE + 0x01)
130 struct mgmt_ev_device_name_update {
131 struct mgmt_addr_info addr;
135 /* Device name update changes */
137 /* For handling of RSSI Events */
138 #define MGMT_EV_RSSI_ALERT (TIZEN_EV_BASE + 0x04)
139 struct mgmt_ev_vendor_specific_rssi_alert {
146 #define MGMT_EV_RAW_RSSI (TIZEN_EV_BASE + 0x05)
147 struct mgmt_cc_rp_get_raw_rssi {
154 #define MGMT_EV_RSSI_ENABLED (TIZEN_EV_BASE + 0x06)
156 #define MGMT_EV_RSSI_DISABLED (TIZEN_EV_BASE + 0x07)
157 /* Handling of RSSI Events */
159 #endif /* __MGMT_TIZEN_H */