Hello Dialog,
Recently I started working with SDK 6.0.10, here I notice some issue.
In exampleble_app_peripheral,not getting data in read command whereas able to read data in notification command.
Thanks
Keywords:
Device:
Hi rajan22,
与我们的SKK高兴你开始工作6 and with DA14585 product, but can you please try to clarify your issue? It would be very helpful if you were able to provide more inputs about you issue.
Thanks, PM_Dialog
Hi,
Testing ble_app_peripheral example by using SDK 6.0.10.511 with DA14586.
Step 1. Debug the ble_app_peripheral program
Step 2. Connected to BLG-PRPH
Step 3. In Primary service DEF_SVC1_UUID_128 written 0x01 form characteristic DEF_SVC1_CTRL_POINT_UUID_128
Step 4. Reading data by notification command form characteristic DEF_SVC1_ADC_VAL_1_UUID_128 and getting counter data (dummy ADC data) successfully, as default with the program.
Step 5. Trying to read data by reading command form characteristic DEF_SVC1_ADC_VAL_1_UUID_128 but not getting data as aspected as getting data in SDK 6.0.4.
我们开始我们的新产品和新的SDK with version 6.0.10.511.
Why we unable to get data in reading command.
In our application, using read command to get sensor info and using notify command for reading sensor data. This is why we need to read and notification both commands.
Thanks
Some more details,
As per the application implemented
First, we need to enable from the control point then user_custs1_ctrl_wr_ind_handler will be called and it will start the timer and timer event app_adcval1_timer_cb_handler will keep sending data to the kernel whether we are reading data or not and continuing until disabled by the control point.
A similar question askedhereand I am sure they using 6.0.6 and above.
Hi rajan22,
The ADC 1 characteristic in the ble_app_peripheral example of SDK6.0.10 has both read and notify permissions enabled. Please check the custs1_att_db in user_custs1_def.c. When trying to read the characteristic form the peer device, what you are expecting to get? When having enabled the notification in the peer device, are you able to see the ADC 1 updating?
Thanks, PM_Dialog
Hi,
When having enabled the notification in the peer device, are you able to see the ADC 1 updating?Yes,I am able to get dummy ADC data (a counter value).
When trying to read the characteristic form the peer device, what you are expecting to get?I am expecting to get ongoing counter data whenreadingcommand.
Thanks
Hi rajan22,
Let me check it and i will get back to you.
Thanks, PM_Dialog
Hi rajan22,
The reason why you cannot read the ADC data is because when sending data over notifications, the CUST1_IDX_ADC_VAL_1_VAL is not updated in the data base. This is not a SKD bug! In order to update the data base, except from the CUSTS1_VAL_NTF_REQ, you should send a CUSTS1_VAL_SET_REQ as well in order to trigger the custs1_val_set_req_handler(). If you check the source code of this handler, you will find that the attmdb_att_set_value() is executed. Please try the below code snippet:
Thanks, PM_Dialog
Dear Dialog team,
when using struct custs1_val_set_req, the req_set->conidx parameter is not relevant? If it is, then how to set the value "for all connections" - using GAP_INVALID_CONIDX triggers hard fault.
Hi bojanpotocnik,
Thanks for your comment. Could you please raise a new forum ticket with your question as this one is old and closed? Additionally it would be very helpful if you could clarify your question.
Thanks, PM_Dialog