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

Adding peer manager to ble_app_uart

Hi,

I'm developing with 52840 DK, trying to add peer manager to another project I've modified from ble_app_uart (basically I've added saadc, SPI, USB and I2C module based on original example. Also this project was migrated from 52832 DK to 52840 DK and has been proven working).

As for peer manager example, I referred ble_app_bms from SDK16.

Here are the attempts I've done:

- Copying peer_manager_init(); and its evt_handler() from ble_app_bms. Copying and modifying erase_bonds and advertising_start().

- Adding source files from         ...\components\ble\peer_manager   to nRF_BLE group

- Adding        fds.c     fstorage.c        fstorage_sd.c   to nRF_Libraries group

- Including     fds.h   peer_manager.h   peer_manager_handler.h to main.c

- Enable fds, fstorage, peer_manager module in sdk_config

Now here is my situation,

I could compile the project without error and burned it into 52840DK.

Seems like I could erase existing bonds from flash.

I could connect without bonding(which is not what we want) and it works as usual, but when I manually bond it, connection failed and it shows "invalid pin or passkey, bonding failed" on nrf_connect.

And it LOG shows as follows when bonding failed.

I've been stuck by this problem for weeks. But it just works differently from sample projects.

Which part of it goes wrong.

Your help is appreciated, I could upload my project if necessary.

Parents Reply
  • Hello again,

    Avadacadabara said:
    Thanks for reply.
    Avadacadabara said:
    Thanks Karl and Einer.

    No problem at all, we are happy to help!

    Avadacadabara said:
    After several attempts, this issue fixed somehow...But I didn't change any part of the code.
    Avadacadabara said:
    I think I'll just let it be. But your advice is appreciated!

    I am glad to hear that it works as intended now, but it is strange that you the behavior changed without you making any changes to the code yourself.
    Could it be that your central tries to access a service that require bonding?

    Best regards,
    Karl

Children
No Data
Related