2 Replies Latest reply on Sep 10, 2020 12:40 AM by LiSi_1648326

    How to share bonding info between upgradable stack and application

    LiSi_1648326

      Hi, I am using CY8C4248LQI-BL583 and Launcher - Stack - Application configuration.

      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?

       

      We can make workaround, to copy one bonding information to another, from Application to Stack project, but maybe there is a way to link them to one place using linker scripts?

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

          Hi,

           

          You need to try the following steps:

           

          1. By marking the section (EEPROM section where bonding data is stored) as NOLOAD in the linker script.

          2. Make sure both devices have the same number of devices configured in the bonding list.

           

          Can you please let us know the problem when you treat both Stack and Application as different devices?

           

          Thanks and regards

          Ganesh

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

            Hi! Thank you for your reply.

             

            Well the problem is that the MAC address is the same. If iOS has previously connected to Application, and now tries to connect to Stack to do OTA, will fail to connect, because the bonding information is not valid. In this case user has to manually go and delete the bonding from Bluetooth settings on the phone.

             

            From your explanation, as I understand NOLOAD should allow us to have the same variable on the same address without giving a linker error?

            But I think there is another question needs to be answered: which address to use for bonding, Application (at the 3rd last row of the flash) or the Stack (last row of Stack)?

            When I tried manually place any variable, even one uint32_t in the Stack project, just having it as a constant, I found that it impacts calculation of metadata end address. Then the Launcher always treats Stack as invalid application...