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

Scan response data and Advertising data, making difference on HRM iOS App

Having too much fun with iOS Apps :-D

I am using heart rate example from SDK11. Firmware example and HRM in nRF Toolbox worked well.

Then I moved

advdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
advdata.uuids_complete.p_uuids  = m_adv_uuids;

To

 scanrsp.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
 scanrsp.uuids_complete.p_uuids  = m_adv_uuids;

And changed parameters in ble_advertising_init accordingly.

Now HRM in nRF Toolbox cannot find the device.

PC Master Control Panel is showing UUID list got moved into Scan Response Data.

I thought this is interesting for somebody trying to understand advertising data and scan response data.

If you want the Central to find the Peripherals, information has to be enough in the advertising data for the Central to know "you are there". Scan Response Data will only be provided by the peripherals when the Central is going to accept "you" and want more information.

Please also let me know that I didn't get this right in my mind. LoL

Parents
  • Actually I don't think the app can decide if iOS should do active scanning or not. My understanding is that this is handled by coreBluetooth, but that iOS will in general do active scanning when the app is in the foreground, while it switches to passive scanning in background mode. I would also expect it to switch to passive scanning if scanning for a long time in foreground mode as well, but I don't know if this is the case.

Reply
  • Actually I don't think the app can decide if iOS should do active scanning or not. My understanding is that this is handled by coreBluetooth, but that iOS will in general do active scanning when the app is in the foreground, while it switches to passive scanning in background mode. I would also expect it to switch to passive scanning if scanning for a long time in foreground mode as well, but I don't know if this is the case.

Children
No Data
Related