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

Store Custom application data using peer manager

Hello,

I am working with nRF SDK V 16.0.0. I am using peer manager for my application, can I store my application data too using peer manager? if yes, please help to do so.

Regards,

Parth

Parents
  • I assume there are several ways this can be solved, but the idea is to store and load application specific data (for instance gap address) by using the peer manager api: pm_peer_data_app_data_load() and pm_peer_data_app_data_store().

    I have modified the \nRF5_SDK_15.2.0_9412b96\examples\ble_peripheral\ble_app_hids_keyboard example to show how you can use this api. I have also modified the example such that Button 2 and Button 3 control the gap address. That way you can press Button 2 or Button 3 to connect with another host. Button 1 will delete all bonds. Button 0 will go to sleep.

    Hope it can be useful.

    Best regards,
    Kenneth

    main.c

Reply
  • I assume there are several ways this can be solved, but the idea is to store and load application specific data (for instance gap address) by using the peer manager api: pm_peer_data_app_data_load() and pm_peer_data_app_data_store().

    I have modified the \nRF5_SDK_15.2.0_9412b96\examples\ble_peripheral\ble_app_hids_keyboard example to show how you can use this api. I have also modified the example such that Button 2 and Button 3 control the gap address. That way you can press Button 2 or Button 3 to connect with another host. Button 1 will delete all bonds. Button 0 will go to sleep.

    Hope it can be useful.

    Best regards,
    Kenneth

    main.c

Children
Related