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"
28 char *bdt_bd2str(const bt_address_t *bdaddr, bdstr_t *bdstr)
30 const uint8_t *addr = bdaddr->addr;
37 snprintf(*bdstr, sizeof(bdstr_t), "%02x:%02x:%02x:%02x:%02x:%02x",
38 addr[0], addr[1], addr[2],
39 addr[3], addr[4], addr[5]);
43 char* convert_bdaddr_2_str(const bt_bdaddr_t *bd_addr, char *buf)
48 return strncpy(buf, "NULL", sizeof("NULL"));
51 snprintf(buf, 18, "%02x:%02x:%02x:%02x:%02x:%02x",
52 p[0], p[1], p[2], p[3], p[4], p[5]);
57 char *bdaddr_2_str(const bt_bdaddr_t *bd_addr)
60 return convert_bdaddr_2_str(bd_addr, buf);
63 void string_to_uuid(char *str, service_uuid_t *p_uuid)
65 uint32_t uuid0, uuid4;
66 uint16_t uuid1, uuid2, uuid3, uuid5;
68 sscanf(str, "%08x-%04hx-%04hx-%04hx-%08x%04hx",
69 &uuid0, &uuid1, &uuid2, &uuid3, &uuid4, &uuid5);
78 memcpy(&(p_uuid->uuid[0]), &uuid0, 4);
79 memcpy(&(p_uuid->uuid[4]), &uuid1, 2);
80 memcpy(&(p_uuid->uuid[6]), &uuid2, 2);
81 memcpy(&(p_uuid->uuid[8]), &uuid3, 2);
82 memcpy(&(p_uuid->uuid[10]), &uuid4, 4);
83 memcpy(&(p_uuid->uuid[14]), &uuid5, 2);
88 void oal_print_device_address_t(const bt_address_t *addr)
90 BT_INFO("%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X\n", addr->addr[0], addr->addr[1], addr->addr[2],
91 addr->addr[3], addr->addr[4], addr->addr[5]);
94 void oal_convert_addr_string_to_type(unsigned char *addr,
100 for (i = 0; i < BT_ADDRESS_BYTES_NUM; i++) {
101 addr[i] = strtol(address, &ptr, 16);
110 int oal_is_address_zero(unsigned char *addr1)
113 for (i = 0; i < BT_ADDRESS_BYTES_NUM; i++) {
119 if (i == BT_ADDRESS_BYTES_NUM)
125 void uuid_to_string(service_uuid_t *p_uuid, char *str)
127 uint32_t uuid0, uuid4;
128 uint16_t uuid1, uuid2, uuid3, uuid5;
130 memcpy(&uuid0, &(p_uuid->uuid[0]), 4);
131 memcpy(&uuid1, &(p_uuid->uuid[4]), 2);
132 memcpy(&uuid2, &(p_uuid->uuid[6]), 2);
133 memcpy(&uuid3, &(p_uuid->uuid[8]), 2);
134 memcpy(&uuid4, &(p_uuid->uuid[10]), 4);
135 memcpy(&uuid5, &(p_uuid->uuid[14]), 2);
137 snprintf((char *)str, BT_UUID_STRING_MAX, "%.8x-%.4x-%.4x-%.4x-%.8x%.4x",
138 ntohl(uuid0), ntohs(uuid1),
139 ntohs(uuid2), ntohs(uuid3),
140 ntohl(uuid4), ntohs(uuid5));
143 void uuid_to_stringname(service_uuid_t *p_uuid, char *str)
145 uint32_t uuid0, uuid4;
146 uint16_t uuid1, uuid2, uuid3, uuid5;
147 const char *uuid_name;
148 const char *uuid_name1;
150 memcpy(&uuid0, &(p_uuid->uuid[0]), 4);
151 memcpy(&uuid1, &(p_uuid->uuid[4]), 2);
152 memcpy(&uuid2, &(p_uuid->uuid[6]), 2);
153 memcpy(&uuid3, &(p_uuid->uuid[8]), 2);
154 memcpy(&uuid4, &(p_uuid->uuid[10]), 4);
155 memcpy(&uuid5, &(p_uuid->uuid[14]), 2);
158 uuid_name = dump_uuid_name(ntohl(uuid0));
159 uuid_name1 = dump_uuid_name((ntohl(uuid4) >> 16));
161 BT_DBG("UUID Name [%s]", uuid_name);
162 BT_DBG("UUID Name Shifted [%s]", uuid_name1);
164 snprintf((char *)str, 2*BT_UUID_STRING_MAX, "%.8x-%.4x-%.4x-%.4x-%.8x%.4x--%s",
165 ntohl(uuid0), ntohs(uuid1),
166 ntohs(uuid2), ntohs(uuid3),
167 ntohl(uuid4), ntohs(uuid5),
168 !(g_strcmp0(dump_uuid_name(ntohl(uuid0)), "--")) ? dump_uuid_name(((uuid4) >> 16)) : uuid_name);
171 int hex2bin(const char *s)
175 for (i = 0; i < 2; i++) {
178 if ('0' <= c && c <= '9')
180 else if ('a' <= c && c <= 'f')
182 else if ('A' <= c && c <= 'F')
189 void convert_str_2_hex(char out[], char in[])
192 for (i = 0; i < 62; i++) {
193 out[i] = hex2bin(in); \
198 void convert_hex_2_str(char * hex, int len, char * str_out)
202 for (i = 0; i < len; i++)
203 snprintf(str_out + (i * 3), 3*(len - i), "%02x ", hex[i]);
208 void print_bt_properties(int num_properties, bt_property_t *properties)
211 for (i = 0; i < num_properties; i++) {
213 memcpy(&prop, properties + i, sizeof(prop));
214 BT_INFO("prop: %s\n", convert_bt_property_2_str(&prop));
218 char* convert_scan_mode_2_str(bt_scan_mode_t scan_mode)
221 case BT_SCAN_MODE_NONE:
222 return "Non Scannable";
223 case BT_SCAN_MODE_CONNECTABLE_DISCOVERABLE:
224 return "Connectable And Discoverable";
225 case BT_SCAN_MODE_CONNECTABLE:
226 return "Connectable";
228 return "Unknown Scan Mode";
233 char* convert_device_type_2_str(bt_device_type_t device_type)
235 switch (device_type) {
236 case BT_DEVICE_DEVTYPE_BREDR:
237 return "BREDR Device";
238 case BT_DEVICE_DEVTYPE_BLE:
240 case BT_DEVICE_DEVTYPE_DUAL:
241 return "Dual Device";
243 return "Unknown Device Type";
247 char *convert_bt_property_2_str(const bt_property_t *property)
249 static char buf[4096];
252 p = buf + snprintf(buf, 4096, "type=%s len=%d val=",
253 convert_property_type_2_str(property->type),
256 switch (property->type) {
257 case BT_PROPERTY_BDNAME:
258 case BT_PROPERTY_REMOTE_FRIENDLY_NAME:
259 snprintf(p, property->len + 1, "%s",
260 ((bt_bdname_t *) property->val)->name);
262 case BT_PROPERTY_BDADDR:
263 sprintf(p, "%s", bdaddr_2_str((bt_bdaddr_t *) property->val));
265 case BT_PROPERTY_CLASS_OF_DEVICE:
266 sprintf(p, "%06x", *((unsigned int *) property->val));
268 case BT_PROPERTY_TYPE_OF_DEVICE:
269 sprintf(p, "%s", convert_device_type_2_str(
270 *((bt_device_type_t *) property->val)));
272 case BT_PROPERTY_REMOTE_RSSI:
273 sprintf(p, "%d", *((char *) property->val));
275 case BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT:
276 sprintf(p, "%d", *((unsigned int *) property->val));
278 case BT_PROPERTY_ADAPTER_SCAN_MODE:
280 convert_scan_mode_2_str(*((bt_scan_mode_t *) property->val)));
282 case BT_PROPERTY_ADAPTER_BONDED_DEVICES:
284 case BT_PROPERTY_UUIDS:
286 case BT_PROPERTY_SERVICE_RECORD:
288 /* Tizen BlueZ specific Device properties */
289 case BT_PROPERTY_REMOTE_PAIRED:
290 sprintf(p, "%d", *((uint8_t *) property->val));
292 case BT_PROPERTY_REMOTE_CONNECTED:
293 sprintf(p, "%d", *((unsigned int *) property->val));
295 case BT_PROPERTY_REMOTE_TRUST:
296 sprintf(p, "%d", *((uint8_t *) property->val));
298 case BT_PROPERTY_PAIRABLE:
299 sprintf(p, "%d", *((uint8_t *) property->val));
301 case BT_PROPERTY_VERSION:
302 snprintf(p, property->len + 1, "%s",
303 ((char *) property->val));
305 case BT_PROPERTY_LOCAL_LE_FEATURES:
306 local_le_feat_2_string(p, property->val);
308 case BT_PROPERTY_PAIRABLE_TIMEOUT:
309 sprintf(p, "%d", *((unsigned int *) property->val));
311 case BT_PROPERTY_IPSP_INITIALIZED:
312 sprintf(p, "%d", *((uint8_t *) property->val));
314 case BT_PROPERTY_MODALIAS:
315 snprintf(p, property->len + 1, "%s",
316 ((char *) property->val));
318 case BT_PROPERTY_REMOTE_DEVICE_MANUFACTURER_DATA_LEN:
319 sprintf(p, "%d", *((unsigned int *) property->val));
321 case BT_PROPERTY_REMOTE_DEVICE_MANUFACTURER_DATA: {
323 char *pppp = property->val;
324 for (indx = 0; indx < property->len; indx++)
325 p += sprintf(p, " %2.2X", pppp[indx]);
328 case BT_PROPERTY_REMOTE_BLE_ADV_DATA: {
330 char *pppp = property->val;
331 for (indx = 0; indx < property->len; indx++)
332 p += sprintf(p, " %2.2X", pppp[indx]);
335 case BT_PROPERTY_REMOTE_IS_ALIAS_SET: {
336 sprintf(p, "%d", *((uint8_t *) property->val));
339 /* End of Tizen BlueZ specific device propeties */
340 case BT_PROPERTY_REMOTE_VERSION_INFO:
341 case BT_PROPERTY_REMOTE_DEVICE_TIMESTAMP:
343 sprintf(p, "%p", property->val);
349 char *dump_char_prop(uint8_t prop)
352 CASE_RETURN_STR(BROADCAST);
353 CASE_RETURN_STR(READ);
354 CASE_RETURN_STR(WRITE_NR);
355 CASE_RETURN_STR(WRITE);
356 CASE_RETURN_STR(NOTIFY);
357 CASE_RETURN_STR(INDICATE);
358 CASE_RETURN_STR(AUTH);
359 CASE_RETURN_STR(EXT_PROP);
365 char *dump_char_perm(uint8_t perm)
370 CASE_RETURN_STR(ENCRYPT_RD);
371 CASE_RETURN_STR(ENCRYPT_WR);
372 CASE_RETURN_STR(ENC_AUTH_RD);
373 CASE_RETURN_STR(ENC_AUTH_WR);
379 char *char_prop_to_string(uint8_t prop, char *str)
384 for (i = 0; i < 8; i++) {
385 if (prop & (1 << i)) {
386 ret = snprintf(ptr, 11, "%s|", dump_char_prop(prop & (1 << i)));
395 char *char_perm_to_string(uint8_t perm, char *str)
400 for (i = 0; i < 6; i++) {
401 if (perm & (1 << i)) {
402 ret = snprintf(ptr, 13, "%s|", dump_char_perm(perm & (1 << i)));
411 void local_le_feat_2_string(char *str, const bt_local_le_features_t *f)
415 str += snprintf(str, strlen(str), "{\n");
417 str += sprintf(str, "Privacy supported: %s,\n",
418 f->local_privacy_enabled ? "TRUE" : "FALSE");
420 str += sprintf(str, "Num of advertising instances: %u,\n",
421 f->max_adv_instance);
423 str += sprintf(str, "PRA offloading support: %s,\n",
424 f->rpa_offload_supported ? "TRUE" : "FALSE");
426 str += sprintf(str, "Num of offloaded IRKs: %u,\n",
427 f->max_irk_list_size);
429 str += sprintf(str, "Num of offloaded scan filters: %u,\n",
430 f->max_adv_filter_supported);
432 scan_num = (f->scan_result_storage_size_hibyte << 8) +
433 f->scan_result_storage_size_lobyte;
435 str += sprintf(str, "Num of offloaded scan results: %u,\n", scan_num);
437 str += sprintf(str, "Activity & energy report support: %s\n",
438 f->activity_energy_info_supported ? "TRUE" : "FALSE");
443 char* convert_property_type_2_str(bt_property_type_t prop_type)
446 case BT_PROPERTY_BDNAME:
447 return "[Bluetooth Name]";
448 case BT_PROPERTY_BDADDR:
449 return "[Bluetooth Address]";
450 case BT_PROPERTY_UUIDS:
452 case BT_PROPERTY_CLASS_OF_DEVICE:
453 return "[Class of Device]";
454 case BT_PROPERTY_TYPE_OF_DEVICE:
455 return "[Bluetooth Type of Device]";
456 case BT_PROPERTY_SERVICE_RECORD:
457 return "[Bluetooth Service record]";
458 case BT_PROPERTY_ADAPTER_SCAN_MODE:
459 return "[Bluetooth Adapter Scan Mode]";
460 case BT_PROPERTY_ADAPTER_BONDED_DEVICES:
461 return "[Bluetooth Bonded Devices]";
462 case BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT:
463 return "[Bluetooth Adapter Discovery Timeout]";
464 case BT_PROPERTY_REMOTE_FRIENDLY_NAME:
465 return "[Bluetooth Friendly Name]";
466 case BT_PROPERTY_REMOTE_RSSI:
467 return "[Bluetooth Rmote RSSI]";
468 case BT_PROPERTY_REMOTE_VERSION_INFO:
469 return "[Bluetooth Version Info]";
470 case BT_PROPERTY_LOCAL_LE_FEATURES:
471 return "[Bluetooth LE Features]";
472 case BT_PROPERTY_REMOTE_PAIRED:
473 return "[Bluetooth Remote Paired]";
474 case BT_PROPERTY_REMOTE_CONNECTED:
475 return "[Bluetooth Remote Connected]";
476 case BT_PROPERTY_REMOTE_TRUST:
477 return "[Bluetooth Remote TRUST]";
478 case BT_PROPERTY_PAIRABLE:
479 return "[Bluetooth Pairable]";
480 case BT_PROPERTY_PAIRABLE_TIMEOUT:
481 return "[Bluetooth Pairable Timeout]";
482 case BT_PROPERTY_VERSION:
483 return "[Bluetooth Version]";
484 case BT_PROPERTY_IPSP_INITIALIZED:
485 return "[Bluetooth IPSP Initialized]";
486 case BT_PROPERTY_MODALIAS:
487 return "[Bluetooth ModAlias]";
488 case BT_PROPERTY_REMOTE_DEVICE_TIMESTAMP:
489 return "[Bluetooth Remote Device Timestamp]";
490 case BT_PROPERTY_REMOTE_DEVICE_MANUFACTURER_DATA_LEN:
491 return "[Bluetooth Remote Device Manufacturer Data Len]";
492 case BT_PROPERTY_REMOTE_DEVICE_MANUFACTURER_DATA:
493 return "[Bluetooth Remote Device Manufacturer Data]";
494 case BT_PROPERTY_REMOTE_BLE_ADV_DATA:
495 return "[Bluetooth Remote Device LE Advertising Data]";
497 return "[Default Property]";
501 const char *dump_uuid_name(int uuid_no)
504 CASE_RETURN_STR(BASE)
507 CASE_RETURN_STR(RFCOMM)
509 CASE_RETURN_STR(TCS_BIN)
510 CASE_RETURN_STR(TCS_AT)
512 CASE_RETURN_STR(OBEX)
515 CASE_RETURN_STR(HTTP)
517 CASE_RETURN_STR(BNEP)
518 CASE_RETURN_STR(UPNP)
519 CASE_RETURN_STR(HIDP)
520 CASE_RETURN_STR(HardcopyControlChannel)
521 CASE_RETURN_STR(HardcopyDataChannel)
522 CASE_RETURN_STR(HardcopyNotification)
523 CASE_RETURN_STR(AVCTP)
524 CASE_RETURN_STR(AVDTP)
525 CASE_RETURN_STR(CMTP)
526 CASE_RETURN_STR(MCAPControlChannel)
527 CASE_RETURN_STR(MCAPDataChannel)
528 CASE_RETURN_STR(L2CAP)
529 CASE_RETURN_STR(ServiceDiscoveryServerServiceClassID)
530 CASE_RETURN_STR(BrowseGroupDescriptorServiceClassID)
531 CASE_RETURN_STR(SerialPort)
532 CASE_RETURN_STR(LANAccessUsingPPP)
533 CASE_RETURN_STR(DialupNetworking)
534 CASE_RETURN_STR(IrMCSync)
535 CASE_RETURN_STR(OBEXObjectPush)
536 CASE_RETURN_STR(OBEXFileTransfer)
537 CASE_RETURN_STR(IrMCSyncCommand)
538 CASE_RETURN_STR(Headset)
539 CASE_RETURN_STR(CordlessTelephony)
540 CASE_RETURN_STR(AudioSource)
541 CASE_RETURN_STR(AudioSink)
542 CASE_RETURN_STR(AV_RemoteControlTarget)
543 CASE_RETURN_STR(AdvancedAudioDistribution)
544 CASE_RETURN_STR(AV_RemoteControl)
545 CASE_RETURN_STR(AV_RemoteControlController)
546 CASE_RETURN_STR(Intercom)
548 CASE_RETURN_STR(Headset_Audio_Gateway)
550 CASE_RETURN_STR(WAP_CLIENT)
551 CASE_RETURN_STR(PANU)
554 CASE_RETURN_STR(DirectPrinting)
555 CASE_RETURN_STR(ReferencePrinting)
556 CASE_RETURN_STR(Basic_Imaging_Profile)
557 CASE_RETURN_STR(ImagingResponder)
558 CASE_RETURN_STR(ImagingAutomaticArchive)
559 CASE_RETURN_STR(ImagingReferencedObjects)
560 CASE_RETURN_STR(Handsfree)
561 CASE_RETURN_STR(HandsfreeAudioGateway)
562 CASE_RETURN_STR(DirectPrintingReferenceObjectsService)
563 CASE_RETURN_STR(ReflectedUI)
564 CASE_RETURN_STR(BasicPrinting)
565 CASE_RETURN_STR(PrintingStatus)
566 CASE_RETURN_STR(HumanInterfaceDeviceService)
567 CASE_RETURN_STR(HardcopyCableReplacement)
568 CASE_RETURN_STR(HCR_Print)
569 CASE_RETURN_STR(HCR_Scan)
570 CASE_RETURN_STR(Common_ISDN_Access)
571 CASE_RETURN_STR(SIM_Access)
572 CASE_RETURN_STR(Phonebook_Access_PCE)
573 CASE_RETURN_STR(Phonebook_Access_PSE)
574 CASE_RETURN_STR(Phonebook_Access)
575 CASE_RETURN_STR(Headset_HS)
576 CASE_RETURN_STR(Message_Access_Server)
577 CASE_RETURN_STR(Message_Notification_Server)
578 CASE_RETURN_STR(Message_Access_Profile)
579 CASE_RETURN_STR(GNSS)
580 CASE_RETURN_STR(GNSS_Server)
581 CASE_RETURN_STR(ThreeD_Display)
582 CASE_RETURN_STR(ThreeD_Glasses)
583 CASE_RETURN_STR(ThreeD_Synchronization)
584 CASE_RETURN_STR(MPS_Profile)
585 CASE_RETURN_STR(MPS_SC)
586 CASE_RETURN_STR(CTN_Access_Service)
587 CASE_RETURN_STR(CTN_Notification_Service)
588 CASE_RETURN_STR(CTN_Profile)
589 CASE_RETURN_STR(PnPInformation)
590 CASE_RETURN_STR(GenericNetworking)
591 CASE_RETURN_STR(GenericFileTransfer)
592 CASE_RETURN_STR(GenericAudio)
593 CASE_RETURN_STR(GenericTelephony)
594 CASE_RETURN_STR(UPNP_Service)
595 CASE_RETURN_STR(UPNP_IP_Service)
596 CASE_RETURN_STR(ESDP_UPNP_IP_PAN)
597 CASE_RETURN_STR(ESDP_UPNP_IP_LAP)
598 CASE_RETURN_STR(ESDP_UPNP_L2CAP)
599 CASE_RETURN_STR(VideoSource)
600 CASE_RETURN_STR(VideoSink)
601 CASE_RETURN_STR(VideoDistribution)
603 CASE_RETURN_STR(HDP_Source)
604 CASE_RETURN_STR(HDP_Sink)
605 CASE_RETURN_STR(Generic_Access)
606 CASE_RETURN_STR(Generic_Attribute)
607 CASE_RETURN_STR(Immediate_Alert)
608 CASE_RETURN_STR(Link_Loss)
609 CASE_RETURN_STR(Tx_Power)
610 CASE_RETURN_STR(Current_Time)
611 CASE_RETURN_STR(Reference_Time_Update)
612 CASE_RETURN_STR(Next_Dst_Change)
613 CASE_RETURN_STR(Glucose)
614 CASE_RETURN_STR(Health_Thermometer)
615 CASE_RETURN_STR(Device_Information)
616 CASE_RETURN_STR(Heart_Rate)
617 CASE_RETURN_STR(Phone_Alert_Status)
618 CASE_RETURN_STR(Battery_Service)
619 CASE_RETURN_STR(Blood_Pressure)
620 CASE_RETURN_STR(Alert_Notification)
621 CASE_RETURN_STR(Human_Interface_Device)
622 CASE_RETURN_STR(Scan_Parameters)
623 CASE_RETURN_STR(Running_Speed_And_Cadence)
624 CASE_RETURN_STR(Automation_IO)
625 CASE_RETURN_STR(Cycling_Speed_And_Cadence)
626 CASE_RETURN_STR(Cycling_Power)
627 CASE_RETURN_STR(Location_And_Navigation)
628 CASE_RETURN_STR(Environmental_Sensing)
629 CASE_RETURN_STR(Body_Composition)
630 CASE_RETURN_STR(User_Data)
631 CASE_RETURN_STR(Weight_Scale)
632 CASE_RETURN_STR(Bond_Management)
633 CASE_RETURN_STR(Continuous_Glucose_Monitoring)
634 CASE_RETURN_STR(Internet_Protocol_Support)
635 CASE_RETURN_STR(Indoor_Positioning)
636 CASE_RETURN_STR(Pulse_Oximeter)
637 CASE_RETURN_STR(Http_Proxy)
638 CASE_RETURN_STR(Transport_Discovery)
639 CASE_RETURN_STR(Object_Transfer)
640 CASE_RETURN_STR(Gap_Device_Name)
641 CASE_RETURN_STR(Gap_Appearance)
642 CASE_RETURN_STR(Gap_Peripheral_Privacy_Flag)
643 CASE_RETURN_STR(Gap_Reconnection_Address)
644 CASE_RETURN_STR(Gap_Peripheral_Preferred_Connection_Parameters)
645 CASE_RETURN_STR(Gatt_Service_Changed)
646 CASE_RETURN_STR(Alert_Level)
647 CASE_RETURN_STR(Tx_Power_Level)
648 CASE_RETURN_STR(Date_Time)
649 CASE_RETURN_STR(Day_Of_Week)
650 CASE_RETURN_STR(Day_Date_Time)
651 CASE_RETURN_STR(Exact_Time_256)
652 CASE_RETURN_STR(Dst_Offset)
653 CASE_RETURN_STR(Time_Zone)
654 CASE_RETURN_STR(Local_Time_Information)
655 CASE_RETURN_STR(Time_With_Dst)
656 CASE_RETURN_STR(Time_Accuracy)
657 CASE_RETURN_STR(Time_Source)
658 CASE_RETURN_STR(Reference_Time_Information)
659 CASE_RETURN_STR(Time_Update_Control_Point)
660 CASE_RETURN_STR(Time_Update_State)
661 CASE_RETURN_STR(Glucose_Measurement)
662 CASE_RETURN_STR(Battery_Level)
663 CASE_RETURN_STR(Temperature_Measurement)
664 CASE_RETURN_STR(Temperature_Type)
665 CASE_RETURN_STR(Intermediate_Temperature)
666 CASE_RETURN_STR(Measurement_Interval)
667 CASE_RETURN_STR(Boot_Keyboard_Input_Report)
668 CASE_RETURN_STR(System_Id)
669 CASE_RETURN_STR(Model_Number_String)
670 CASE_RETURN_STR(Serial_Number_String)
671 CASE_RETURN_STR(Firmware_Revision_String)
672 CASE_RETURN_STR(Hardware_Revision_String)
673 CASE_RETURN_STR(Software_Revision_String)
674 CASE_RETURN_STR(Manufacturer_Name_String)
675 CASE_RETURN_STR(Regulatory_Certification_Data_List)
676 CASE_RETURN_STR(Current_Time_Charac)
677 CASE_RETURN_STR(Magnetic_Declination)
678 CASE_RETURN_STR(Scan_Refresh)
679 CASE_RETURN_STR(Boot_Keyboard_Output_Report)
680 CASE_RETURN_STR(Boot_Mouse_Input_Report)
681 CASE_RETURN_STR(Glucose_Measurement_Context)
682 CASE_RETURN_STR(Blood_Pressure_Measurement)
683 CASE_RETURN_STR(Intermediate_Cuff_Pressure)
684 CASE_RETURN_STR(Heart_Rate_Measurement)
685 CASE_RETURN_STR(Body_Sensor_Location)
686 CASE_RETURN_STR(Heart_Rate_Control_Point)
687 CASE_RETURN_STR(Alert_Status)
688 CASE_RETURN_STR(Ringer_Control_Point)
689 CASE_RETURN_STR(Ringer_Setting)
690 CASE_RETURN_STR(Alert_Category_Id_Bit_Mask)
691 CASE_RETURN_STR(Alert_Category_Id)
692 CASE_RETURN_STR(Alert_Notification_Control_Point)
693 CASE_RETURN_STR(Unread_Alert_Status)
694 CASE_RETURN_STR(New_Alert)
695 CASE_RETURN_STR(Supported_New_Alert_Category)
696 CASE_RETURN_STR(Supported_Unread_Alert_Category)
697 CASE_RETURN_STR(Blood_Pressure_Feature)
698 CASE_RETURN_STR(Hid_Information)
699 CASE_RETURN_STR(Report_Map)
700 CASE_RETURN_STR(Hid_Control_Point)
701 CASE_RETURN_STR(Report)
702 CASE_RETURN_STR(Protocol_Mode)
703 CASE_RETURN_STR(Scan_Interval_Window)
704 CASE_RETURN_STR(Pnp_Id)
705 CASE_RETURN_STR(Glucose_Feature)
706 CASE_RETURN_STR(Record_Access_Control_Point)
707 CASE_RETURN_STR(Rsc_Measurement)
708 CASE_RETURN_STR(Rsc_Feature)
709 CASE_RETURN_STR(Sc_Control_Point)
710 CASE_RETURN_STR(Digital)
711 CASE_RETURN_STR(Analog)
712 CASE_RETURN_STR(Aggregate)
713 CASE_RETURN_STR(Csc_Measurement)
714 CASE_RETURN_STR(Csc_Feature)
715 CASE_RETURN_STR(Sensor_Location)
716 CASE_RETURN_STR(Plx_Spot_Check_Measurement)
717 CASE_RETURN_STR(Plx_Continuous_Measurement)
718 CASE_RETURN_STR(Plx_Features)
719 CASE_RETURN_STR(Cycling_Power_Measurement)
720 CASE_RETURN_STR(Cycling_Power_Vector)
721 CASE_RETURN_STR(Cycling_Power_Feature)
722 CASE_RETURN_STR(Cycling_Power_Control_Point)
723 CASE_RETURN_STR(Location_And_Speed)
724 CASE_RETURN_STR(Navigation)
725 CASE_RETURN_STR(Position_Quality)
726 CASE_RETURN_STR(Ln_Feature)
727 CASE_RETURN_STR(Ln_Control_Point)
728 CASE_RETURN_STR(Elevation)
729 CASE_RETURN_STR(Pressure)
730 CASE_RETURN_STR(Temperature)
731 CASE_RETURN_STR(Humidity)
732 CASE_RETURN_STR(True_Wind_Speed)
733 CASE_RETURN_STR(True_Wind_Direction)
734 CASE_RETURN_STR(Apparent_Wind_Speed)
735 CASE_RETURN_STR(Apparent_Wind_Direction)
736 CASE_RETURN_STR(Gust_Factor)
737 CASE_RETURN_STR(Pollen_Concentration)
738 CASE_RETURN_STR(Uv_Index)
739 CASE_RETURN_STR(Irradiance)
740 CASE_RETURN_STR(Rainfall)
741 CASE_RETURN_STR(Wind_Chill)
742 CASE_RETURN_STR(Heat_Index)
743 CASE_RETURN_STR(Dew_Point)
744 CASE_RETURN_STR(Descriptor_Value_Changed)
745 CASE_RETURN_STR(Aerobic_Threshold)
747 CASE_RETURN_STR(Anaerobic_Heart_Rate_Lower_Limit)
748 CASE_RETURN_STR(Anaerobic_Heart_Rate_Upper_Limit)
749 CASE_RETURN_STR(Anaerobic_Threshold)
750 CASE_RETURN_STR(Aerobic_Heart_Rate_Upper_Limit)
751 CASE_RETURN_STR(Date_Of_Birth)
752 CASE_RETURN_STR(Date_Of_Threshold_Assessment)
753 CASE_RETURN_STR(Email_Address)
754 CASE_RETURN_STR(Fat_Burn_Heart_Rate_Lower_Limit)
755 CASE_RETURN_STR(Fat_Burn_Heart_Rate_Upper_Limit)
756 CASE_RETURN_STR(First_Name)
757 CASE_RETURN_STR(Five_Zone_Heart_Rate_Limits)
758 CASE_RETURN_STR(Gender)
759 CASE_RETURN_STR(Heart_Rate_Max)
760 CASE_RETURN_STR(Height)
761 CASE_RETURN_STR(Hip_Circumference)
762 CASE_RETURN_STR(Last_Name)
763 CASE_RETURN_STR(Maximum_Recommended_Heart_Rate)
764 CASE_RETURN_STR(Resting_Heart_Rate)
765 CASE_RETURN_STR(Sport_Type_For_Aerobic_And_Anaerobic_Thresholds)
766 CASE_RETURN_STR(Three_Zone_Heart_Rate_Limits)
767 CASE_RETURN_STR(Two_Zone_Heart_Rate_Limit)
768 CASE_RETURN_STR(Vo2_Max)
769 CASE_RETURN_STR(Waist_Circumference)
770 CASE_RETURN_STR(Weight)
771 CASE_RETURN_STR(Database_Change_Increment)
772 CASE_RETURN_STR(User_Index)
773 CASE_RETURN_STR(Body_Composition_Feature)
774 CASE_RETURN_STR(Body_Composition_Measurement)
775 CASE_RETURN_STR(Weight_Measurement)
776 CASE_RETURN_STR(Weight_Scale_Feature)
777 CASE_RETURN_STR(User_Control_Point)
778 CASE_RETURN_STR(Magnetic_Flux_Density_2D)
779 CASE_RETURN_STR(Magnetic_Flux_Density_3D)
780 CASE_RETURN_STR(Language)
781 CASE_RETURN_STR(Barometric_Pressure_Trend)
782 CASE_RETURN_STR(Bond_Management_Control_Point)
783 CASE_RETURN_STR(Bond_Management_Feature)
784 CASE_RETURN_STR(Gap_Central_Address_Resolution_Support)
785 CASE_RETURN_STR(Cgm_Measurement)
786 CASE_RETURN_STR(Cgm_Feature)
787 CASE_RETURN_STR(Cgm_Status)
788 CASE_RETURN_STR(Cgm_Session_Start_Time)
789 CASE_RETURN_STR(Cgm_Session_Run_Time)
790 CASE_RETURN_STR(Cgm_Specific_Ops_Control_Point)
791 CASE_RETURN_STR(Indoor_Positioning_Configuration)
792 CASE_RETURN_STR(Latitude)
793 CASE_RETURN_STR(Longitude)
794 CASE_RETURN_STR(Local_North_Coordinate)
795 CASE_RETURN_STR(Local_East_Coordinate)
796 CASE_RETURN_STR(Floor_Number)
797 CASE_RETURN_STR(Altitude)
798 CASE_RETURN_STR(Uncertainty)
799 CASE_RETURN_STR(Location_Name)
801 CASE_RETURN_STR(Http_Headers)
802 CASE_RETURN_STR(Http_Status_Code)
803 CASE_RETURN_STR(Http_Entity_Body)
804 CASE_RETURN_STR(Http_Control_Point)
805 CASE_RETURN_STR(Https_Security)
806 CASE_RETURN_STR(Tds_Control_Point)
807 CASE_RETURN_STR(Ots_Feature)
808 CASE_RETURN_STR(Object_Name)
809 CASE_RETURN_STR(Object_Type)
810 CASE_RETURN_STR(Object_Size)
811 CASE_RETURN_STR(Object_First_Created)
812 CASE_RETURN_STR(Object_Last_Modified)
813 CASE_RETURN_STR(Object_Id)
814 CASE_RETURN_STR(Object_Properties)
815 CASE_RETURN_STR(Object_Action_Control_Point)
816 CASE_RETURN_STR(Object_List_Control_Point)
817 CASE_RETURN_STR(Object_List_Filter)
818 CASE_RETURN_STR(Object_Changed)
819 CASE_RETURN_STR(Fitness_Machine_Control_Point)
820 CASE_RETURN_STR(Gatt_Characteristic_Extended_Properties)
821 CASE_RETURN_STR(Gatt_Characteristic_User_Description)
822 CASE_RETURN_STR(Gatt_Client_Characteristic_Configuration)
823 CASE_RETURN_STR(Gatt_Server_Characteristic_Configuration)
824 CASE_RETURN_STR(Gatt_Characteristic_Presentation_Format)
825 CASE_RETURN_STR(Gatt_Characteristic_Aggregate_Format)
826 CASE_RETURN_STR(Valid_Range)
827 CASE_RETURN_STR(External_Report_Reference)
828 CASE_RETURN_STR(Report_Reference)
829 CASE_RETURN_STR(Number_Of_Digitals)
830 CASE_RETURN_STR(Value_Trigger_Setting)
831 CASE_RETURN_STR(Es_Configuration)
832 CASE_RETURN_STR(Es_Measurement)
833 CASE_RETURN_STR(Es_Trigger_Setting)
834 CASE_RETURN_STR(Time_Trigger_Setting)
835 CASE_RETURN_STR(Gatt_Primary_Service_Declaration)
836 CASE_RETURN_STR(Gatt_Secondary_Service_Declaration)
837 CASE_RETURN_STR(Gatt_Include_Declaration)
838 CASE_RETURN_STR(Gatt_Characteristic_Declaration)