I am trying to read Manufacturer Specific Data from a non-connectable advertisement packet from a pressure sensor.
I followed the example in https://devzone.nordicsemi.com/f/nordic-q-a/38475/how-can-i-get-manufacturer-specific-data-in-central-with-advertising-packet-sdk15-nrf52832
and used the HRS collector example from the SDK as a base. In my use case there is also a HRS to which the Central will connect to for which a Whitelist might be used.
I wondered why not to implement the decoding of the pressure sensor in the scan_evt_handler instead of the ble_evt_handler.
- What is exactly the difference between the ble_evt_handler and the scan_evt_handler? When does each one get called, are they both called for one packet? And where should I implement functions like the one decoding the Manufacturer Specific Data?
- The Code I will be using has a Whitelist on which "peers" like the HRS will be added with the function "pm_whitelist_get". But as I understood it, the pressure sensor is not a "peer" since its non-connected. Does this mean its packet will no longer be scanned for? Or does it just mean the scan_evt_handler gets called with the report in "scan_evt.params.p_not_found"? Or does only the ble_evt_handler get called?
Thank you very much for any help!