⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
2 posts / 0 new
Last post
rajan22
Offline
Last seen:1 year 5 months ago
加入:2017-12-29 05:09
处理读request

Hi,

How can we handle "read" request which is sent by BLE client?

Thanks

Device:
PM_Dialog
Offline
Last seen:17 hours 49 min ago
Staff
加入:2018-02-08 11:03
Hi rajan22,

Hi rajan22,

Τhe custs1 profile of the DA14585 SDK doesn't send a message towards the application level in order to indicate the read request, but if you apply the RI option in the database definition in the user_custs1_def.c file you could get the gattc_read_req_ind_handler() function executed. For example use the below line as a reference in order to activate this feature for the custom characteristics that you would like to get an indication when read:

// ADC Value 1 Characteristic Value
[SVC1_IDX_ADC_VAL_1_VAL] = {SVC1_ADC_VAL_1_UUID_128, ATT_UUID_128_LEN, PERM(RD, ENABLE) | PERM(NTF, ENABLE),
PERM(RI, ENABLE)|DEF_SVC1_ADC_VAL_1_CHAR_LEN, 0, NULL},

By doing that you will get the gattc_read_req_ind_handler() function to execute as soon as a central tries to read a specific characteristic. Please also check the implementation of the DISS profile which is using a similar option.

Thanks, PM_Dialog