4 posts / 0 new
Last post
prasanth.velliy...
Offline
Last seen:1 year 10 months ago
加入:2016-02-18 12:18
app_easy_gap_disconnect

Hi Dialog

i am using DSPS_HOST with 2 DSPS_DEVICE's ,

DSPS_DEVICE_1发送一些静态数据使用r_send_ble_data("SPS_1", 4 , coindx) ,
DSPS_DEVICE_2 sending some static data user_send_ble_data("SPS_2", 4 , coindx) , so DSPS_HOST receives data from both DSPS_DEVICES , once data received from both devices , i want to disconnect from both DSPS_DEVICE's , so DSPS_DEVICE can enter into ext sleep(once dis connected and no data tx / rx event DSPS_DEVICE will enter into sleep ) , in DSPS_HOST project , where i have to put app_easy_gap_disconnect() to disconnect from DSPS_DEVICE's ??

Thank you

Device:
TR_Dialog
Offline
Last seen:2 months 3 weeks ago
Staff
加入:2014-06-30 23:52
Hi Prasanth:

Hi Prasanth:

One good place will be "user_sps_client_data_rx_ind_handler", which is the handler for "SPS_CLIENT_DATA_RX_IND".

You have to add logic to ensure data from both devices are are received before disconnecting.

TR_DIALOG

prasanth.velliy...
Offline
Last seen:1 year 10 months ago
加入:2016-02-18 12:18
Hi Dialog

Hi Dialog

As you suggested i have calling the app_easy_gap_disconnect in user_sps_client_data_rx_ind_handler , after DSPS_HOST receives data , and DSPS_DEVICE also disconnects and scanning is started again , but As per DSPS project , if DSPS_HOST disconnects from DSPS_DEVICE below fucntion should run , right ?? , but i am not seeing this function running , why ??

void user_on_disconnect( struct gapc_disconnect_ind const *param )

TR_Dialog
Offline
Last seen:2 months 3 weeks ago
Staff
加入:2014-06-30 23:52
Hi Prasanth:

Hi Prasanth:

I guess you are referring to DEVICE side?

Do you see user_on_disconnect, if you make the device disconnect in some other manner.

Also, you can set a breakpoint in gapc_disconnect_ind_handler.

Thanks,

TR_DIALOG