API result of CyBle_GapcConnectDevice()

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

cross mob
Anonymous
Not applicable

Hello,

   

I am developing application on PROC4 BLE as a central device. My side is client side.After passing address of peer device to which my device wants to connect to the Gapc_connectdevice function it gives api result :CYBLE_ERROR_INVALID_STATE which is explained as : On calling this API not in Disconnected state.

   

I have called Cyble_gapcstopscan() and  CyBle_GapDisconnect(cyBle_connHandle.bdHandle) before calling Gapc_connectdevice () function.

   

But it still shows "not in Disconnected state" result and hence CYBLE_EVT_GAP_DEVICE_CONNECTED is also not generating.What is exact meaning of this api result?

   

What are the possible faults?

   

Thanks. 

0 Likes
3 Replies
Anonymous
Not applicable

Hi,

   

When you call StopScan API, the CYBLE_EVT_GAPC_SCAN_START_STOP API should be triggered, Only after this event is triggered, you need to call the ConnectDevice API.

   

Also, you can use the CyBle_GetState API to see the state of the device then and there,

   

Regards,

   

-Madhu Sudhan

0 Likes
Anonymous
Not applicable

Hello,

   

What does the state CYBLE_STATE_STOPPED mean? Is it indicating  the scanning has stopped?

   

Thanks.

0 Likes
Anonymous
Not applicable

Thanks a lot !!..

0 Likes