Background BLE Scanning with Navigation Mode - Technical Feasibility for Safety Monitoring App

First of all, my English skills are not good, so I wrote an AI program and sent it to complete the questions. sorry.

I'm developing a safety monitoring application that requires continuous BLE scanning for temperature and humidity sensors. I need clarification on the technical feasibility of background and sleep mode operation.

Key Requirements:

  • Continuous monitoring of BLE advertisements from temperature/humidity sensors
  • Must detect critical temperature/humidity changes immediately
  • Data logging every minute
  • Includes navigation features showing routes

Technical Questions:

  1. Background Mode Operation
  • If using background modes (bluetooth-central + location):
    • Can we receive BLE advertisements reliably?
    • What is the actual scanning interval limitation?
    • Will CBCentralManagerScanOptionAllowDuplicatesKey limitation affect critical monitoring?
  1. Sleep Mode Operation
  • Can the app maintain BLE scanning during device sleep?
  • Would combining with navigation background mode help?
  • Are there any recommended approaches for continuous monitoring?

Sample Code of Current Approach:

let options: [String: Any] = [
    CBCentralManagerOptionShowPowerAlertKey: true,
    CBCentralManagerOptionRestoreIdentifierKey: "uniqueIdentifier"
]
centralManager = CBCentralManager(delegate: self, queue: nil, options: options)

// Scanning setup
centralManager.scanForPeripherals(
    withServices: [serviceUUID],
    options: [CBCentralManagerScanOptionAllowDuplicatesKey: true]
)

Has anyone successfully implemented continuous BLE monitoring in background/sleep modes? Are there any special entitlements or techniques that could help achieve this?
This is for a safety-critical application where missing sensor data could lead to serious issues.
Any guidance would be greatly appreciated.



The simple answer is, no - you cannot scan for changes in the advertising payload if your app is not in the foreground.

When the app is not in the foreground the CBCentralManagerScanOptionAllowDuplicatesKey will be ignored and your app will receive only a single didDiscover() callback per peripheral per scan.

Neither using navigation, or other tricks will change this. In order to receive multiple advertisements from a device, your app must be in the foreground with the screen on.

This becomes more difficult by the fact that when the device screen is off, it will stop sending SCAN_REQ for which the peripheral would respond with SCAN_RSP, which is usually the packet where these extraneous payloads are transmitted in.

So, even if you were to find a way to get multiple advertising packets when in the background, the data contained in the secondary advertising packets would not be read.

The only remaining viable solution is for the peripheral to start advertising when there is a change in the data, and the app to connect to it when discovered and read the necessary data from the peripheral.


Argun Tekant /  DTS Engineer / Core Technologies

Background BLE Scanning with Navigation Mode - Technical Feasibility for Safety Monitoring App
 
 
Q