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

cross mob
Anonymous
Not applicable

Hi. When I run the 100 Projects in 100 days example "#16 Authentication", http://www.cypress.com/blog/100-projects-100-days/project-016-authentication I have problems bonding and reconnecting on my Samsung S5 Neo (I am using this example code to debug my own application). Here are the steps necessary to reproduce the problem on a CY8CKIT-042-BLE kit:

   

1. Set TopDesign.cysch/BLE_1/GAP Settings/Security/Bonding Requirement to "Bonding".

   

2. In main.c, under case CYBLE_EVT_GAP_DEVICE_DISCONNECTED, before "break", add: "CyBle_GappStartAdvertisement(CYBLE_ADVERTISING_FAST);" so that after disconnection it is possible for the Central to reconnect.

   

3. With either "CySmart" or "nRF Master Control Panel" for Android, try to connect+bond, disconnect, reconnect, disconnect. Here is what happens for me (before each of the following IO Capability tests, I make sure that no pairing information is stored on the phone from a previous test):

   

With nRF Master Control Panel:
------------------------------

   

0(Display):
Bond, disconnect, connect, disconnect works perfectly. Passkey needed only once.

   

1(Display Yes/No):
Bond, disconnect, connect, disconnect works perfectly. Passkey needed only once.

   

2(Keyboard):
Bond, disconnect, connect, disconnect works perfectly. Passkey needed only once.

   

3(No Input No Output):
Bond OK. Disconnect OK. Reconnect: Bonding:yes displayed on Cypress, but phone displays "Bonding" and after a while displays "Not Bonded". At this point, Cypress displays "CYBLE_EVT_GAP_AUTH_FAILED: 18". A closer look in Android Bluetooth settings shows that pairing info is not stored on phone, so the bonding has effectively failed.

   

4(Keyboard & Display):
Bond, disconnect, connect, disconnect works perfectly. Passkey needed only once.

   

With CySmart:
-------------

   

0(Display):
Bond, disconnect, connect, disconnect works perfectly. Passkey needed only once. However, "No services found" appears in CySmart on first connection, but not on subsequent connections.

   

1(Display Yes/No):
Bond, disconnect, connect, disconnect works perfectly. Passkey needed only once. However, "No services found" appears in CySmart on first connection, but not on subsequent connections.

   

2(Keyboard):
"Bonding is in process. Please wait." appears on Android device. Must kill CySmart. Pairing data is stored on phone, however. A subsequent connection sometimes succeeds, but sometimes fails to discover services.

   

3(No Input No Output):
Bond OK. Disconnect OK. Reconnect: Bonding:yes displayed on Cypress, but phone displays "bonding is in process" and after a while displays "Unable to pair. Check whether the device is advertising and supports pairing". At this point, Cypress displays "CYBLE_EVT_GAP_AUTH_FAILED: 18". A closer look in Android Bluetooth settings shows that pairing info is not stored on phone, so the bonding has effectively failed.

   

4(Keyboard & Display):
Bonding is in process. Please wait. Must kill CySmart. Pairing data is stored on phone, however. A subsequent connection sometimes succeeds, but sometimes fails to discover services.

   

With nRF Master Control Panel, authentication works almost perfectly, except for the No Input / No Output case. This leads me to believe that CySmart for Android lacks robustness for several cases, but it also seems that the PSoC BLE stack has trouble with No Input/No Output (which is unfortunately the case which I need for my application). Does anybody have PSoC example code that is reliable for No Input/No Output pairing and reconnection?

   

Thanks...

0 Likes
1 Solution
Anonymous
Not applicable

Hi ,

   

First of all after changing the setting to bonding in BLE component, are you storing the bonding information? This should be done explicitly in the code. It doesn't do on its own.

   

 

   

Also which version of PSOC creator and Cysmart are you using?

   

 

   

Regards,
Vikas.

View solution in original post

0 Likes
4 Replies