You are here

API result of CyBle_GapcConnectDevice() | Cypress Semiconductor

API result of CyBle_GapcConnectDevice()

Summary: 3 Replies, Latest post by abhishekbarve04_1611946 on 10 Jun 2016 07:33 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.


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?


mady's picture
Cypress Employee
964 posts


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,


-Madhu Sudhan


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



Thanks a lot !!..

Log in to post new comments.