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 Nexus phone with CySmart app,
I don't get screen to enter Passkey and I see "Bonding in progress.. Please wait" after a while the device disconnects with "Authentication process timeout".
Below is the terminal output:
Bluetooth Stack ON:
Set the I/O capabilities:
Updated the I/O capabilities:DISPLAY_ONLY
Started to advertise
CYBLE_EVT_GAP_AUTH_REQ from Master:
Unauthenticated and data signing
CYBLE_EVT_GAP_PASSKEY_DISPLAY_REQUEST. Passkey is: 1454889.
Please enter the passkey on peer device.
As far I understand the Passkey should be 6 digits but I see here as 7 digits(sometimes). Is this correct(attached is the uart log file)?
Also how do I use static passkey entry, I did see a post regarding this but could not find much information. Some example workspace would be greatly helpful.
Any inputs would be of great help and appreciate the same.
Solved! Go to Solution.
Below code is used to display the passkey in example project
printf("CYBLE_EVT_GAP_PASSKEY_DISPLAY_REQUEST. Passkey is: %d%d\r\n",
Using of macros to display high 16-bit and low 16-bit word seems to be incorrect. Better use " printf("CYBLE_EVT_GAP_PASSKEY_DISPLAY_REQUEST. Passkey is: %ld\r\n", *(uint32 *)eventParam);" instead.
This is also discussed in thread http://www.cypress.com/forum/proc-ble/bonding-consistency-issues.