When gap role is Central,how to modify scan time ?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi,Guys

   

I have two questions:

   

 1、I want to modify scan time instead of scan timeout,but i can't find any api function or anywhere to implement it.Anyone can tell me?

   

 2、After the CyBle_GapcStartScan() function is called and BLE devices can be discovered,but I've been waiting for a long time did not enter the CYBLE_EVT_GATTC_DISCOVERY_COMPLETE event.Why?

0 Likes
2 Replies
Anonymous
Not applicable

One possible way is to make use of the API CyBle_GapcStartDiscovery with the updated scan parameters (referenced by CYBLE_GAPC_DISC_INFO_T* scanInfo). You can update the scanInfo structure with the new parameters. First stop scan, then update the parameters and then call CyBle_GapcStartDiscovery.

   

CYBLE_EVT_GATTC_DISCOVERY_COMPLETE is  generated when the remote device was successfully discovered. Can you check if it enters the even CYBLE_EVT_GATTC_ERROR_RSP?

0 Likes
Anonymous
Not applicable

Hi,BMAH

   

Thanks for your reply.Let me have a try.

0 Likes