2 Replies Latest reply on Oct 14, 2020 8:59 PM by MiAu_3808196

    Notify client of updated Gatt database

    MiAu_3808196

      I'm currently playing around with OTA functionality on one of our products.  I'm doing a bit of my testing using LightBlue, and I'm having issues with LightBlue not updating the services it can "see" when my peripheral changes from Bootloadable to Bootloader, or vice versa.

       

      The only way I can get LightBlue to show the correct services is to go into the Bluetooth settings on my smartphone and "forget" the connection with my peripheral.  I then have to go through a new pairing operation, and everything is ok again.

       

      I'm not 100% sure what's going on, but its like LightBlue either isn't receiving any notification to say the GATT database has changed, and to hence discover the applicable services, or I'm not telling LightBlue that it needs to do this.

       

      I followed the Fixed Stack OTA examples, and there doesn't appear to be anywhere in those code examples where they are explicitly telling the client that the database has changed.

       

      Can anyone help me out?

       

      Cheers,

      Mike

        • 1. Re: Notify client of updated Gatt database
          MiAu_3808196

          So I've done a bit more digging on this, and it seems its an issue associated with the Client caching the Attribute Handles.  This is made worse when you pair and bond (as you need to do with an OTA connection).

           

          From what I've read, the Bluetooth specification requires that, if the GATT based services can change in the lifetime of the device, then the Generic Attribute Service (UUID 0x1801) and the Service Changed characteristic (UUID 0x2A05) shall exist in the GATT database.  Strangely, I have both of these enabled in my GATT database, and yet its still not telling the Client to rediscover the Services when it goes from the Bootloadable code to the Bootloader code, or vice-versa.

           

          How does this get accomplished in the real world?  Is it that devices don't disable Services between Bootloader and Bootloadable modes?  Or is there someway to force a "Rediscover Services" on the Client side from the Server side even when the two are paired and bonded?

           

          Cheers,

          Mike

          • 2. Re: Notify client of updated Gatt database
            MiAu_3808196

            Its awfully quiet in here!  Would be great if someone with more experience in this stuff than I have could chime in with a bit of assistance.

             

            {cue sound of crickets}

             

            Cheers,

            Mike