cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

D_Sd_3235936
New Contributor II

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
DheerajK_81
Moderator
Moderator

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
3 Replies
DheerajK_81
Moderator
Moderator

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
New Contributor II

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
DheerajK_81
Moderator
Moderator

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