2 Replies Latest reply on Jan 28, 2018 1:34 AM by Gyan Chand

    Sorting Bonded Devices

    dturney_1462731

      I am developing a BLE Peripheral device.  This device can be bonded with 2 different centrals.  Say, for instance, I bond with a tablet as one device and a PC as the other.  When I power down the device, and pull it back up, if I read the stored bond infor, what would be a good way to flag one bond as the tablet, and one as the PC?  What are some stored bond data types that are unique enough I can compare to a "Device Type" struct saved to flash in order to flag the bonded device as a Tablet or a PC?

        • 1. Re: Sorting Bonded Devices
          e.pratt_1639216

          Wouldn't you just save metadata such as you describe with the bond information when you save it to flash?

          Otherwise, bond data in-and-of-itself is too generic to use as a logic comparison imo.

          • 2. Re: Sorting Bonded Devices
            Gyan Chand

            Hello David,

             

              Every Bonded device will be assigned a unique bdHandle.

             

            For Example: When first time your Peripheral device Connects and Bonds to the Tablet, The Tablet will be assigned a bdHandle (cyBle_connHandle.bdHandle=4  ) equal to 4 . Now when you Connects and Bonds to the PC , then the PC will be assigned a bdHandle=3.

             

            Now, When next time you  connects to a tablet ,as soon as you connect , You can check the 'bdHandle' if the bdHandle is 4 which means your connected device is tablet.

             

            -Gyan