This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Peer Manager event dispacthing - NRF52832 SDK 15.0.0

Good morning everyone,

I am having a lot of problems configuring the Peer Manager. 

I read several discussions on the topic, but either they are old (referring to ble_evt_dispatch now removed) or they already start

from a point where I am still not.

Essentially, I want to limit the number of devices allowed to connect to 1, i.e. the first one which pairs with my device.

To do this, I want to use the Peer Manager.

Well, my problems already start here: I tried several examples (hids_keyboard, proximity.....). I also tried to check the configurations

following the tutorial on the Peer Manager usage, but all cases, the pm_evt_handler function

is never called. When debugging with the nrf development kit and segger studio, I only see the "Connect" event from the ble_evt_handler,

but the Peer Manager does not seem to get notified about the correct event.

So, my first and trivial question is: how to enable the Peer Manager to receive events?

Once I am able to have the function pm_evt_handler called, I think I can figure out the rest, but for the moment I am really stuck at this point and I hope

someone can help me figuring out what's wrong.

Thank you very much for the help!

Lorenzo

Parents
  • Hi, 

     

    How did you connect to the device from the Iphone ? Using which app ? 

    How did you trigger a bonding from the Iphone ? If you don't trigger a bonding, there won't be any peer manager activity. 

    When you test ble_app_hids_keyboard, what did you see ? That example basically does what you wanted to do, advertise with whitelist after the first phone bond to it. 

  • Hello,

    thanks for your reply. For the NRF52 I used the ble_app_template as a starting point, then I added more functionalities; the IOS app is an application I coded myself. As far as I know, I cannot trigger a bonding from the IPhone....this is managed by the IOs (again, this is my understanding). The question I have is why the bonding is not triggered, thus causing the peer manager callback to never be invoked

Reply
  • Hello,

    thanks for your reply. For the NRF52 I used the ble_app_template as a starting point, then I added more functionalities; the IOS app is an application I coded myself. As far as I know, I cannot trigger a bonding from the IPhone....this is managed by the IOs (again, this is my understanding). The question I have is why the bonding is not triggered, thus causing the peer manager callback to never be invoked

Children
Related