Our device is not an iBeacon device. It is a BLE Beacon Device.
We are using CoreBluetooth in our application, we are expecting to see multiple advertisement packets which should contain manufacturing data of the device in background and locked mode. Currently we are getting manufacturing data in foreground.
We are receiving manufacturing data in background just for 2-3 seconds after putting it in background/Locked mode. Also in Background we are getting characteristics data for single device.
We are receiving characteristics data in background/locked mode which is not the data we are looking for, we need manufacturing data of the beacon device in background/Locked mode.
We have put an email with same query, where we have got below reply. Pls consider that too while providing a solution.
Please include the line below in follow-up emails for this request.
Case-ID: 9114422
The actual answer depends on exactly what you mean by "scan not working" and what actually is happening with the scans, but in general when an app is in the background and/or the device is locked, Bluetooth scanning becomes very limited.
If I understand your use case correctly, you are trying to read the manufacturer data from the advertising packets, which I presume is sending you some data that changes from packet to packet. This is not going to work unless your app is in the foreground.
While foreground apps can detect every advertising packet, once they stop being active, they will be sent only ONE advertisement packet/data per device per scan.
So, if you are trying to read changing data from advertisements, this will not work in the background. Your only option here is going to be to connect to the peripheral and have it write the changing data to a characteristic, from which your app will then read the data.
Topic:
App & System Services
SubTopic:
Core OS
Tags: