Authentication failure during app upgrade in an Upgradable Stack project

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

cross mob
AnKu_3769716
Level 1
Level 1
First like given

Hello,

I've got a PSoC Creator workspace that follows the Upgradable BLE Stack structure and contains my app in place of the HID Keyboard example.

My app can be successfully programmed via CySmart when the BLE Stack is running.

However, if I try to upgrade my app with itself via CySmart when my app is running I always get an authentication failure.

Meanwhile, the HID Keyboard app always passes authentication under the same conditions.

All the BLE and Bootloadable component dependencies are set per the BLE Upgradable Stack documentation.

Also, my app's BLE component Security GAP Settings match those in the HID Keyboard BLE component:

Security mode: Mode 1

Security level: Unauthenticated pairing with encryption

Strict pairing: No

I/O capabilities: No Input No Output

Bonding requirement: Bonding

Encryption key size: 16

My app's main.c contains the following code (I'm using ARM GCC):

    #if !defined(__ARMCC_VERSION)

        InitializeBootloaderSRAM();

    #endif

    //…

    AfterImageUpdate();

    //…

    if(CyBle_GetState() == CYBLE_STATE_CONNECTED)

    {

        #if(CYBLE_BONDING_REQUIREMENT == CYBLE_BONDING_YES)

            CyBle_StoreBondingData(0u);

        #endif

    }

I tried modifying CySmart's Master Configuration security setting so that they correspond to BLE component ones but that didn't make any difference.

According to debug output, CCCD and bonding data are all 0's in both my app and HID Keyboard sample app.


Please, advise what I could be missing in terms of authentication.

0 Likes
1 Solution
GyanC_36
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Hello,

   Could you please let me know what do you mean by "However, if I try to upgrade my app with itself via CySmart when my app is running I always get an authentication failure."

To update the app , you need to give control to Stack project for receiving the new image in the upgradable stack bootloader architecture.

Could you please attach your workspace bundle here ( Right Click on the workspace name-> Archive workspace )

-Gyan

View solution in original post

2 Replies
GyanC_36
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Hello,

   Could you please let me know what do you mean by "However, if I try to upgrade my app with itself via CySmart when my app is running I always get an authentication failure."

To update the app , you need to give control to Stack project for receiving the new image in the upgradable stack bootloader architecture.

Could you please attach your workspace bundle here ( Right Click on the workspace name-> Archive workspace )

-Gyan

AnKu_3769716
Level 1
Level 1
First like given

Hi Gyan,

You're right, the Stack is responsible for receiving and flashing a new application image. My bad, I didn't realise it when I asked the question. The Stack authenticates perfectly well in this scenario.


Thank you,
Andrii

0 Likes