This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

how to add user description to characteristic

Hi

I am implementing my custom service, and started from the led/button example. I am using the LightBlue app on my iphone to connect to my device under test. I can see the characteristics for the LED and button, but would like to add some kind of human readable description string as the label of a characteristic. I though I could do this by replacing the char_md.pa_char_user_desc = NULL by a pointer to a static string in the adding of the LED characteristic, but no luck:

...

//char_md.p_char_user_desc  = NULL;

static char user_desc[] = "LED";
char_md.p_char_user_desc  = (uint8_t *) user_desc;
char_md.char_user_desc_size = strlen(user_desc);
char_md.char_user_desc_max_size = strlen(user_desc);	

...

Any ideas? Do I need to assign something to char_md.p_user_desc_md? And how can I add a characteristic descriptor in general?

Parents
  • Hi Hung Bui,

    In fact, the Lightblue app did not update the device profile after I uploaded my new code. When I removed my device and stopped the app, and then started again, the characteristic was showing with the user description So problem solved!

Reply
  • Hi Hung Bui,

    In fact, the Lightblue app did not update the device profile after I uploaded my new code. When I removed my device and stopped the app, and then started again, the characteristic was showing with the user description So problem solved!

Children
No Data
Related