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

whitelist_load

Hi,

I am creating an application based on ble_app_hrs_c (central role). I have a few questions on this.

o I do not understand whitelist_load(). It first gets a list of peers (from flash I assume) and then it seems to save them again (in flash I guess).

o What is the relation between pm_peer_id_t numbers and a call like pm_whitelist_get

o If I define a whitelist in the scan_start() routine, only peripherals in the list will be found, right?

o I want to save attribute handles (see ble_hrs_c.c) because when there is a peer list present at boot, the discovery phase will be skipped. Can you indicate how to do that? I think that the pm_peer_data_store() routine can be used for it, but when in ble_hrs_c.c, I do not have any idea what the peer_id is.

Thanks in advance

Parents
  • o I do not understand whitelist_load(). It first gets a list of peers (from flash I assume) and then it seems to save them again (in flash I guess).

    o What is the relation between pm_peer_id_t numbers and a call like pm_whitelist_get

    peer_list_get() gets a list all peer IDs in the Peer Manager, from flash.

    pm_whitelist_set() sets what peer IDs that should be in the whitelist.

    pm_device_identities_list_set() is in relation with sd_ble_gap_device_identities_set()

    If I define a whitelist in the scan_start() routine, only peripherals in the list will be found, right?

    You will only get advertisments from peripherals in the list yes.

    o I want to save attribute handles (see ble_hrs_c.c) because when there is a peer list present at boot, the discovery phase will be skipped. Can you indicate how to do that? I think that the pm_peer_data_store() routine can be used for it, but when in ble_hrs_c.c, I do not have any idea what the peer_id is.

    There is an older discussion on it here, but there the handles are not saved persistently, then I believe you need to change how the ble_hrs_c is implemented. If you want them to be stored persistently I think you should add a separate question for that, so this doesn't get too cluddered.

Reply
  • o I do not understand whitelist_load(). It first gets a list of peers (from flash I assume) and then it seems to save them again (in flash I guess).

    o What is the relation between pm_peer_id_t numbers and a call like pm_whitelist_get

    peer_list_get() gets a list all peer IDs in the Peer Manager, from flash.

    pm_whitelist_set() sets what peer IDs that should be in the whitelist.

    pm_device_identities_list_set() is in relation with sd_ble_gap_device_identities_set()

    If I define a whitelist in the scan_start() routine, only peripherals in the list will be found, right?

    You will only get advertisments from peripherals in the list yes.

    o I want to save attribute handles (see ble_hrs_c.c) because when there is a peer list present at boot, the discovery phase will be skipped. Can you indicate how to do that? I think that the pm_peer_data_store() routine can be used for it, but when in ble_hrs_c.c, I do not have any idea what the peer_id is.

    There is an older discussion on it here, but there the handles are not saved persistently, then I believe you need to change how the ble_hrs_c is implemented. If you want them to be stored persistently I think you should add a separate question for that, so this doesn't get too cluddered.

Children
No Data
Related