Paring/Bonding problem with CySmart App on Android

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

cross mob
lock attach
Attachments are accessible only for community members.
GiMa_1521296
Level 1
Level 1

I want connect my BLE peripheral device with an Android app using pairing/bonding features.

   

As start point I used Day_015_Bonding example from Cypress 100_Projects_in_100_Days examples.

   

As Android App I used CySmart App running on my Asus NEXUS Tablet with Android 5.1 installed.
The connection is never done.

   

My tablet rejects the connection and It doesn't show me any PassKey Form to enable the connection and complete the pairing/bondin procedure.

   

I tried to use a different Android APP like nRF Master Control Panel and the connection doesn't work with this app too.

In the serial log console, connected with my CYBLE 0220001 device, no passkey is showed.
The paring/bonding procedure doesn't work.

   

This is the serial console output:

   

BLE_Bonding Device ON
Starting to advertise
Advertisement is enabled
Device  Connected
Starting Discovery
Discovery complete.
CYBLE_EVT_GAP_AUTH_FAILED: 18
Device Disconnected
Restarting Advertisement..
Advertisement is enabled

   

If I use CySmart Software V.1.1 running on my Windows 7 PC with cypress BLE dongle,
I can discover my BLE peripheral,
When i press connect button, CySmart software requires the PassKey.
My BLE peripheral generates the PassKey ( I can read Its on serial console ).
And the pairing/bonding connection works well.

   

Please help me, 
I need to connect my peripheral with an android app in secure mode using a paring PassKey.
 

0 Likes
1 Solution
Anonymous
Not applicable

Hi Giorgio! I have also looked through the bonding example project in the 100 project/day and been wondering if the code for handling the CYBLE_EVT_GAP_AUTH_REQ event is wrong. The API documentation says that CyBle_GappAuthReqReply should be called, but that example does not call it. (I have not tried to run the example on a device).

   

 

   

I see your code calls CyBle_GappAuthReqReply. You use the global variable cyBle_authInfo as argument. Could this variable's member authErr :: CYBLE_GAP_AUTH_FAILED_REASON_T be different from CYBLE_GAP_AUTH_ERROR_NONE ? Maybe CyBle_GappAuthReqReply should be called by a local variable created just for the call, or the one from casting the void* given to the event handler function. I don't know. It would be nice to clarify this 🙂

View solution in original post

0 Likes
6 Replies