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

A peripheral that scans for nonconnectable advertisements to get data

I thought this would be rather simple as I would design a BLE peripheral in the usual way but the source of data for the peripheral comes from a sensor sending nonconnectable advertisements.

The logical approach seemed to be 

  • start advertising
  • wait for a connection event and then start a scanner
  • in the received advertisement callback, place the packet in a queue
  • read the queue and convert the data to the appropriate measurement characteristic expected by the central I am connected with
  • notify the data

However, when looking at the sd_ble_gap_scan_start documentation for s140 it is unclear to me what it can do. I have the following questions/uncertainties:

  1. The method seems strongly coupled to the sd_ble_gap_connect method which I have no intention to use. What are the consequences of that?
  2. I cannot use addresses as filters or whitelists but I could have used manufacturer data if such a filter existed. So I assume there is no hardware filtering on this scanner and I will need to do it myself in the advertisement callback - if there is a more efficient means of filtering out unwanted advertisements that would be nice (like non-connectable only)
  3. I am not even sure the method will pass up non-connectable advertisements - there is no mention of them in the documentation.
  4. Will the fact I have configured SoftDevice as a peripheral make it impossible to scan in the first place? How can I be both an Observer and a peripheral? (Note observer here is not the 'observer' mentioned in the Nordic SDK - I don't know what those observers are. Observer here is the BTLE watcher of broadcasts.)
  5. What kind of conflict will arise by scanning at the same time as being connected - can I run the scanner at 'full throttle'?

Thanks

Parents Reply Children
No Data
Related