How long does Cypress BLE DLL Pair function take?

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

cross mob
D_Sd_3235936
Level 4
Level 4
25 sign-ins 50 questions asked 25 replies posted

I am trying to connect to a PSOC4 BLE device via PC using Cypress DLL. 

When I try to pair to the device, the DLL function (result.Device.Pair) returns a "fake"  success,  because the device does not show  that pairing did succeed at that moment.

Questions:

1. Is there a way to know if pairing truly succeeded? Checking device side  is not an option.

2. If not, how long does "result.Device.Pair(cyPairSettings)" take?

3. This is another issue, why does sometimes GattMtuExchanged (..) does not occur? 
(after running :Peripheral_.GattClient.ExchangeMtu(cyGattExchangeMtuInfo);)

 

Thanks!

 

0 Likes
1 Solution

Hello @D_Sd_3235936 ,

If you see issues with CySmart app, this means that you might be having some problems on the device firmware side. Please consider attaching the project along with relevant steps to reproduce the issue. 

On the host side application, you can check if the pairing is successful or not using the CyBleDeviceCallback.OnPairingCompleted callback. 

To understand how you can implement the callback functions, please refer to this thread. Although it shows the callback for a successful MTU Negotiation, the process is similar for the pairing callback as well.

Regards,
Dheeraj

View solution in original post

0 Likes
4 Replies
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

Hello @D_Sd_3235936 ,

Before you test your device with your custom application, can you please use CySmart PC Tool to make sure everything works on the device side? 

Please refer to this thread for API implemenation details.

Regards,
Dheeraj

0 Likes
D_Sd_3235936
Level 4
Level 4
25 sign-ins 50 questions asked 25 replies posted

Thanks,

Had some connection issues with the CySmart App as well. Currently looking into it.

On a more technical level,  regarding result.Device.Pair - can you please tell me if the pairing function in the CY DLL invokes some sort of ISR on success?

Or can I do some polling on a variable to make sure pairing was a success?

We cannot rely on the return statement of the paring function to continue,  as it seems to be unreliable.

0 Likes

Hello @D_Sd_3235936 ,

If you see issues with CySmart app, this means that you might be having some problems on the device firmware side. Please consider attaching the project along with relevant steps to reproduce the issue. 

On the host side application, you can check if the pairing is successful or not using the CyBleDeviceCallback.OnPairingCompleted callback. 

To understand how you can implement the callback functions, please refer to this thread. Although it shows the callback for a successful MTU Negotiation, the process is similar for the pairing callback as well.

Regards,
Dheeraj

0 Likes
D_Sd_3235936
Level 4
Level 4
25 sign-ins 50 questions asked 25 replies posted

Found the reason for that, too many BLE devices were active in the room.

Used a Faraday cage and it has solved the issue.

0 Likes