⚠️
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
Roie DAHAN
Offline
Last seen:9 months 2 weeks ago
加入:2018-11-19 16:32
GATT read data path

Hi,

I'm tring to hook "read" for GATT custom service (using ble_app_peripheral example)

it seems as read doesn't stop in breakpoint located in these functions.

  • gattc_read_req_ind_handler
  • gattc_att_info_req_ind_handler
  • custs1_att_info_rsp_handler

Please advise how to hook "read" data path

Thanks

Device:
PM_Dialog
Offline
Last seen:2 days 11 hours ago
Staff
加入:2018-02-08 11:03
Hi Roie DAHAN,

Hi Roie DAHAN,

In the SDK6.0.10, the custs1 profile doesn't send a message towards the application level in order to indicate that the characteristic is read by a central device. However, you can apply the RI option in the database definition in the user_custs1_def.c file. For example, please use the below code snippet 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 ADC characteristic.

Thanks, PM_Dialog