2 Replies Latest reply on Aug 10, 2017 12:30 PM by e.pratt_1639216

    Problem pairing with a Cypress PSoC project

    Bryce.Bingham_2473951

      Hi all,

         

      I took over a project using a Cypress Pioneer baseboard to run a series of sensors and communicate their output via BLE to a smartphone.

         

      Most everything is already working, that is the good news.
      Sensors work, grab data.
      Pioneer advertises, connects to the phone.
      Pioneer can send data to the phone, which displays it on its screen.

         

      What's missing is pairing.
      While the Pioneer connects, it does not pair and bond with the phone.
      I've examined my code and setup, and compared it to other sample projects which do pair/bond, but so far no joy.

         

      In my code, I log the events coming from the BLE component.
      The events look like this along with my interpretation:

         

      CYBLE_EVT_STACK_ON =>   // BLE component was started
      CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP =>  // GAPP Advertisement started/stopped (started in this case)
      CYBLE_EVT_GATT_CONNECT_IND =>   // GATT Connection indicated
      CYBLE_EVT_GAP_DEVICE_CONNECTED =>   // GAP Device Connection indicated
      CYBLE_EVT_GAP_AUTH_FAILED =>   // GAP Authorization Failed
      CYBLE_EVT_GAP_AUTH_REQ =>   // GAP Authorization Request
      CYBLE_EVT_GATT_DISCONNECT_IND =>   // GATT Disconnected
      CYBLE_EVT_GAP_DEVICE_DISCONNECTED =>   // GAP Device Disconnected 
      CYBLE_EVT_GAPP_ADVERTISEMENT_START_STOP =>  // GAPP Advertisement started/stopped (stopped in this case)

         

      NOTE: I suspect my Auth Request goes first, its just that the logger doesn't fire until the request is complete, i.e., it failed. So they show up in reverse order...

         

      I've attached screenshots of the BLE component setup from PSoC Creator. I'm guessing that I have not configured this properly, but I don't know what I'm missing. Note that it doesn't have Bonding Management which I believe it needs. This is the project 'as is'...

         

      Any help on this would be sorely appreciated.

         

      Regards,
      Bryce

        • 1. Re: Problem pairing with a Cypress PSoC project
          Bryce.Bingham_2473951

          Hey all,

             

          I found the issue. I had added the Bonding Management service to my BLE component but it did not work.

             

          I then reconfigured this and used the same Bonding Management values from an example program,  a glucose reader example with BLE component which pairs and bonds.

             

          Still did not work.

             

          I happened to double check my settings and noticed that in the BLE component setup for my project, the Bond Management profile settings had reverted to default. On the off-chance that this had happened and I programmed my device with the default values (instead of the glucose settings) I followed the process a 2nd time. This time the device paired and bonded correctly.

             

          So I have found that when making changes to the components in these Component Windows, the data is (at least some new data is) ephemeral, you can leave the page and the data is not saved, it reverts to default. Something to be aware of. But it works so I will take it!

             

          In any event, its up and running!
           

          • 2. Re: Problem pairing with a Cypress PSoC project
            e.pratt_1639216

            If you still want help with understanding bonding, I can give some example code that I use for bonding :)

               

            Otherwise, referring to the "ephemerality" of the component data, if you do Ctrl+Shift+S it will save all data, which from my experience includes the component settings.