cancel
Showing results for 
Search instead for 
Did you mean: 

Resource Library

User Defined String for CHAR_DESCRIPTOR_UUID16

JaeyoungY_71
Employee

User Defined String for CHAR_DESCRIPTOR_UUID16

To write a user defined string for CHAR_DESCRIPTOR_UUID16, you need to do the following.

1. Add a char description and make the permission readable in wiced_bt_gatt_db.c

CHAR_DESCRIPTOR_UUID16(USER_DESCRIPTOR, GATT_UUID_CHAR_DESCRIPTION, LEGATTDB_PERM_READABLE ),

2. Add USER_DESCRIPTOR in enum in wiced_bt_gatt_db.h

3. In ble_proximity_reporter.c, define a global user_defined_str

static char user_defined_str[] = "Temperature in the room";

4. Add the following switch clause to ble_proximity_gatt_read_request() in ble_proximity_reporter.c

   case USER_DESCRIPTOR:

       p_attribute_value_source = user_defined_str;

       attribute_value_length = sizeof( user_defined_str );

       break;

5. In your LightBlue you should now see the string attached to the characteristic

  IMG_0844.jpg

Version history
Revision #:
1 of 1
Last update:
‎Jun 06, 2016 03:19 PM
Updated by:
 
Contributors