cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

Anonymous
Not applicable

Hello,

   

I am using PROC 4 BLE as a central device. I want to exchange data with a peripheral device which is advertising.

   

The API Cyble_gapcconnectdevice() is returning CYBLE_ERROR_OK. Thus api is successful.

   

But CYBLE_EVT_GATT_CONNECT_IND and CYBLE_EVT_GAP_DEVICE_CONNECTED events are not generated eventhough api is successful.

   

What may be the possible faults ?

   

Thanks.

4 Replies
Anonymous
Not applicable

Hi,

   

Are you able to connect the peripheral device with the Cypress BLE Dongle and CySmart App? This is just to ensure that the peripheral device is in a state to accept connection. Please try this.

   

Please check the handshake happening between the central and peripheral using a BLE Sniffer to see what exactly is happening if you have one. 

   

Regards,

   

- Madhu Sudhan

0 Likes
Reply
Anonymous
Not applicable

Hello,

   

Peripheral device is connecting using Cysmart app. 

   

Cyble_gapcconnectdevice() says scanning should be stopped before calling the function. I have stopped scanning using the cyble_gapcstopscan() fuction after gap peripheral is located. Then the CyBle_GapcConnectDevice is called. It works perfectly says the api result. 

   

Although scanning is stopped again the CYBLE_EVT_GAPC_SCAN_PROGRESS_RESULT generated which is result of gap peripheral discovery. Also getstate() function shows scanning stste despite of stopscan() function.

   

Also, no generation of CYBLE_EVT_GAP_DEVICE_CONNECTED event after the successful connectdevice call.

   

What may be the possible faults ?

   

Thanks.

0 Likes
Reply
Anonymous
Not applicable

Hi.

I encountered this problem too. I use the PSoC example name "Central and Peripheral" and call the function "CyBle_GapcConnectDevice" which return "CYBLE_ERROR_OK". But both "CYBLE_EVT_GATT_CONNECT_IND" and "CYBLE_EVT_GAP_DEVICE_CONNECTED" never show up but "CYBLE_EVT_TIMEOUT" does after 30 seconds.

I have already make sure that the device able to be connected use the Cypress dongle and the program "CySmart".

What may be the possible faults ?  THANKS

0 Likes
Reply
Employee

Make sure that you are selecting your peripheral device (executing 'z' command ) before sending the connection request (executing 'c' command).

-Gyan

0 Likes
Reply