5 Replies Latest reply on Oct 7, 2020 8:25 PM by MiAu_3808196

    OTA Bootloader Bonding Problem

      Hi All,

         

      We are using the fixed stack OTA bootloader with our application. The BLE Security configuration is Mode 1, Unauthenticated pairing with encryption, No Input No Output, Bonding, and Encryption key size 16 bytes.

         

      For the most part, it is working. My test runs like this:

         

      1. Remove any cached references to our product from the iOS device Bluetooth configuration ("Forget")

         

      2. Load combined bootloader/bootloadable onto the BLE module

         

      3. Launch our custom iOS app, confirm we are prompted to pair, agree to pair

         

      4. Confirm communication is successful even after killing the app and restarting after several minutes. So Bonding (i.e. persistence of keys) was successful.

         

      5. Trigger Bootloader (I happen to use a command in a characteristic value to do this as there are no physical buttons)

         

      6. Open CySmart mobile app on the iOS device - Now at this point, it will time out on connect unless I go out to Bluetooth settings and "Forget" the device. Then I am prompted to pair, and am able to do OTA firmware update.

         

      7. Once OTA firmware update is complete, the device begins advertising, but again I am unable to connect to it with CySmart or our own custom iOS app until I "Forget" the device in iOS Bluetooth settings. Once I do that, I am prompted to pair, and it reconnects as expected each time.

         

      Is this normal behavior for having bonding enabled for the fixed stack OTA bootloader, to need to remove the bond when transitioning into and out of bootloader? If so, I'm not sure how we can make a workable user experience. Has anyone else run into this?

         

      Thanks!

        • 1. Re: OTA Bootloader Bonding Problem

          According to the documentation:

             
              

          Fixed Stack OTA Bootloader

              

          In case of Fixed Stack OTA Bootloader, the bonding information is allocated in the scope of the bootloader project. Therefore, even after the bootloadable project is upgraded, bonding information is intact and will be erased only if the device is reprogrammed using a SWD programmer. 

             
             

          So, if we bonded while running the bootloadable, connection should be allowed when shifting into bootloader. And likewise, if a connection is made while running bootloader, the bonding keys should still be good after firmware upgrade is complete and the system runs the bootloadable. But I am not finding this to be the case. Even running the CySmart app, once I "Forget" the device so I can pair with it to do the OTA upgrade, I am unable to reconnect with the device until I first "Forget" again. 

          • 2. Re: OTA Bootloader Bonding Problem

            Has this problem be solved? I'm facing the same issue.Hope Cypress can help us to fix this.

            • 3. Re: OTA Bootloader Bonding Problem

              I resolved the original issue by fixing the way I was saving the bonding keys. But now that I have updated from BLE component 2.30 to 3.10, it has resurfaced. But I can tell you the 'fix' is to be sure you are saving the bonding keys.

              • 4. Re: OTA Bootloader Bonding Problem

                My application do not need bonding, So is it possible that bond in bootloader, but do not bond in bootloadable project.

                • 5. Re: OTA Bootloader Bonding Problem
                  MiAu_3808196

                  Hi, when you say the fix is to make sure you are saving the bonding keys, are you doing this in the Bootloader code?  Or the Bootloadable code?

                   

                  In our setup, I'm saving the bonding info in the Bootloadable code, but not in the Bootloader code.