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

Program not pairing/bonding and pm_evt_handler never called

Using SDK13

I have a Central program and I included the peer manager code from ble_app_hrs_c but I am having issues after connecting to another dev kit with Peripheral code running on it. It seems that the pm_evt_handler function is never called (logs that I added aren't being printed), and so it never pairs/bonds. When running the ble_app_hrs_c and connecting to the Peripheral, it pairs/bonds automatically and pm_evt_handler is called fine. I looked through both ble_app_hrs_c and my code and I am trying to implement the differences but I ran into some issues when I added

// If there is any pending write to flash, defer scanning until it completes.
(void) fs_queued_op_count_get(&flash_busy);       ***in scan_start()***

fs_sys_event_handler(sys_evt);       ***in sys_evt_dispatch()***

and all of the whitelist code.

So my question is, why is my program never calling pm_evt_handler?

Here is my current "working" program: main.c

And here is my program after I have added in the remaining code from the ble_app_hrs_c, this is the one that regressed quite a lot: mainChanges.c

If there is any other information you need, please let me know. Thank you!

Parents Reply Children
No Data
Related