1 Reply Latest reply on Sep 27, 2020 10:06 PM by GaneshD_41

    How to share bonding info between upgradable stack and application


      Hi, I am using CYBLE-416045-02.

      Currently having an issues providing OTA functionality to iOS app, because, after bonding to application, when it jumps to stack and tries to connect, it complains about "Peer removed pairing information".

      It happens that iOS tries to pair, but since the Stack and Application has its own checksum exclude areas, they have its own bonding information, so the pairing with stack fails, because bonding information stayed with application, moreover both of them have the same MAC address, and this is what smartphone does not like.


      Question - is there an easy way to share bonding keys between the two?

        • 1. Re: How to share bonding info between upgradable stack and application



          First of all, we would like to say that since the PSoC 4 BLE has low memory the upgradable stack OTA (upgrading both profile as well as stack) is possible only if the entire BLE image is divided into two parts i.e. application and stack.


          As per upgradable stack OTA architecture, stack upgrade is performed in three steps;


          Stage 1: The firmware passes control to the Stack Application, which receives the new Stack Application image and writes it to a temporary location (User Application region) in the flash memory. The User Application becomes corrupted in this process (the new Stack Application image overwrites the existing User Application image).


          Stage 2: After the download is complete, a software reset is initiated by the Stack Application, and the control passes to the Launcher image. It detects the image located in the temporary location (User Application region) and copies it to the Stack Application region.


          Later Application Upgrade is required as we corrupted application image.


          Stage 3: Application Upgrade: Only the User Application image is upgraded. To enter the OTA upgrade mode, the firmware passes the control to the Stack Application, which

          receives the new User Application image. The Stack Application then directly writes the new User Application image to the corresponding region of the flash.


          So answering to your question, as per the implementation of the project, both the BLE components use two different bonding data and parameters. This provides the flexibility to provide user to treat application and stack as different having known that application may change at any time. FYI, you can check OTA using Fixed stack code example where there is a single BLE component that is shared between the Application project and the Bootloader project.


          Can you please tell us the problem you are facing when you use two different addresses for Stack project and the application project?