Please help me understand how to communicate characteristic values using READ as opposed to NOTIFY. For example, in ble_app_peripheral the NOTIFY message starts a callback timer that makes the measurements and sends the results into the database. I cannot find where simple READs get handled. Please show me code where a characteristic value is accesed using a READ message.
Thank you.
Device:
Hi jwpearce,
Could you please clarify your question? If I am not mistaken, you would like trigger gattc_read_req_ind_handler() as soon as the characteristic is read by the Central device? Please correct me if I misunderstood your question.
If my assumption is correct, you can apply the RI option in the database definition in the user_custs1_def.c file. For instance, you could use the below configuration in order to activate this feature:
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
谢谢你,我知道这将是很容易一旦它佤邦s pointed out. I assume RI means "Read Immediate", correct?
As an aside, there are numerous abbreviations in the code that are obvious to the author but not necesssarily to us unwashed massses. A glossary of all the partial words used in the function names would go a long way to helping your customers (at least this one). Just for example, what does "rest" mean in "user_rest_hndl"?
Thanks!
Hi jwpearce,
RI stands for Read Indication. So, the applications indicated you once a readable characteristic is read by a peer device. Please take a look at the attm.gh header file.
Thanks, PM_Dialog