Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Background BLE advertising not detectable by Android

When an iOS BLE peripheral enters the background state, the advertising packets are not emitted in the regular manner and they are placed in a special “overflow” area which is only detectable by another iOS device explicitly looking for this device.

The bluetooth-peripheral Background Execution Mode

That said, you should be aware that advertising while your app is in the background operates differently than when your app is in the foreground. In particular, when your app is advertising while in the background:

• The CBAdvertisementDataLocalNameKey advertisement key is ignored, and the local name of peripheral is not advertised.

• All service UUIDs contained in the value of the CBAdvertisementDataServiceUUIDsKey advertisement key are placed in a special “overflow” area; they can be discovered only by an iOS device that is explicitly scanning for them.

Is there any way an Android central (scanner) can detect any advertised custom UUID without having to connect to the iOS peripheral?

like image 540
Ahimsa Das Avatar asked Nov 14 '19 19:11

Ahimsa Das


Video Answer


1 Answers

With "overflow" area I guess they mean Scan Response Data. To get that data, a device must perform an active scan, rather than a passive scan. In an active scan, the scanner sends a scan request packet immediately after it detects an advertisement packet. The advertising device will only broadcast the scan response data if it detected a scan request.

Android devices only perform active scans, so you should be fine.

EDIT: the answer above is not correct. See http://www.davidgyoungtech.com/2020/05/07/hacking-the-overflow-area for correct information.

like image 63
Emil Avatar answered Oct 21 '22 13:10

Emil