iphone Advertisement parameters

Hi!


I'm working on a device that uses BLE to communicate with the iPhone. Right now, the device advertises for a while (~30s) and if no connection is made, it stops advertising to save battery. In order to establish a connection, in the case that the device has stopped advertising, the iPhone will advertise with a magic packet, and the device will "wake up" and start advertising for another ~30s, and the app will connect in that time.


To sum up:

1) The device always scans for advertisement packets

2) The device will only advertise (be connectable) for 30s after receiving a magic packet from the phone.

3) After stopping advertising, in order to connect to the device, the phone will send a magic packet. The device will scan it and start advertising again for a limited time.


So my app needs to advertise with the right parameters for the phone to scan it properly, and also scan properly to see the advertisements from the iPhone. Right now, I managed to correctly set the advertisement parameters from my device based on the Technical Q&A QA1931, but I haven't managed to find the advertisement parameters of the iPhone, in order to select the best scanning parameters on my device (even in the Accessory Design Guidelines for Apple Devices, but I might be blind).


So, does anyone know what the optimal scan parameters are in order to quickly detect an advertisemet coming from an iPhone? Could you point me in the right direction if any documentation about the issue exists?


My device's current parameters are:

1) Advertising interval: 318.75ms. Advertising in channels 37, 38 and 39.

2) Scanning parameters: scanning interval 300ms, scan window 20ms.


Thanks!

Replies

Advertisement from an iPhone on behalf of an app is done on a best effort basis. Especially if the app is in the background, you may see slow advertising rates, and for durations of time, the advertising might stop altogether (depending on who or what else is using the Bluetooth resources at the time).


If you are scanning for advertisements from a backgrounded app, and when the iPhone screen is off, you should be scanning as fast as you can, as big a scan window as you can, and as long as you can based on what your battery limitations are.

I'm sorry if this is not helpful, but it is my understanding that scanning normally consumes more power than advertising. The reasoning behond this is that scanning needs to keep the antenna powered for longer durations of time compared to advertisments. I guess this depends on the implementation of the device, but why doesn't your device just advertise always instead of scanning always?