Adding serial number to DISS profile

4 posts / 0 new
Last post
marcodg
Offline
Last seen:2 years 7 months ago
加入:2015-01-14 17:58
Adding serial number to DISS profile

The app_diss_task.c functiondiss_create_db_cfm_handler()that comes with the SDK does not include code to set the serial number. So I figured I would add it because we need it. So, I added some boiler plate code along with the other snippets that look a lot like this one.

But my client code doesn't see a serial number, nor does it show up on BlueLoupe (although I don't know if it ignores the serial number). I should add that my message does get dispatched to the task and the DISS_SET_CHAR_VAL_REQ message does get executed without error.

There is clearly something I'm missing... perhaps some help from the gallery?

thanks,
marco


// Set the serial number in the DB. APP_DIS_SERIAL_NUMBER = "149-235"
{
len = strlen(APP_DIS_SERIAL_NUMBER);
struct diss_set_char_val_req *req_id = KE_MSG_ALLOC_DYN(DISS_SET_CHAR_VAL_REQ, TASK_DISS, TASK_APP, diss_set_char_val_req, len);
// Fill in the parameter structure
req_id->char_code = DIS_SERIAL_NB_STR_CHAR;
req_id->val_len = len;
memcpy(&req_id->val[0], APP_DIS_SERIAL_NUMBER, len);
// Send the message
ke_msg_send(req_id);
}

Keywords:
Device:
marcodg
Offline
Last seen:2 years 7 months ago
加入:2015-01-14 17:58
I see that there is an APP

I see that there is an APP_DIS_FEATURES that needs to be updated with with

| DIS_SERIAL_NB_STR_CHAR_SUP

but that didn't seem to help either.

marcodg
Offline
Last seen:2 years 7 months ago
加入:2015-01-14 17:58
Apparently, adding the flag

Apparently, adding the flag to APP_DIS_FEATURES did the trick as my own app is able to read the serial number. Apparently BlueLoupe doesn't display it... I had thought it would display all available information.

MT_dialog
Offline
Last seen:2 weeks 2 days ago
工作人员
加入:2015-06-08 34
Hi marcdog

Hi marcdog

Thanks for sharing.

Thanks MT_dialog