Time between user_sps_client_data_tx_cfm_handler and actual TX?

⚠️
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
mark.bloechl
Offline
Last seen:1 year 5 months ago
加入:2015-12-09 16:33
Time between user_sps_client_data_tx_cfm_handler and actual TX?

I've got a project based off of the DSPS example, and on the central device I was wondering: what is the length of time between user_symble_client_data_tx_cfm_handler firing and the data actually being sent over the air? I've noticed that if I have a breakpoint in the handler (or if my code disconnects too soon after the handler fires) my message is not received by the peripheral. I'm OK putting a short delay after that handler, but I just need to know what I should set it to to ensure the message is sent.
Or is there some other indicator that actually indicates the data has been transmitted?

Device:
LT_Dialog(未验证)
Hi mark.bloechl,

Hi mark.bloechl,
Whenuser_sps_ble_client_data_tx_cfm_handleris called, it means the previous packet has been sent to the air. In the handler, next packet, if any, to be sent to the air is prepared and is then sent to the sps client task, considered as another thread, which actually passes packets to the BLE stack when scheduled. The BLE stack waits for next connection event and sends out the packet. Once sent,user_sps_ble_client_data_tx_cfm_handlergets called again. So on and so forth.

It's not easy to measure the exact time for the moment. If packet is not ready at the BLE stack before next connection event occurs, device will have to wait for the one after that. And that will add some more delay in between.

A break point placed in the handler stops the system from running anything, including the scheduler. The sps client task will not be scheduled either. And none of the aforementioned process will happen.