Pairing fails in bootloader mode using BLE stack v3.66

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

cross mob
FrSt_4749731
Level 3
Level 3
10 replies posted 10 questions asked 10 sign-ins

Hello to all,

In our project we are using OTA upgradable and used BLE Stack v3.30. Because of security improvements we updated to the last valid BLE stack v3.66. Before we used the device in normal mode and tested with different mobiles (Android v5.1.1 with Bluetooth v4.0 and Android V10 and Bluetooth 5.0) and everything was working fine. Also when we went to the bootloader mode we could perform OTA FW upgrade.

But after we upgrade to the BLE Stack v3.66 we have problems with pairing when device is in bootloader mode. With the older phone everything is working fine, but with the new phone we cant connect (I tried using Android system settings to pair and also CySmart) To mention that I did not change any code, just update the components and rebuild everything. Also when the device is in normal mode both phones can connect to it without any problems.

As I can see from the BLE events we get CYBLE_EVT_GAP_DEVICE_CONNECTED and after that immediate CYBLE_EVT_GAP_AUTH_FAILED. The BLE component security under the GAP Settings was set to Mode 1, Authenticated pairing with encryption, using strict pairing and I/O capacity = Display. Bonding is enabled and the encryption key size is set to 16.

I also tested with Windows CySmart and got following error:

[17:17:19:629] : 'Command Complete' event received

[17:17:19:629] :  Status: BLE_STATUS_OK

Info: gpm.M1102: Pairing request received from peer device, 00:A0:50:00:00:00.

  CyDesigner.Common.Base.CyStsMsgDisp+CyDialogResult

[17:17:21:241] : 'Initiate Pairing' request sent

[17:17:21:244] : 'Command Status' event received

[17:17:21:244] :  Status: BLE_STATUS_OK

[17:17:21:253] : 'Authentication Error Notification' event received

[17:17:21:253] :  Status: AUTH_ERROR_AUTHENTICATION_REQ_NOT_MET

  Error: gpm.M1105: Authentication failed. Authentication requirements not met.

[17:17:24:094] : 'Convert octet to time' request sent

[17:17:24:094] :  Octet: 251

[17:17:24:095] : 'Command Status' event received

[17:17:24:095] :  Status: BLE_STATUS_OK

Has anyone a clue what is wrong?

I am going through the BLE V3.66 component datasheet to find any clues what are the changes regarding to the v3.30. A BLE connection flow diagram/state diagram with authentication and with BLE events would be really helpful.

Thanks for the support, Frenk

0 Likes
1 Solution
FrSt_4749731
Level 3
Level 3
10 replies posted 10 questions asked 10 sign-ins

I solved the mystery. Apparently after both peers are connected and an event CYBLE_EVT_GAP_DEVICE_CONNECTED is triggered you need to call the function

CyBle_GapAuthReq().

I am still reading the BLE v3.66 datasheet, but sadly could not find any description when this method should be used. Is there any other document describing the Bluetooth connection/pairing sequence/flowchart?

View solution in original post

3 Replies
FrSt_4749731
Level 3
Level 3
10 replies posted 10 questions asked 10 sign-ins

I solved the mystery. Apparently after both peers are connected and an event CYBLE_EVT_GAP_DEVICE_CONNECTED is triggered you need to call the function

CyBle_GapAuthReq().

I am still reading the BLE v3.66 datasheet, but sadly could not find any description when this method should be used. Is there any other document describing the Bluetooth connection/pairing sequence/flowchart?

Hello,

You can refer our example projects to implement your application. Please check the below projects to get a better understanding about BLE bonding and authentication.

  1. PSoC-4-BLE/100_Projects_in_100_Days/Day016_Authentication at master · cypresssemiconductorco/PSoC-4-...
  2. PSoC-4-BLE/100_Projects_in_100_Days/Day015_Bonding at master · cypresssemiconductorco/PSoC-4-BLE · G...

Thanks and Regards,

Sudheesh

Thanks for this Sudheesh,

As I mention I have already solved the problem, but nevertheless this examples can be really helpful.

Best regards, Frenk

0 Likes