3 posts / 0 new
Last post
awesley
Offline
Last seen:3 years 2 days ago
加入:2015-07-07 12:08
Database Description

HI, ALL

I do not know how to change the value of GATT Characteristic;
for example:
const struct attm_desc diss_att_db[DIS_IDX_NB] = {
// Device Information Service Declaration
[DIS_IDX_SVC] = {ATT_DECL_PRIMARY_SERVICE, PERM(RD, ENABLE), sizeof(diss_dis_svc),
sizeof (diss_dis_svc), (uint8_t *) &diss_dis_svc},

// Manufacturer Name Characteristic Declaration
[DIS_IDX_MANUFACTURER_NAME_CHAR] = {ATT_DECL_CHARACTERISTIC, PERM(RD, ENABLE), sizeof(diss_manufacturer_name_char),
sizeof(diss_manufacturer_name_char), (uint8_t *)&diss_manufacturer_name_char},
// Manufacturer Name Characteristic Value
[DIS_IDX_MANUFACTURER_NAME_VAL] = {ATT_CHAR_MANUF_NAME, PERM(RD, ENABLE), DIS_VAL_MAX_LEN, 0, NULL},

// Model Number String Characteristic Declaration
[DIS_IDX_MODEL_NB_STR_CHAR] = {ATT_DECL_CHARACTERISTIC, PERM(RD, ENABLE), sizeof(diss_model_nb_str_char),
sizeof(diss_model_nb_str_char), (uint8_t *)&diss_model_nb_str_char},
// Model Number String Characteristic Value
[DIS_IDX_MODEL_NB_STR_VAL] = {ATT_CHAR_MODEL_NB, PERM(RD, ENABLE), DIS_VAL_MAX_LEN, 0, NULL},
....
}
How to change the Manufacturer Name Characteristic Value ? ? I think the "NULL" pointer of "{ATT_CHAR_MANUF_NAME, PERM(RD, ENABLE), DIS_VAL_MAX_LEN, 0, NULL}" is a pointer
that point to the value array of Manufacturer Name Characteristic, however it is a empty pointer. Where is the actual value ??

Device:
kobyfr_mag
Offline
Last seen:5 years 1 month ago
加入:2015-06-02 12:48
In SDK5(!) demo peripheral

In SDK5(!) demo peripheral projects, see call to diss_create_db_cfm_handler().

Change these lines in your user_profiles_config.h:

/// Manufacturer Name (up to 18 chars)
#define APP_DIS_MANUFACTURER_NAME ("Dialog Semi")
#define APP_DIS_MANUFACTURER_NAME_LEN (11)

awesley
Offline
Last seen:3 years 2 days ago
加入:2015-07-07 12:08
Thank you.

Thank you.

Topic locked