2 * Copyright (C) 2013 Intel Corporation
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #ifndef _BT_HAL_UTILS_H_
19 #define _BT_HAL_UTILS_H_
23 #include <hardware/bluetooth.h>
25 #define MAX_UUID_STR_LEN 37
26 #define HAL_UUID_LEN 16
27 #define MAX_ADDR_STR_LEN 18
28 #define MAX_MANUFACTURE_LEN 240
30 #define BT_HAL_UUID_16 2
31 #define BT_HAL_UUID_32 4
32 #define BT_HAL_UUID_128 16
34 #define CASE_RETURN_STR(const) case const: return #const;
36 static const char BT_BASE_UUID[BT_HAL_UUID_128] = {
37 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00,
38 0x80, 0x00, 0x00, 0x80, 0x5f, 0x9b, 0x34, 0xfb
41 static const char BASE_UUID_CONVERTED[BT_HAL_UUID_128] = {
42 0xfb, 0x34, 0x9b, 0x5f, 0x80, 0x00, 0x00, 0x80,
43 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
46 /** BT Profile Service UUID's */
47 #define BT_HAL_HFP_AUDIO_GATEWAY_UUID "0000111f-0000-1000-8000-00805f9b34fb"
48 #define BT_HAL_HSP_AUDIO_GATEWAY_UUID "00001112-0000-1000-8000-00805f9b34fb"
49 #define BT_HAL_HFP_HF_UUID "0000111e-0000-1000-8000-00805f9b34fb"
50 #define BT_HAL_HSP_HS_UUID "00001108-0000-1000-8000-00805f9b34fb"
51 #define BT_HAL_A2DP_PROFILE_UUID "0000110d-0000-1000-8000-00805f9b34fb" /* This is A2DP Profile UUID */
52 #define BT_HAL_A2DP_SOURCE_UUID "0000110a-0000-1000-8000-00805f9b34fb" /* This is A2DP Profile Role(SRC) UUID */
53 #define BT_HAL_A2DP_SINK_UUID "0000110b-0000-1000-8000-00805f9b34fb" /* This is A2DP Profile Role(SNK) UUID */
54 #define BT_HAL_AVRCP_TARGET_UUID "0000110c-0000-1000-8000-00805f9b34fb"
55 #define BT_HAL_AVRCP_REMOTE_UUID "0000110e-0000-1000-8000-00805f9b34fb"
56 #define BT_HAL_OPP_UUID "00001105-0000-1000-8000-00805f9b34fb"
57 #define BT_HAL_FTP_UUID "00001106-0000-1000-8000-00805f9b34fb"
58 #define BT_HAL_SPP_UUID "00001101-0000-1000-8000-00805f9b34fb"
59 #define BT_HAL_PBAP_UUID "0000112f-0000-1000-8000-00805f9b34fb"
60 #define BT_HAL_MAP_UUID "00001132-0000-1000-8000-00805f9b34fb"
61 #define BT_HAL_NAP_UUID "00001116-0000-1000-8000-00805f9b34fb"
62 #define BT_HAL_GN_UUID "00001117-0000-1000-8000-00805f9b34fb"
63 #define BT_HAL_BNEP_UUID "0000000f-0000-1000-8000-00805f9b34fb"
64 #define BT_HAL_HID_UUID "00001124-0000-1000-8000-00805f9b34fb"
65 #define BT_HAL_SAP_UUID_OLD "a49eb41e-cb06-495c-9f4f-bb80a90cdf00"
66 #define BT_HAL_SAP_UUID_NEW "a49eb41e-cb06-495c-9f4f-aa80a90cdf4a"
69 #define BT_HAL_HID_DEVICE_UUID "00001124-0000-1000-8000-00805f9b43bf"
70 #define BT_HAL_IOTIVITY_UUID "12341234-1c25-481f-9dfb-59193d238280"
74 #define BASE 0x0000 //Base
75 #define SDP 0x0001 //Bluetooth Core Specification
76 #define UDP 0x0002 //[NO USE BY PROFILES]
77 #define RFCOMM 0x0003 //RFCOMM with TS 07.10
78 #define TCP 0x0004 //[NO USE BY PROFILES]
79 #define TCS_BIN 0x0005 //Telephony Control Specification / TCS Binary [DEPRECATED]
80 #define TCS_AT 0x0006 //[NO USE BY PROFILES]
81 #define ATT 0x0007 //Attribute Protocol
82 #define OBEX 0x0008 //IrDA Interoperability
83 #define IP 0x0009 //[NO USE BY PROFILES]
84 #define FTP 0x000A //[NO USE BY PROFILES]
85 #define HTTP 0x000C //[NO USE BY PROFILES]
86 #define WSP 0x000E //[NO USE BY PROFILES]
87 #define BNEP 0x000F //Bluetooth Network Encapsulation Protocol (BNEP)
88 #define UPNP 0x0010 //Extended Service Discovery Profile (ESDP) [DEPRECATED]
89 #define HIDP 0x0011 //Human Interface Device Profile (HID)
90 #define HardcopyControlChannel 0x0012 //Hardcopy Cable Replacement Profile (HCRP)
91 #define HardcopyDataChannel 0x0014 //See Hardcopy Cable Replacement Profile (HCRP)
92 #define HardcopyNotification 0x0016 //Hardcopy Cable Replacement Profile (HCRP)
93 #define AVCTP 0x0017 //Audio/Video Control Transport Protocol (AVCTP)
94 #define AVDTP 0x0019 //Audio/Video Distribution Transport Protocol (AVDTP)
95 #define CMTP 0x001B //Common ISDN Access Profile (CIP) [DEPRECATED]
96 #define MCAPControlChannel 0x001E //Multi-Channel Adaptation Protocol (MCAP)
97 #define MCAPDataChannel 0x001F //Multi-Channel Adaptation Protocol (MCAP)
98 #define L2CAP 0x0100 //Bluetooth Core Specification
101 #define ServiceDiscoveryServerServiceClassID 0x1000 //Bluetooth Core Specification Service Class
102 #define BrowseGroupDescriptorServiceClassID 0x1001 //Bluetooth Core Specification Service Class
103 #define SerialPort 0x1101 //Serial Port Profile (SPP)
104 #define LANAccessUsingPPP 0x1102 //LAN Access Profile
105 #define DialupNetworking 0x1103 //Dial-up Networking Profile (DUN)
106 #define IrMCSync 0x1104 //Synchronization Profile (SYNC)
107 #define OBEXObjectPush 0x1105 //Object Push Profile (OPP)
108 #define OBEXFileTransfer 0x1106 //File Transfer Profile (FTP)
109 #define IrMCSyncCommand 0x1107 //Synchronization Profile (SYNC)
110 #define Headset 0x1108 //Headset Profile (HSP)
111 #define CordlessTelephony 0x1109 //Cordless Telephony Profile (CTP)
112 #define AudioSource 0x110A //Advanced Audio Distribution Profile (A2DP) Service Class
113 #define AudioSink 0x110B //Advanced Audio Distribution Profile (A2DP) Service Class
114 #define AV_RemoteControlTarget 0x110C //Audio/Video Remote Control Profile (AVRCP) Service Class
115 #define AdvancedAudioDistribution 0x110D //Advanced Audio Distribution Profile (A2DP) Profile
116 #define AV_RemoteControl 0x110E //Audio/Video Remote Control Profile (AVRCP)
117 #define AV_RemoteControlController 0x110F //Audio/Video Remote Control Profile (AVRCP)
118 #define Intercom 0x1110 //Intercom Profile (ICP)
119 #define Fax 0x1111 //Fax Profile (FAX)
120 #define Headset_Audio_Gateway 0x1112 //Headset Profile (HSP) Service Class
121 #define WAP 0x1113 //Interoperability Requirements for Bluetooth technology as a WAP, Bluetooth SIG [DEPRECATED] Service Class
122 #define WAP_CLIENT 0x1114 //Interoperability Requirements for Bluetooth technology as a WAP, Bluetooth SIG [DEPRECATED] Service Class
123 #define PANU 0x1115 //Personal Area Networking Profile (PAN)
124 #define NAP 0x1116 //Personal Area Networking Profile (PAN)
125 #define GN 0x1117 //Personal Area Networking Profile (PAN)
126 #define DirectPrinting 0x1118 //Basic Printing Profile (BPP) Service Class
127 #define ReferencePrinting 0x1119 //See Basic Printing Profile (BPP) Service Class
128 #define Basic_Imaging_Profile 0x111A //Basic Imaging Profile (BIP) Profile
129 #define ImagingResponder 0x111B //Basic Imaging Profile (BIP) Service Class
130 #define ImagingAutomaticArchive 0x111C //Basic Imaging Profile (BIP) Service Class
131 #define ImagingReferencedObjects 0x111D //Basic Imaging Profile (BIP) Service Class
132 #define Handsfree 0x111E //Hands-Free Profile (HFP)
133 #define HandsfreeAudioGateway 0x111F //Hands-free Profile (HFP) Service Class
134 #define DirectPrintingReferenceObjectsService 0x1120 //Basic Printing Profile (BPP) Service Class
135 #define ReflectedUI 0x1121 //Basic Printing Profile (BPP) Service Class
136 #define BasicPrinting 0x1122 //Basic Printing Profile (BPP) Profile
137 #define PrintingStatus 0x1123 //Basic Printing Profile (BPP) Service Class
138 #define HumanInterfaceDeviceService 0x1124 //Human Interface Device (HID)
139 #define HardcopyCableReplacement 0x1125 //Hardcopy Cable Replacement Profile (HCRP) Profile
140 #define HCR_Print 0x1126 //Hardcopy Cable Replacement Profile (HCRP) Service Class
141 #define HCR_Scan 0x1127 //Hardcopy Cable Replacement Profile (HCRP) Service Class
142 #define Common_ISDN_Access 0x1128 //Common ISDN Access Profile (CIP)
143 #define SIM_Access 0x112D //SIM Access Profile (SAP)
144 #define Phonebook_Access_PCE 0x112E //Phonebook Access Profile (PBAP) Service Class
145 #define Phonebook_Access_PSE 0x112F //Phonebook Access Profile (PBAP) Service Class
146 #define Phonebook_Access 0x1130 //Phonebook Access Profile (PBAP) Profile
147 #define Headset_HS 0x1131 //Headset Profile (HSP)
148 #define Message_Access_Server 0x1132 //Message Access Profile (MAP) Service Class
149 #define Message_Notification_Server 0x1133 //Message Access Profile (MAP) Service Class
150 #define Message_Access_Profile 0x1134 //Message Access Profile (MAP) Profile
151 #define GNSS 0x1135 //Global Navigation Satellite System Profile (GNSS) Profile
152 #define GNSS_Server 0x1136 // Global Navigation Satellite System Profile (GNSS) Service Class
153 #define ThreeD_Display 0x1137 //3D Synchronization Profile (3DSP) Service Class?
154 #define ThreeD_Glasses 0x1138 //3D Synchronization Profile (3DSP) ?Service Class
155 #define ThreeD_Synchronization 0x1139 //3D Synchronization Profile (3DSP) ?Profile
156 #define MPS_Profile 0x113A //Multi-Profile Specification (MPS) ?Profile
157 #define MPS_SC 0x113B //Multi-Profile Specification (MPS) ?Service Class
158 #define CTN_Access_Service 0x113C //Calendar, Task, and Notes (CTN) Profile ?Service Class
159 #define CTN_Notification_Service 0x113D //Calendar Tasks and Notes (CTN) Profile ?Service Class
160 #define CTN_Profile 0x113E //Calendar Tasks and Notes (CTN) Profile ?Profile
161 #define PnPInformation 0x1200 //Device Identification (DID)
162 #define GenericNetworking 0x1201 //N/A Service Class
163 #define GenericFileTransfer 0x1202 //N/A Service Class
164 #define GenericAudio 0x1203 //N/A Service Class
165 #define GenericTelephony 0x1204 //N/A Service Class
166 #define UPNP_Service 0x1205 //Enhanced Service Discovery Profile (ESDP) [DEPRECATED] Service Class
167 #define UPNP_IP_Service 0x1206 //Enhanced Service Discovery Profile (ESDP) [DEPRECATED] Service Class
168 #define ESDP_UPNP_IP_PAN 0x1300 //Enhanced Service Discovery Profile (ESDP) [DEPRECATED] Service Class
169 #define ESDP_UPNP_IP_LAP 0x1301 //Enhanced Service Discovery Profile (ESDP)[DEPRECATED] Service Class
170 #define ESDP_UPNP_L2CAP 0x1302 //Enhanced Service Discovery Profile (ESDP)[DEPRECATED] Service Class
171 #define VideoSource 0x1303 //Video Distribution Profile (VDP) Service Class
172 #define VideoSink 0x1304 //Video Distribution Profile (VDP) Service Class
173 #define VideoDistribution 0x1305 //Video Distribution Profile (VDP) Profile
174 #define HDP 0x1400 //Health Device Profile Profile
175 #define HDP_Source 0x1401 //Health Device Profile (HDP) Service Class
176 #define HDP_Sink 0x1402 //Health Device Profile (HDP) Service Class
178 /* List of GATT Services UUID */
179 #define Generic_Access 0x1800 //Generic Access Service
180 #define Generic_Attribute 0x1801 //Generic Attribute Service
181 #define Immediate_Alert 0x1802 //Immediate Alert Service
182 #define Link_Loss 0x1803 //Link Loss Service
183 #define Tx_Power 0x1804 //Tx Power Service
184 #define Current_Time 0x1805 //Current Time Service
185 #define Reference_Time_Update 0x1806 //Reference Time Update Service
186 #define Next_Dst_Change 0x1807 //Next Destination Change Service
187 #define Glucose 0x1808 //Glucose Service
188 #define Health_Thermometer 0x1809 //Health Thermometer Service
189 #define Device_Information 0x180A //Device Information Service
190 #define Heart_Rate 0x180D //Heart Rate Service
191 #define Phone_Alert_Status 0x180E //Phone Alert Status Service
192 #define Battery_Service 0x180F //Battery Service
193 #define Blood_Pressure 0x1810 //Blood Pressure Service
194 #define Alert_Notification 0x1811 //Alert Notification Service
195 #define Human_Interface_Device 0x1812 //HID Service
196 #define Scan_Parameters 0x1813 //Scan Parameters Service
197 #define Running_Speed_And_Cadence 0x1814 //Running Speed and Cadence Service
198 #define Automation_IO 0x1815 //Automation IO Service
199 #define Cycling_Speed_And_Cadence 0x1816 //Cycling Speed and Cadence Service
200 #define Cycling_Power 0x1818 //Cycling Power Service
201 #define Location_And_Navigation 0x1819 //Location and Navigation Service
202 #define Environmental_Sensing 0x181A //Environment Sensing Service
203 #define Body_Composition 0x181B //Body Composition Service
204 #define User_Data 0x181C //User Data Service
205 #define Weight_Scale 0x181D //Weight Scale Service
206 #define Bond_Management 0x181E //Bond Management Service
207 #define Continuous_Glucose_Monitoring 0x181F //Continuous Glucose Monitoring Service
208 #define Internet_Protocol_Support 0x1820 //Internet Protocol Support Service
209 #define Indoor_Positioning 0x1821 //Indoor Positioning Service
210 #define Pulse_Oximeter 0x1822 //Pulse Oximeter Service
211 #define Http_Proxy 0x1823 //Http Proxy Service
212 #define Transport_Discovery 0x1824 //Transport Discovery Service
213 #define Object_Transfer 0x1825 //Object Transfer Service
215 /* List of GATT Characteristics UUID */
216 #define Gap_Device_Name 0x2A00
217 #define Gap_Appearance 0x2A01
218 #define Gap_Peripheral_Privacy_Flag 0x2A02
219 #define Gap_Reconnection_Address 0x2A03
220 #define Gap_Peripheral_Preferred_Connection_Parameters 0x2A04
221 #define Gatt_Service_Changed 0x2A05
222 #define Alert_Level 0x2A06
223 #define Tx_Power_Level 0x2A07
224 #define Date_Time 0x2A08
225 #define Day_Of_Week 0x2A09
226 #define Day_Date_Time 0x2A0A
227 #define Exact_Time_256 0x2A0C
228 #define Dst_Offset 0x2A0D
229 #define Time_Zone 0x2A0E
230 #define Local_Time_Information 0x2A0F
231 #define Time_With_Dst 0x2A11
232 #define Time_Accuracy 0x2A12
233 #define Time_Source 0x2A13
234 #define Reference_Time_Information 0x2A14
235 #define Time_Update_Control_Point 0x2A16
236 #define Time_Update_State 0x2A17
237 #define Glucose_Measurement 0x2A18
238 #define Battery_Level 0x2A19
239 #define Temperature_Measurement 0x2A1C
240 #define Temperature_Type 0x2A1D
241 #define Intermediate_Temperature 0x2A1E
242 #define Measurement_Interval 0x2A21
243 #define Boot_Keyboard_Input_Report 0x2A22
244 #define System_Id 0x2A23
245 #define Model_Number_String 0x2A24
246 #define Serial_Number_String 0x2A25
247 #define Firmware_Revision_String 0x2A26
248 #define Hardware_Revision_String 0x2A27
249 #define Software_Revision_String 0x2A28
250 #define Manufacturer_Name_String 0x2A29
251 #define Regulatory_Certification_Data_List 0x2A2A
252 #define Current_Time_Charac 0x2A2B
253 #define Magnetic_Declination 0x2A2C
254 #define Scan_Refresh 0x2A31
255 #define Boot_Keyboard_Output_Report 0x2A32
256 #define Boot_Mouse_Input_Report 0x2A33
257 #define Glucose_Measurement_Context 0x2A34
258 #define Blood_Pressure_Measurement 0x2A35
259 #define Intermediate_Cuff_Pressure 0x2A36
260 #define Heart_Rate_Measurement 0x2A37
261 #define Body_Sensor_Location 0x2A38
262 #define Heart_Rate_Control_Point 0x2A39
263 #define Alert_Status 0x2A3F
264 #define Ringer_Control_Point 0x2A40
265 #define Ringer_Setting 0x2A41
266 #define Alert_Category_Id_Bit_Mask 0x2A42
267 #define Alert_Category_Id 0x2A43
268 #define Alert_Notification_Control_Point 0x2A44
269 #define Unread_Alert_Status 0x2A45
270 #define New_Alert 0x2A46
271 #define Supported_New_Alert_Category 0x2A47
272 #define Supported_Unread_Alert_Category 0x2A48
273 #define Blood_Pressure_Feature 0x2A49
274 #define Hid_Information 0x2A4A
275 #define Report_Map 0x2A4B
276 #define Hid_Control_Point 0x2A4C
277 #define Report 0x2A4D
278 #define Protocol_Mode 0x2A4E
279 #define Scan_Interval_Window 0x2A4F
280 #define Pnp_Id 0x2A50
281 #define Glucose_Feature 0x2A51
282 #define Record_Access_Control_Point 0x2A52
283 #define Rsc_Measurement 0x2A53
284 #define Rsc_Feature 0x2A54
285 #define Sc_Control_Point 0x2A55
286 #define Digital 0x2A56
287 #define Analog 0x2A58
288 #define Aggregate 0x2A5A
289 #define Csc_Measurement 0x2A5B
290 #define Csc_Feature 0x2A5C
291 #define Sensor_Location 0x2A5D
292 #define Plx_Spot_Check_Measurement 0x2A5E
293 #define Plx_Continuous_Measurement 0x2A5F
294 #define Plx_Features 0x2A60
295 #define Cycling_Power_Measurement 0x2A63
296 #define Cycling_Power_Vector 0x2A64
297 #define Cycling_Power_Feature 0x2A65
298 #define Cycling_Power_Control_Point 0x2A66
299 #define Location_And_Speed 0x2A67
300 #define Navigation 0x2A68
301 #define Position_Quality 0x2A69
302 #define Ln_Feature 0x2A6A
303 #define Ln_Control_Point 0x2A6B
304 #define Elevation 0x2A6C
305 #define Pressure 0x2A6D
306 #define Temperature 0x2A6E
307 #define Humidity 0x2A6F
308 #define True_Wind_Speed 0x2A70
309 #define True_Wind_Direction 0x2A71
310 #define Apparent_Wind_Speed 0x2A72
311 #define Apparent_Wind_Direction 0x2A73
312 #define Gust_Factor 0x2A74
313 #define Pollen_Concentration 0x2A75
314 #define Uv_Index 0x2A76
315 #define Irradiance 0x2A77
316 #define Rainfall 0x2A78
317 #define Wind_Chill 0x2A79
318 #define Heat_Index 0x2A7A
319 #define Dew_Point 0x2A7B
320 #define Descriptor_Value_Changed 0x2A7D
321 #define Aerobic_Threshold 0x2A7F
323 #define Anaerobic_Heart_Rate_Lower_Limit 0x2A81
324 #define Anaerobic_Heart_Rate_Upper_Limit 0x2A82
325 #define Anaerobic_Threshold 0x2A83
326 #define Aerobic_Heart_Rate_Upper_Limit 0x2A84
327 #define Date_Of_Birth 0x2A85
328 #define Date_Of_Threshold_Assessment 0x2A86
329 #define Email_Address 0x2A87
330 #define Fat_Burn_Heart_Rate_Lower_Limit 0x2A88
331 #define Fat_Burn_Heart_Rate_Upper_Limit 0x2A89
332 #define First_Name 0x2A8A
333 #define Five_Zone_Heart_Rate_Limits 0x2A8B
334 #define Gender 0x2A8C
335 #define Heart_Rate_Max 0x2A8D
336 #define Height 0x2A8E
337 #define Hip_Circumference 0x2A8F
338 #define Last_Name 0x2A90
339 #define Maximum_Recommended_Heart_Rate 0x2A91
340 #define Resting_Heart_Rate 0x2A92
341 #define Sport_Type_For_Aerobic_And_Anaerobic_Thresholds 0x2A93
342 #define Three_Zone_Heart_Rate_Limits 0x2A94
343 #define Two_Zone_Heart_Rate_Limit 0x2A95
344 #define Vo2_Max 0x2A96
345 #define Waist_Circumference 0x2A97
346 #define Weight 0x2A98
347 #define Database_Change_Increment 0x2A99
348 #define User_Index 0x2A9A
349 #define Body_Composition_Feature 0x2A9B
350 #define Body_Composition_Measurement 0x2A9C
351 #define Weight_Measurement 0x2A9D
352 #define Weight_Scale_Feature 0x2A9E
353 #define User_Control_Point 0x2A9F
354 #define Magnetic_Flux_Density_2D 0x2AA0
355 #define Magnetic_Flux_Density_3D 0x2AA1
356 #define Language 0x2AA2
357 #define Barometric_Pressure_Trend 0x2AA3
358 #define Bond_Management_Control_Point 0x2AA4
359 #define Bond_Management_Feature 0x2AA5
360 #define Gap_Central_Address_Resolution_Support 0x2AA6
361 #define Cgm_Measurement 0x2AA7
362 #define Cgm_Feature 0x2AA8
363 #define Cgm_Status 0x2AA9
364 #define Cgm_Session_Start_Time 0x2AAA
365 #define Cgm_Session_Run_Time 0x2AAB
366 #define Cgm_Specific_Ops_Control_Point 0x2AAC
367 #define Indoor_Positioning_Configuration 0x2AAD
368 #define Latitude 0x2AAE
369 #define Longitude 0x2AAF
370 #define Local_North_Coordinate 0x2AB0
371 #define Local_East_Coordinate 0x2AB1
372 #define Floor_Number 0x2AB2
373 #define Altitude 0x2AB3
374 #define Uncertainty 0x2AB4
375 #define Location_Name 0x2AB5
377 #define Http_Headers 0x2AB7
378 #define Http_Status_Code 0x2AB8
379 #define Http_Entity_Body 0x2AB9
380 #define Http_Control_Point 0x2ABA
381 #define Https_Security 0x2ABB
382 #define Tds_Control_Point 0x2ABC
383 #define Ots_Feature 0x2ABD
384 #define Object_Name 0x2ABE
385 #define Object_Type 0x2ABF
386 #define Object_Size 0x2AC0
387 #define Object_First_Created 0x2AC1
388 #define Object_Last_Modified 0x2AC2
389 #define Object_Id 0x2AC3
390 #define Object_Properties 0x2AC4
391 #define Object_Action_Control_Point 0x2AC5
392 #define Object_List_Control_Point 0x2AC6
393 #define Object_List_Filter 0x2AC7
394 #define Object_Changed 0x2AC8
395 #define Fitness_Machine_Control_Point 0xEE1D
397 /* List of GATT Descriptors UUID */
398 #define Gatt_Characteristic_Extended_Properties 0x2900
399 #define Gatt_Characteristic_User_Description 0x2901
400 #define Gatt_Client_Characteristic_Configuration 0x2902
401 #define Gatt_Server_Characteristic_Configuration 0x2903
402 #define Gatt_Characteristic_Presentation_Format 0x2904
403 #define Gatt_Characteristic_Aggregate_Format 0x2905
404 #define Valid_Range 0x2906
405 #define External_Report_Reference 0x2907
406 #define Report_Reference 0x2908
407 #define Number_Of_Digitals 0x2909
408 #define Value_Trigger_Setting 0x290A
409 #define Es_Configuration 0x290B
410 #define Es_Measurement 0x290C
411 #define Es_Trigger_Setting 0x290D
412 #define Time_Trigger_Setting 0x290E
414 /* List of GATT Declarations UUID */
415 #define Gatt_Primary_Service_Declaration 0x2800
416 #define Gatt_Secondary_Service_Declaration 0x2801
417 #define Gatt_Include_Declaration 0x2802
418 #define Gatt_Characteristic_Declaration 0x2803
420 const char *bt_uuid_t2str(const uint8_t *uuid, char *buf);
421 const char *btuuid2str(const uint8_t *uuid);
422 const char *bt_bdaddr_t2str(const bt_bdaddr_t *bd_addr, char *buf);
423 void str2bt_bdaddr_t(const char *str, bt_bdaddr_t *bd_addr);
424 void str2bt_uuid_t(const char *str, bt_uuid_t *uuid);
425 const char *btproperty2str(const bt_property_t *property);
426 const char *bdaddr2str(const bt_bdaddr_t *bd_addr);
428 const char* bt_property_type_t2str(bt_property_type_t prop_type);
429 const char* bt_device_type_t2str(bt_device_type_t device_type);
432 int val; /* int value */
433 const char *str; /* corresponding string */
436 int int2str_findint(int v, const struct int2str m[]);
437 int int2str_findstr(const char *str, const struct int2str m[]);
438 const char *enum_defines(void *v, int i);
439 const char *enum_strings(void *v, int i);
440 const char *enum_one_string(void *v, int i);
441 bt_service_id_t _bt_convert_uuid_string_to_service_id(const char *uuid);
442 char *_bt_convert_service_id_to_uuid_string(bt_service_id_t service_id);
443 const char *_bt_hal_dump_uuid_name(int uuid_no);
445 #endif //_BT_HAL_UTILS_H_