My project is modified from DSPS host.I have meet some question ,hope to get your help
when master connected to my slave,it must send command to slave,then slave send data to master.
问1:I know when after connected,master should send a write request to slave,I want to ask how to do it,and which is best
postion to execute the function .
问2.where is gattc_cmp_evt_handler called?
问3.in the function gattc_cmp_evt_handler ,param->status = ATT_ERR_ATTRIBUTE_NOT_FOUND?does it correct?
if not how can change it?
问4: in sps_client_task.c
line 266, status = prf_check_svc_char_validity_128(SPS_CHAR_MAX,spsc_env->sps.chars,spsc_sps_char)
status = PRF_ERR_STOP_DISC_WRONG_CHAR_PROP
how to slove this
My question is a little strange,but I hope you can give me a help ,thank you very much
Hi RandyYu,
问1: You can try performing the write request right after the master accepts the updating parameters of the slave in the gapc_param_update_req_ind_handler() where the confirmation message is sent from the masters side, also you can try to do this via a kernel timer, just trigger a timer after the connected callback in order to give some time to the devices to complete the service discovery, exchange MTU and execute the parameter update and when the kernel timer elapses you can trigger the write request.
问2: The gattc_cmp_evt_handler() callback is executed in all GATT related events to indicate the completetion of the event and initiate the next procedure.
问3: The attribute not found isn't necessary a wrong indication but part of the discovery procedure, after the host discovered the first service and there aren't any services to report the device will reply that there are no related attributes to that request.
问4: The function that you mention checks if the characteristics of the service that was just discovered are the one that should be and have the specific properties that are declared in the array spsc_sps_char.
Thanks MT_dialog
could you tell me that how do I solve Q4?
Hi Chenpenglai,
Do you speak Chinese?
For better local support, pls move you questions to CN forum then we can talk in Chinese:
https://support.dialog-semiconductor.com/forums/dialog-smartbond-bluetooth-low-energy-–-software-dialog-“smartbond”系列低功耗蓝牙—软件
Br
CYibin
Yes I can