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

Device manager with bonds in RAM

I'm using SDK 6 + S110 v7.

Is it possible to use device manager to perform bonding but don't write bond information persistently in flash?

With old bond manager I could do this by removing ble_bondmngr_bonded_centrals_store() from BLE_GAP_EVT_DISCONNECTED event in on_ble_evt() so it won't store bonds in flash. So how can I do this with new SDK?

Parents
  • This should be possible.

    In for example ble_app_hrs_c. Can't you just remove device_context_store() in dm_ble_evt_handler(), under case BLE_GAP_EVT_DISCONNECTED: and case BLE_GAP_EVT_AUTH_STATUS:?

    Or is there something I have overlooked?

  • I can put in a request to improve this if you want me to.

    That would be great. I think it'll be convenient to add flag to dm_init_param_t structure that will be passed to dm_init() function like this:

    typedef struct
    {
        bool clear_persistent_data;      /**< Set to true in case the module should clear all persistent data. */
        bool no_persistent_data_in_nvm;  /**< Set to true in case the module shouldn't store persistent data in non-volatile memory. */
    } dm_init_param_t;
    

    And inside device manager skip all pstorage operations if no_persistent_data_in_nvm flag is set.

Reply
  • I can put in a request to improve this if you want me to.

    That would be great. I think it'll be convenient to add flag to dm_init_param_t structure that will be passed to dm_init() function like this:

    typedef struct
    {
        bool clear_persistent_data;      /**< Set to true in case the module should clear all persistent data. */
        bool no_persistent_data_in_nvm;  /**< Set to true in case the module shouldn't store persistent data in non-volatile memory. */
    } dm_init_param_t;
    

    And inside device manager skip all pstorage operations if no_persistent_data_in_nvm flag is set.

Children
No Data
Related