2 * Open Adaptation Layer (OAL)
4 * Copyright (c) 2014-2015 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
25 #include <bluetooth.h>
26 #include "oal-utils.h"
27 #include "oal-manager.h"
29 char *bdt_bd2str(const bt_address_t *bdaddr, bdstr_t *bdstr)
31 const uint8_t *addr = bdaddr->addr;
38 snprintf(*bdstr, sizeof(bdstr_t), "%02x:%02x:%02x:%02x:%02x:%02x",
39 addr[0], addr[1], addr[2],
40 addr[3], addr[4], addr[5]);
44 char* convert_bdaddr_2_str(const bt_bdaddr_t *bd_addr, char *buf, int len)
49 return strncpy(buf, "NULL", len);
53 snprintf(buf, len, "%02x:%02x:%02x:%02x:%02x:%02x",
54 p[0], p[1], p[2], p[3], p[4], p[5]);
59 char *bdaddr_2_str(const bt_bdaddr_t *bd_addr)
61 static char buf[BT_ADDRESS_STR_LEN];
62 return convert_bdaddr_2_str(bd_addr, buf, BT_ADDRESS_STR_LEN);
65 void string_to_uuid(char *str, service_uuid_t *p_uuid)
67 uint32_t uuid0, uuid4;
68 uint16_t uuid1, uuid2, uuid3, uuid5;
70 sscanf(str, "%08x-%04hx-%04hx-%04hx-%08x%04hx",
71 &uuid0, &uuid1, &uuid2, &uuid3, &uuid4, &uuid5);
80 memcpy(&(p_uuid->uuid[0]), &uuid0, 4);
81 memcpy(&(p_uuid->uuid[4]), &uuid1, 2);
82 memcpy(&(p_uuid->uuid[6]), &uuid2, 2);
83 memcpy(&(p_uuid->uuid[8]), &uuid3, 2);
84 memcpy(&(p_uuid->uuid[10]), &uuid4, 4);
85 memcpy(&(p_uuid->uuid[14]), &uuid5, 2);
90 void oal_print_device_address_t(const bt_address_t *addr)
92 BT_INFO("%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X\n", addr->addr[0], addr->addr[1], addr->addr[2],
93 addr->addr[3], addr->addr[4], addr->addr[5]);
96 void oal_convert_addr_string_to_type(unsigned char *addr,
102 for (i = 0; i < BT_ADDRESS_BYTES_NUM; i++) {
103 addr[i] = strtol(address, &ptr, 16);
112 int oal_is_address_zero(unsigned char *addr1)
115 for (i = 0; i < BT_ADDRESS_BYTES_NUM; i++) {
121 if (i == BT_ADDRESS_BYTES_NUM)
127 void uuid_to_string(service_uuid_t *p_uuid, char *str)
129 uint32_t uuid0, uuid4;
130 uint16_t uuid1, uuid2, uuid3, uuid5;
132 memcpy(&uuid0, &(p_uuid->uuid[0]), 4);
133 memcpy(&uuid1, &(p_uuid->uuid[4]), 2);
134 memcpy(&uuid2, &(p_uuid->uuid[6]), 2);
135 memcpy(&uuid3, &(p_uuid->uuid[8]), 2);
136 memcpy(&uuid4, &(p_uuid->uuid[10]), 4);
137 memcpy(&uuid5, &(p_uuid->uuid[14]), 2);
139 snprintf((char *)str, BT_UUID_STRING_MAX, "%.8x-%.4x-%.4x-%.4x-%.8x%.4x",
140 ntohl(uuid0), ntohs(uuid1),
141 ntohs(uuid2), ntohs(uuid3),
142 ntohl(uuid4), ntohs(uuid5));
145 void uuid_to_stringname(service_uuid_t *p_uuid, char *str)
147 uint32_t uuid0, uuid4;
148 uint16_t uuid1, uuid2, uuid3, uuid5;
149 const char *uuid_name;
150 const char *uuid_name1;
152 memcpy(&uuid0, &(p_uuid->uuid[0]), 4);
153 memcpy(&uuid1, &(p_uuid->uuid[4]), 2);
154 memcpy(&uuid2, &(p_uuid->uuid[6]), 2);
155 memcpy(&uuid3, &(p_uuid->uuid[8]), 2);
156 memcpy(&uuid4, &(p_uuid->uuid[10]), 4);
157 memcpy(&uuid5, &(p_uuid->uuid[14]), 2);
160 uuid_name = dump_uuid_name(ntohl(uuid0));
161 uuid_name1 = dump_uuid_name((ntohl(uuid4) >> 16));
163 BT_DBG("UUID Name [%s]", uuid_name);
164 BT_DBG("UUID Name Shifted [%s]", uuid_name1);
166 snprintf((char *)str, 2*BT_UUID_STRING_MAX, "%.8x-%.4x-%.4x-%.4x-%.8x%.4x--%s",
167 ntohl(uuid0), ntohs(uuid1),
168 ntohs(uuid2), ntohs(uuid3),
169 ntohl(uuid4), ntohs(uuid5),
170 !(g_strcmp0(dump_uuid_name(ntohl(uuid0)), "--")) ? dump_uuid_name(((uuid4) >> 16)) : uuid_name);
173 int hex2bin(const char *s)
177 for (i = 0; i < 2; i++) {
180 if ('0' <= c && c <= '9')
182 else if ('a' <= c && c <= 'f')
184 else if ('A' <= c && c <= 'F')
191 void convert_str_2_hex(unsigned char out[], char in[])
194 for (i = 0; i < 62; i++) {
195 out[i] = hex2bin(in); \
200 void convert_hex_2_str(unsigned char * hex, int len, char * str_out)
204 for (i = 0; i < len; i++)
205 snprintf(str_out + (i * 3), 3*(len - i), "%02x ", hex[i]);
210 void print_bt_properties(int num_properties, bt_property_t *properties)
213 for (i = 0; i < num_properties; i++) {
215 memcpy(&prop, properties + i, sizeof(prop));
216 BT_INFO("prop: %s\n", convert_bt_property_2_str(&prop));
220 char* convert_scan_mode_2_str(bt_scan_mode_t scan_mode)
223 case BT_SCAN_MODE_NONE:
224 return "Non Scannable";
225 case BT_SCAN_MODE_CONNECTABLE_DISCOVERABLE:
226 return "Connectable And Discoverable";
227 case BT_SCAN_MODE_CONNECTABLE:
228 return "Connectable";
230 return "Unknown Scan Mode";
235 char* convert_device_type_2_str(bt_device_type_t device_type)
237 switch (device_type) {
238 case BT_DEVICE_DEVTYPE_BREDR:
239 return "BREDR Device";
240 case BT_DEVICE_DEVTYPE_BLE:
242 case BT_DEVICE_DEVTYPE_DUAL:
243 return "Dual Device";
245 return "Unknown Device Type";
249 char *convert_bt_property_2_str(const bt_property_t *property)
251 static char buf[4096];
254 p = buf + snprintf(buf, 4096, "type=%s len=%d val=",
255 convert_property_type_2_str(property->type),
258 switch (property->type) {
259 case BT_PROPERTY_BDNAME:
260 case BT_PROPERTY_REMOTE_FRIENDLY_NAME:
261 snprintf(p, property->len + 1, "%s",
262 ((bt_bdname_t *) property->val)->name);
264 case BT_PROPERTY_BDADDR:
265 sprintf(p, "%s", bdaddr_2_str((bt_bdaddr_t *) property->val));
267 case BT_PROPERTY_CLASS_OF_DEVICE:
268 sprintf(p, "%06x", *((unsigned int *) property->val));
270 case BT_PROPERTY_TYPE_OF_DEVICE:
271 sprintf(p, "%s", convert_device_type_2_str(
272 *((bt_device_type_t *) property->val)));
274 case BT_PROPERTY_REMOTE_RSSI:
275 sprintf(p, "%d", *((char *) property->val));
277 case BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT:
278 sprintf(p, "%d", *((unsigned int *) property->val));
280 case BT_PROPERTY_ADAPTER_SCAN_MODE:
282 convert_scan_mode_2_str(*((bt_scan_mode_t *) property->val)));
284 case BT_PROPERTY_ADAPTER_BONDED_DEVICES:
286 case BT_PROPERTY_UUIDS:
288 case BT_PROPERTY_SERVICE_RECORD:
290 /* Tizen BlueZ specific Device properties */
291 case BT_PROPERTY_REMOTE_PAIRED:
292 sprintf(p, "%d", *((uint8_t *) property->val));
294 case BT_PROPERTY_REMOTE_CONNECTED:
295 sprintf(p, "%d", *((unsigned int *) property->val));
297 case BT_PROPERTY_REMOTE_TRUST:
298 sprintf(p, "%d", *((uint8_t *) property->val));
300 case BT_PROPERTY_PAIRABLE:
301 sprintf(p, "%d", *((uint8_t *) property->val));
303 case BT_PROPERTY_VERSION:
304 snprintf(p, property->len + 1, "%s",
305 ((char *) property->val));
307 case BT_PROPERTY_LOCAL_LE_FEATURES:
308 local_le_feat_2_string(p, property->val);
310 case BT_PROPERTY_PAIRABLE_TIMEOUT:
311 sprintf(p, "%d", *((unsigned int *) property->val));
313 case BT_PROPERTY_IPSP_INITIALIZED:
314 sprintf(p, "%d", *((uint8_t *) property->val));
316 case BT_PROPERTY_MODALIAS:
317 snprintf(p, property->len + 1, "%s",
318 ((char *) property->val));
320 case BT_PROPERTY_REMOTE_DEVICE_MANUFACTURER_DATA_LEN:
321 sprintf(p, "%d", *((unsigned int *) property->val));
323 case BT_PROPERTY_REMOTE_DEVICE_MANUFACTURER_DATA: {
325 char *pppp = property->val;
326 for (indx = 0; indx < property->len; indx++)
327 p += sprintf(p, " %2.2X", pppp[indx]);
330 case BT_PROPERTY_REMOTE_BLE_ADV_DATA: {
332 char *pppp = property->val;
333 for (indx = 0; indx < property->len; indx++)
334 p += sprintf(p, " %2.2X", pppp[indx]);
337 case BT_PROPERTY_REMOTE_IS_ALIAS_SET: {
338 sprintf(p, "%d", *((uint8_t *) property->val));
341 /* End of Tizen BlueZ specific device propeties */
342 case BT_PROPERTY_REMOTE_VERSION_INFO:
343 case BT_PROPERTY_REMOTE_DEVICE_TIMESTAMP:
345 sprintf(p, "%p", property->val);
351 char *dump_char_prop(uint8_t prop)
354 CASE_RETURN_STR(BROADCAST);
355 CASE_RETURN_STR(READ);
356 CASE_RETURN_STR(WRITE_NR);
357 CASE_RETURN_STR(WRITE);
358 CASE_RETURN_STR(NOTIFY);
359 CASE_RETURN_STR(INDICATE);
360 CASE_RETURN_STR(AUTH);
361 CASE_RETURN_STR(EXT_PROP);
367 char *dump_char_perm(uint8_t perm)
372 CASE_RETURN_STR(ENCRYPT_RD);
373 CASE_RETURN_STR(ENCRYPT_WR);
374 CASE_RETURN_STR(ENC_AUTH_RD);
375 CASE_RETURN_STR(ENC_AUTH_WR);
381 char *char_prop_to_string(uint8_t prop, char *str)
386 for (i = 0; i < 8; i++) {
387 if (prop & (1 << i)) {
388 ret = snprintf(ptr, 11, "%s|", dump_char_prop(prop & (1 << i)));
397 char *char_perm_to_string(uint8_t perm, char *str)
402 for (i = 0; i < 6; i++) {
403 if (perm & (1 << i)) {
404 ret = snprintf(ptr, 13, "%s|", dump_char_perm(perm & (1 << i)));
413 void local_le_feat_2_string(char *str, const bt_local_le_features_t *f)
417 str += snprintf(str, strlen(str), "{\n");
419 str += sprintf(str, "Privacy supported: %s,\n",
420 f->local_privacy_enabled ? "TRUE" : "FALSE");
422 str += sprintf(str, "Num of advertising instances: %u,\n",
423 f->max_adv_instance);
425 str += sprintf(str, "PRA offloading support: %s,\n",
426 f->rpa_offload_supported ? "TRUE" : "FALSE");
428 str += sprintf(str, "Num of offloaded IRKs: %u,\n",
429 f->max_irk_list_size);
431 str += sprintf(str, "Num of offloaded scan filters: %u,\n",
432 f->max_adv_filter_supported);
434 scan_num = f->scan_result_storage_size;
436 str += sprintf(str, "Num of offloaded scan results: %u,\n", scan_num);
438 str += sprintf(str, "Activity & energy report support: %s\n",
439 f->activity_energy_info_supported ? "TRUE" : "FALSE");
441 str += sprintf(str, "LE 2M PHY support: %s\n",
442 f->le_2m_phy_supported ? "TRUE" : "FALSE");
444 str += sprintf(str, "LE Coded PHY support: %s\n",
445 f->le_coded_phy_supported ? "TRUE" : "FALSE");
450 char* convert_property_type_2_str(bt_property_type_t prop_type)
453 case BT_PROPERTY_BDNAME:
454 return "[Bluetooth Name]";
455 case BT_PROPERTY_BDADDR:
456 return "[Bluetooth Address]";
457 case BT_PROPERTY_UUIDS:
459 case BT_PROPERTY_CLASS_OF_DEVICE:
460 return "[Class of Device]";
461 case BT_PROPERTY_TYPE_OF_DEVICE:
462 return "[Bluetooth Type of Device]";
463 case BT_PROPERTY_SERVICE_RECORD:
464 return "[Bluetooth Service record]";
465 case BT_PROPERTY_ADAPTER_SCAN_MODE:
466 return "[Bluetooth Adapter Scan Mode]";
467 case BT_PROPERTY_ADAPTER_BONDED_DEVICES:
468 return "[Bluetooth Bonded Devices]";
469 case BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT:
470 return "[Bluetooth Adapter Discovery Timeout]";
471 case BT_PROPERTY_REMOTE_FRIENDLY_NAME:
472 return "[Bluetooth Friendly Name]";
473 case BT_PROPERTY_REMOTE_RSSI:
474 return "[Bluetooth Rmote RSSI]";
475 case BT_PROPERTY_REMOTE_VERSION_INFO:
476 return "[Bluetooth Version Info]";
477 case BT_PROPERTY_LOCAL_LE_FEATURES:
478 return "[Bluetooth LE Features]";
479 case BT_PROPERTY_REMOTE_PAIRED:
480 return "[Bluetooth Remote Paired]";
481 case BT_PROPERTY_REMOTE_CONNECTED:
482 return "[Bluetooth Remote Connected]";
483 case BT_PROPERTY_REMOTE_TRUST:
484 return "[Bluetooth Remote TRUST]";
485 case BT_PROPERTY_PAIRABLE:
486 return "[Bluetooth Pairable]";
487 case BT_PROPERTY_PAIRABLE_TIMEOUT:
488 return "[Bluetooth Pairable Timeout]";
489 case BT_PROPERTY_VERSION:
490 return "[Bluetooth Version]";
491 case BT_PROPERTY_IPSP_INITIALIZED:
492 return "[Bluetooth IPSP Initialized]";
493 case BT_PROPERTY_MODALIAS:
494 return "[Bluetooth ModAlias]";
495 case BT_PROPERTY_REMOTE_DEVICE_TIMESTAMP:
496 return "[Bluetooth Remote Device Timestamp]";
497 case BT_PROPERTY_REMOTE_DEVICE_MANUFACTURER_DATA_LEN:
498 return "[Bluetooth Remote Device Manufacturer Data Len]";
499 case BT_PROPERTY_REMOTE_DEVICE_MANUFACTURER_DATA:
500 return "[Bluetooth Remote Device Manufacturer Data]";
501 case BT_PROPERTY_REMOTE_BLE_ADV_DATA:
502 return "[Bluetooth Remote Device LE Advertising Data]";
504 return "[Default Property]";
508 const char *dump_uuid_name(int uuid_no)
511 CASE_RETURN_STR(BASE)
514 CASE_RETURN_STR(RFCOMM)
516 CASE_RETURN_STR(TCS_BIN)
517 CASE_RETURN_STR(TCS_AT)
519 CASE_RETURN_STR(OBEX)
522 CASE_RETURN_STR(HTTP)
524 CASE_RETURN_STR(BNEP)
525 CASE_RETURN_STR(UPNP)
526 CASE_RETURN_STR(HIDP)
527 CASE_RETURN_STR(HardcopyControlChannel)
528 CASE_RETURN_STR(HardcopyDataChannel)
529 CASE_RETURN_STR(HardcopyNotification)
530 CASE_RETURN_STR(AVCTP)
531 CASE_RETURN_STR(AVDTP)
532 CASE_RETURN_STR(CMTP)
533 CASE_RETURN_STR(MCAPControlChannel)
534 CASE_RETURN_STR(MCAPDataChannel)
535 CASE_RETURN_STR(L2CAP)
536 CASE_RETURN_STR(ServiceDiscoveryServerServiceClassID)
537 CASE_RETURN_STR(BrowseGroupDescriptorServiceClassID)
538 CASE_RETURN_STR(SerialPort)
539 CASE_RETURN_STR(LANAccessUsingPPP)
540 CASE_RETURN_STR(DialupNetworking)
541 CASE_RETURN_STR(IrMCSync)
542 CASE_RETURN_STR(OBEXObjectPush)
543 CASE_RETURN_STR(OBEXFileTransfer)
544 CASE_RETURN_STR(IrMCSyncCommand)
545 CASE_RETURN_STR(Headset)
546 CASE_RETURN_STR(CordlessTelephony)
547 CASE_RETURN_STR(AudioSource)
548 CASE_RETURN_STR(AudioSink)
549 CASE_RETURN_STR(AV_RemoteControlTarget)
550 CASE_RETURN_STR(AdvancedAudioDistribution)
551 CASE_RETURN_STR(AV_RemoteControl)
552 CASE_RETURN_STR(AV_RemoteControlController)
553 CASE_RETURN_STR(Intercom)
555 CASE_RETURN_STR(Headset_Audio_Gateway)
557 CASE_RETURN_STR(WAP_CLIENT)
558 CASE_RETURN_STR(PANU)
561 CASE_RETURN_STR(DirectPrinting)
562 CASE_RETURN_STR(ReferencePrinting)
563 CASE_RETURN_STR(Basic_Imaging_Profile)
564 CASE_RETURN_STR(ImagingResponder)
565 CASE_RETURN_STR(ImagingAutomaticArchive)
566 CASE_RETURN_STR(ImagingReferencedObjects)
567 CASE_RETURN_STR(Handsfree)
568 CASE_RETURN_STR(HandsfreeAudioGateway)
569 CASE_RETURN_STR(DirectPrintingReferenceObjectsService)
570 CASE_RETURN_STR(ReflectedUI)
571 CASE_RETURN_STR(BasicPrinting)
572 CASE_RETURN_STR(PrintingStatus)
573 CASE_RETURN_STR(HumanInterfaceDeviceService)
574 CASE_RETURN_STR(HardcopyCableReplacement)
575 CASE_RETURN_STR(HCR_Print)
576 CASE_RETURN_STR(HCR_Scan)
577 CASE_RETURN_STR(Common_ISDN_Access)
578 CASE_RETURN_STR(SIM_Access)
579 CASE_RETURN_STR(Phonebook_Access_PCE)
580 CASE_RETURN_STR(Phonebook_Access_PSE)
581 CASE_RETURN_STR(Phonebook_Access)
582 CASE_RETURN_STR(Headset_HS)
583 CASE_RETURN_STR(Message_Access_Server)
584 CASE_RETURN_STR(Message_Notification_Server)
585 CASE_RETURN_STR(Message_Access_Profile)
586 CASE_RETURN_STR(GNSS)
587 CASE_RETURN_STR(GNSS_Server)
588 CASE_RETURN_STR(ThreeD_Display)
589 CASE_RETURN_STR(ThreeD_Glasses)
590 CASE_RETURN_STR(ThreeD_Synchronization)
591 CASE_RETURN_STR(MPS_Profile)
592 CASE_RETURN_STR(MPS_SC)
593 CASE_RETURN_STR(CTN_Access_Service)
594 CASE_RETURN_STR(CTN_Notification_Service)
595 CASE_RETURN_STR(CTN_Profile)
596 CASE_RETURN_STR(PnPInformation)
597 CASE_RETURN_STR(GenericNetworking)
598 CASE_RETURN_STR(GenericFileTransfer)
599 CASE_RETURN_STR(GenericAudio)
600 CASE_RETURN_STR(GenericTelephony)
601 CASE_RETURN_STR(UPNP_Service)
602 CASE_RETURN_STR(UPNP_IP_Service)
603 CASE_RETURN_STR(ESDP_UPNP_IP_PAN)
604 CASE_RETURN_STR(ESDP_UPNP_IP_LAP)
605 CASE_RETURN_STR(ESDP_UPNP_L2CAP)
606 CASE_RETURN_STR(VideoSource)
607 CASE_RETURN_STR(VideoSink)
608 CASE_RETURN_STR(VideoDistribution)
610 CASE_RETURN_STR(HDP_Source)
611 CASE_RETURN_STR(HDP_Sink)
612 CASE_RETURN_STR(Generic_Access)
613 CASE_RETURN_STR(Generic_Attribute)
614 CASE_RETURN_STR(Immediate_Alert)
615 CASE_RETURN_STR(Link_Loss)
616 CASE_RETURN_STR(Tx_Power)
617 CASE_RETURN_STR(Current_Time)
618 CASE_RETURN_STR(Reference_Time_Update)
619 CASE_RETURN_STR(Next_Dst_Change)
620 CASE_RETURN_STR(Glucose)
621 CASE_RETURN_STR(Health_Thermometer)
622 CASE_RETURN_STR(Device_Information)
623 CASE_RETURN_STR(Heart_Rate)
624 CASE_RETURN_STR(Phone_Alert_Status)
625 CASE_RETURN_STR(Battery_Service)
626 CASE_RETURN_STR(Blood_Pressure)
627 CASE_RETURN_STR(Alert_Notification)
628 CASE_RETURN_STR(Human_Interface_Device)
629 CASE_RETURN_STR(Scan_Parameters)
630 CASE_RETURN_STR(Running_Speed_And_Cadence)
631 CASE_RETURN_STR(Automation_IO)
632 CASE_RETURN_STR(Cycling_Speed_And_Cadence)
633 CASE_RETURN_STR(Cycling_Power)
634 CASE_RETURN_STR(Location_And_Navigation)
635 CASE_RETURN_STR(Environmental_Sensing)
636 CASE_RETURN_STR(Body_Composition)
637 CASE_RETURN_STR(User_Data)
638 CASE_RETURN_STR(Weight_Scale)
639 CASE_RETURN_STR(Bond_Management)
640 CASE_RETURN_STR(Continuous_Glucose_Monitoring)
641 CASE_RETURN_STR(Internet_Protocol_Support)
642 CASE_RETURN_STR(Indoor_Positioning)
643 CASE_RETURN_STR(Pulse_Oximeter)
644 CASE_RETURN_STR(Http_Proxy)
645 CASE_RETURN_STR(Transport_Discovery)
646 CASE_RETURN_STR(Object_Transfer)
647 CASE_RETURN_STR(Gap_Device_Name)
648 CASE_RETURN_STR(Gap_Appearance)
649 CASE_RETURN_STR(Gap_Peripheral_Privacy_Flag)
650 CASE_RETURN_STR(Gap_Reconnection_Address)
651 CASE_RETURN_STR(Gap_Peripheral_Preferred_Connection_Parameters)
652 CASE_RETURN_STR(Gatt_Service_Changed)
653 CASE_RETURN_STR(Alert_Level)
654 CASE_RETURN_STR(Tx_Power_Level)
655 CASE_RETURN_STR(Date_Time)
656 CASE_RETURN_STR(Day_Of_Week)
657 CASE_RETURN_STR(Day_Date_Time)
658 CASE_RETURN_STR(Exact_Time_256)
659 CASE_RETURN_STR(Dst_Offset)
660 CASE_RETURN_STR(Time_Zone)
661 CASE_RETURN_STR(Local_Time_Information)
662 CASE_RETURN_STR(Time_With_Dst)
663 CASE_RETURN_STR(Time_Accuracy)
664 CASE_RETURN_STR(Time_Source)
665 CASE_RETURN_STR(Reference_Time_Information)
666 CASE_RETURN_STR(Time_Update_Control_Point)
667 CASE_RETURN_STR(Time_Update_State)
668 CASE_RETURN_STR(Glucose_Measurement)
669 CASE_RETURN_STR(Battery_Level)
670 CASE_RETURN_STR(Temperature_Measurement)
671 CASE_RETURN_STR(Temperature_Type)
672 CASE_RETURN_STR(Intermediate_Temperature)
673 CASE_RETURN_STR(Measurement_Interval)
674 CASE_RETURN_STR(Boot_Keyboard_Input_Report)
675 CASE_RETURN_STR(System_Id)
676 CASE_RETURN_STR(Model_Number_String)
677 CASE_RETURN_STR(Serial_Number_String)
678 CASE_RETURN_STR(Firmware_Revision_String)
679 CASE_RETURN_STR(Hardware_Revision_String)
680 CASE_RETURN_STR(Software_Revision_String)
681 CASE_RETURN_STR(Manufacturer_Name_String)
682 CASE_RETURN_STR(Regulatory_Certification_Data_List)
683 CASE_RETURN_STR(Current_Time_Charac)
684 CASE_RETURN_STR(Magnetic_Declination)
685 CASE_RETURN_STR(Scan_Refresh)
686 CASE_RETURN_STR(Boot_Keyboard_Output_Report)
687 CASE_RETURN_STR(Boot_Mouse_Input_Report)
688 CASE_RETURN_STR(Glucose_Measurement_Context)
689 CASE_RETURN_STR(Blood_Pressure_Measurement)
690 CASE_RETURN_STR(Intermediate_Cuff_Pressure)
691 CASE_RETURN_STR(Heart_Rate_Measurement)
692 CASE_RETURN_STR(Body_Sensor_Location)
693 CASE_RETURN_STR(Heart_Rate_Control_Point)
694 CASE_RETURN_STR(Alert_Status)
695 CASE_RETURN_STR(Ringer_Control_Point)
696 CASE_RETURN_STR(Ringer_Setting)
697 CASE_RETURN_STR(Alert_Category_Id_Bit_Mask)
698 CASE_RETURN_STR(Alert_Category_Id)
699 CASE_RETURN_STR(Alert_Notification_Control_Point)
700 CASE_RETURN_STR(Unread_Alert_Status)
701 CASE_RETURN_STR(New_Alert)
702 CASE_RETURN_STR(Supported_New_Alert_Category)
703 CASE_RETURN_STR(Supported_Unread_Alert_Category)
704 CASE_RETURN_STR(Blood_Pressure_Feature)
705 CASE_RETURN_STR(Hid_Information)
706 CASE_RETURN_STR(Report_Map)
707 CASE_RETURN_STR(Hid_Control_Point)
708 CASE_RETURN_STR(Report)
709 CASE_RETURN_STR(Protocol_Mode)
710 CASE_RETURN_STR(Scan_Interval_Window)
711 CASE_RETURN_STR(Pnp_Id)
712 CASE_RETURN_STR(Glucose_Feature)
713 CASE_RETURN_STR(Record_Access_Control_Point)
714 CASE_RETURN_STR(Rsc_Measurement)
715 CASE_RETURN_STR(Rsc_Feature)
716 CASE_RETURN_STR(Sc_Control_Point)
717 CASE_RETURN_STR(Digital)
718 CASE_RETURN_STR(Analog)
719 CASE_RETURN_STR(Aggregate)
720 CASE_RETURN_STR(Csc_Measurement)
721 CASE_RETURN_STR(Csc_Feature)
722 CASE_RETURN_STR(Sensor_Location)
723 CASE_RETURN_STR(Plx_Spot_Check_Measurement)
724 CASE_RETURN_STR(Plx_Continuous_Measurement)
725 CASE_RETURN_STR(Plx_Features)
726 CASE_RETURN_STR(Cycling_Power_Measurement)
727 CASE_RETURN_STR(Cycling_Power_Vector)
728 CASE_RETURN_STR(Cycling_Power_Feature)
729 CASE_RETURN_STR(Cycling_Power_Control_Point)
730 CASE_RETURN_STR(Location_And_Speed)
731 CASE_RETURN_STR(Navigation)
732 CASE_RETURN_STR(Position_Quality)
733 CASE_RETURN_STR(Ln_Feature)
734 CASE_RETURN_STR(Ln_Control_Point)
735 CASE_RETURN_STR(Elevation)
736 CASE_RETURN_STR(Pressure)
737 CASE_RETURN_STR(Temperature)
738 CASE_RETURN_STR(Humidity)
739 CASE_RETURN_STR(True_Wind_Speed)
740 CASE_RETURN_STR(True_Wind_Direction)
741 CASE_RETURN_STR(Apparent_Wind_Speed)
742 CASE_RETURN_STR(Apparent_Wind_Direction)
743 CASE_RETURN_STR(Gust_Factor)
744 CASE_RETURN_STR(Pollen_Concentration)
745 CASE_RETURN_STR(Uv_Index)
746 CASE_RETURN_STR(Irradiance)
747 CASE_RETURN_STR(Rainfall)
748 CASE_RETURN_STR(Wind_Chill)
749 CASE_RETURN_STR(Heat_Index)
750 CASE_RETURN_STR(Dew_Point)
751 CASE_RETURN_STR(Descriptor_Value_Changed)
752 CASE_RETURN_STR(Aerobic_Threshold)
754 CASE_RETURN_STR(Anaerobic_Heart_Rate_Lower_Limit)
755 CASE_RETURN_STR(Anaerobic_Heart_Rate_Upper_Limit)
756 CASE_RETURN_STR(Anaerobic_Threshold)
757 CASE_RETURN_STR(Aerobic_Heart_Rate_Upper_Limit)
758 CASE_RETURN_STR(Date_Of_Birth)
759 CASE_RETURN_STR(Date_Of_Threshold_Assessment)
760 CASE_RETURN_STR(Email_Address)
761 CASE_RETURN_STR(Fat_Burn_Heart_Rate_Lower_Limit)
762 CASE_RETURN_STR(Fat_Burn_Heart_Rate_Upper_Limit)
763 CASE_RETURN_STR(First_Name)
764 CASE_RETURN_STR(Five_Zone_Heart_Rate_Limits)
765 CASE_RETURN_STR(Gender)
766 CASE_RETURN_STR(Heart_Rate_Max)
767 CASE_RETURN_STR(Height)
768 CASE_RETURN_STR(Hip_Circumference)
769 CASE_RETURN_STR(Last_Name)
770 CASE_RETURN_STR(Maximum_Recommended_Heart_Rate)
771 CASE_RETURN_STR(Resting_Heart_Rate)
772 CASE_RETURN_STR(Sport_Type_For_Aerobic_And_Anaerobic_Thresholds)
773 CASE_RETURN_STR(Three_Zone_Heart_Rate_Limits)
774 CASE_RETURN_STR(Two_Zone_Heart_Rate_Limit)
775 CASE_RETURN_STR(Vo2_Max)
776 CASE_RETURN_STR(Waist_Circumference)
777 CASE_RETURN_STR(Weight)
778 CASE_RETURN_STR(Database_Change_Increment)
779 CASE_RETURN_STR(User_Index)
780 CASE_RETURN_STR(Body_Composition_Feature)
781 CASE_RETURN_STR(Body_Composition_Measurement)
782 CASE_RETURN_STR(Weight_Measurement)
783 CASE_RETURN_STR(Weight_Scale_Feature)
784 CASE_RETURN_STR(User_Control_Point)
785 CASE_RETURN_STR(Magnetic_Flux_Density_2D)
786 CASE_RETURN_STR(Magnetic_Flux_Density_3D)
787 CASE_RETURN_STR(Language)
788 CASE_RETURN_STR(Barometric_Pressure_Trend)
789 CASE_RETURN_STR(Bond_Management_Control_Point)
790 CASE_RETURN_STR(Bond_Management_Feature)
791 CASE_RETURN_STR(Gap_Central_Address_Resolution_Support)
792 CASE_RETURN_STR(Cgm_Measurement)
793 CASE_RETURN_STR(Cgm_Feature)
794 CASE_RETURN_STR(Cgm_Status)
795 CASE_RETURN_STR(Cgm_Session_Start_Time)
796 CASE_RETURN_STR(Cgm_Session_Run_Time)
797 CASE_RETURN_STR(Cgm_Specific_Ops_Control_Point)
798 CASE_RETURN_STR(Indoor_Positioning_Configuration)
799 CASE_RETURN_STR(Latitude)
800 CASE_RETURN_STR(Longitude)
801 CASE_RETURN_STR(Local_North_Coordinate)
802 CASE_RETURN_STR(Local_East_Coordinate)
803 CASE_RETURN_STR(Floor_Number)
804 CASE_RETURN_STR(Altitude)
805 CASE_RETURN_STR(Uncertainty)
806 CASE_RETURN_STR(Location_Name)
808 CASE_RETURN_STR(Http_Headers)
809 CASE_RETURN_STR(Http_Status_Code)
810 CASE_RETURN_STR(Http_Entity_Body)
811 CASE_RETURN_STR(Http_Control_Point)
812 CASE_RETURN_STR(Https_Security)
813 CASE_RETURN_STR(Tds_Control_Point)
814 CASE_RETURN_STR(Ots_Feature)
815 CASE_RETURN_STR(Object_Name)
816 CASE_RETURN_STR(Object_Type)
817 CASE_RETURN_STR(Object_Size)
818 CASE_RETURN_STR(Object_First_Created)
819 CASE_RETURN_STR(Object_Last_Modified)
820 CASE_RETURN_STR(Object_Id)
821 CASE_RETURN_STR(Object_Properties)
822 CASE_RETURN_STR(Object_Action_Control_Point)
823 CASE_RETURN_STR(Object_List_Control_Point)
824 CASE_RETURN_STR(Object_List_Filter)
825 CASE_RETURN_STR(Object_Changed)
826 CASE_RETURN_STR(Fitness_Machine_Control_Point)
827 CASE_RETURN_STR(Gatt_Characteristic_Extended_Properties)
828 CASE_RETURN_STR(Gatt_Characteristic_User_Description)
829 CASE_RETURN_STR(Gatt_Client_Characteristic_Configuration)
830 CASE_RETURN_STR(Gatt_Server_Characteristic_Configuration)
831 CASE_RETURN_STR(Gatt_Characteristic_Presentation_Format)
832 CASE_RETURN_STR(Gatt_Characteristic_Aggregate_Format)
833 CASE_RETURN_STR(Valid_Range)
834 CASE_RETURN_STR(External_Report_Reference)
835 CASE_RETURN_STR(Report_Reference)
836 CASE_RETURN_STR(Number_Of_Digitals)
837 CASE_RETURN_STR(Value_Trigger_Setting)
838 CASE_RETURN_STR(Es_Configuration)
839 CASE_RETURN_STR(Es_Measurement)
840 CASE_RETURN_STR(Es_Trigger_Setting)
841 CASE_RETURN_STR(Time_Trigger_Setting)
842 CASE_RETURN_STR(Gatt_Primary_Service_Declaration)
843 CASE_RETURN_STR(Gatt_Secondary_Service_Declaration)
844 CASE_RETURN_STR(Gatt_Include_Declaration)
845 CASE_RETURN_STR(Gatt_Characteristic_Declaration)