BLE device- same code and same firmware works well with iphone SE and works not as good in iphone 7 plus - ios

I am working with ibeacon. I created an application for tracking devices. But I am facing a problem with the application. The app works well in the terminated state for iPhone SE whereas it is not working (in the locked state) for iPhone 7+.In the unlocked state it is working for 7+ also but still it is very slow compared to iPhone SE. Is there any specific reason for this problem. If it can be solved, what could be the possible solution to this problem.
I am really helpless and clueless about this issue.Please do help me and assist me with your knowledge Sir. Thank you in advance.

When an iOS app is in the background, it relies on two different mechanisms to detect beacons:
Hardware filters. These are byte patterns stored on the Bluetooth chip that alert the OS when a BLE advertising packet is received that matches your beacon region. This mechanism is very fast and delivers results within a second, but it is a limited resource. Once all slots are full, it will no longer work. There is no documentation about the number of slots available on each iPhone model, but experiments suggest the number is ~30.
Software scans. A full BLE scan is performed to find all beacons even if they are not stored in a hardware filter. In the foreground with ranging active, software scans are constant. In the background they are periodic to save battery, so detections based on software scans are much slower. The rate is undocumented, but experiments suggest software scans are performed every ~10 minutes in the background in the typical phone state. An additiona softwarel scan is also performed when the screen is unlocked.
The problem description is consistent with hardware filters (1) not working on the iPhone 7+. This may not be a problem with the phone model, it could be a problem with the specific device, or more likely the software state on the phone. A typical cause is the installation of multiple beacon apps that use up all the slots. Each beacon app can register up to 20 beacon regions for monitoring, so just two apps could use up all the slots!. The first apps to run and register slots may hold them forever.
A few troubleshooting tips:
Uninstall any other apps you think may. be detecting beacons, then re-install yours.
Restart your device.
If the above does not help, you may have a hardware problem with your device. Try another iPhone 7+ to see if you can reproduce.

Related

How often does iOS monitor for iBeacons?

I have an iBeacon device I'm working on and am wondering how often iOS monitors/checks/scans for iBeacons when asked to do so via a CoreLocation app? I'm wondering so I know how long to broadcast for my iBeacon is designed to not always be on.
I'm surprised I haven't been able to find this on the web (and of course Apple won't tell us)
Edit: I mean when the app itself is not running because the phone has been restart or the app is shut down.
There is no Apple documentation for this, but the following is what I have learned from lots of testing on iOS 7 and iOS 8 devices:
If the app gets one of the limited (30) bluetooth hardware detection slots, the Bluetooth chip will always be scanning for the beacon pattern. In theory one packet could trigger the detection, but in practice you may need several seconds of transmission to guarantee detection.
If the app does not get a hardware acceleration slot, the OS will perform a full scan every 15 minutes.
If you want to target phones that have hardware detection slots, the beacon could transmit for 5 seconds at any time appropriate for the use case. If you want to target apps without hardware acceleration slots, the beacon must transmit for 15 minutes to guarantee detection.

iBeacon transmission when app is closed?

We would like to use some configuration of the iBeacon , where the user's iPhone will advertise its services, but when the app is closed.
So when a user come across a hardware beacon, it will recognise the user's iPhone(as a beacon) without opening the app, and even connect to it .
I could find here many opinions about that, but i wonder if there are any news with the iOS8 ,and if there is a clear answer for that from Apple ?
A couple of points:
Bluetooth beacons, iBeacons included, are transmit only. They don't see or "recognize" other beacons or phones. The statement "when a user come across a hardware beacon, it will recognise the user's iPhone(as a beacon)" is not possible with the technology regardless of whether the app on the phone is in the foreground or the background.
iBeacons are supported on iOS devices with version 7.x and 8.x of the operating system. On all these versions, however, beacon transmission from the iOS device is only supported when the app is in the foreground. See here for details.

iBeacon emitted via [peripheralManager startAdvertising:] will trigger enter and soon followed by exit region on another device

I'm trying to grab the iBeacon advertising code from AirLocate sample code into an empty app. It looks like:
NSDictionary *peripheralData = nil;
region = [[CLBeaconRegion alloc] initWithProximityUUID:[[NSUUID alloc] initWithUUIDString:beaconUuid] major:beaconMajor minor:beaconMinor identifier:beaconIdentifier];
peripheralData = [region peripheralDataWithMeasuredPower:nil];//[NSNumber numberWithInt:power]
// The region's peripheral data contains the CoreBluetooth-specific data we need to advertise.
if(peripheralData)
{
[peripheralManager startAdvertising:peripheralData];
return YES;
}
The empty app is able to emit iBeacon signal which can be successfully be monitored by another app on another device. But the problem is on another app, locationManager:didEnterRegion: delegate method is followed by locationManager:didExitRegion: very quickly.
Peripheral device: iPad mini 2 retina
Central device: iPhone 5S
Running the AirLocate app to separately configure one device as iBeacon emitter and another device as monitor can also reproduce the issue mentioned above.
Some other findings:
If you just leave the receiver app as is, it will report
didEnterRegion automatically in a few minutes, followed by
didExitRegion quickly, still the same problem.
If you move the emitter app to background mode by pressing home button and enter the
same app again, the receiver will trigger another round of those two
monitoring methods, still the same problem.
My guess is the frequency of iBeacon advertising is so small (say, once a few seconds) that the receiver may think the region is exited before receiving the package again. It may also be a bug in iOS.
Does anyone know about it?
Note that you cannot make iOS transmit as an iBeacon in the background. If the lock screen comes up, you will soon get an exit notification on the other device.
By default, an iOS device transmits advertisements at a rate of 30 Hz, but again, the app must be in the foreground. I have measured this with a hardware BLE sniffer. So I doubt transmit frequency is an issue.
I want to update my own question with something interesting.
After I upgraded both ends to iOS 7.1.2 released this week which addresses iBeacon stability fix, the situation got a little bit improved: the receiving end will report exit event one minute after enter event during my own app test (previously it happens soon after enter event). If I use Locate Beacon at both ends, I observed the same instability.
Another test I made is to use a third iOS 7.1 (not upgraded to 7.1.2) Phone as the receiver, it doesn't drop from the peripheral at all. Stable as it is expected. So the problem is probably related with receiver device (aka. central).
So it seems a problem with Bluetooth module on my first iPhone receiver. I hope it's not caused by so many Bluetooth debugging on it :)
The problem can always be observed if I use the original iPad mini 2 as peripheral and this iPhone 5s as the central. However, if I use the third iPhone (iPhone 5 if the type matters) as peripheral and still this suspicious iPhone 5s as the central, it's quite stable.
Therefore, if you meet the same strange issue, here are the suggestions:
Upgrade your iOS on both sides
Restart Bluetooth on receiver device
(aka. central) sometimes will fix the problem, if not always in your
situation.

Gimbal S10 in iBeacon Mode is not showing in Apple's Sample AirLocate App

I am using a Gimbal series 10 device configured in iBeacon mode using one of the AirLocate UUIDs (the first one - E2C56DB5-DFFB-48D2-B060-D0F5A71096E0). When I use iBeacon Locate on my Android phone, I can see the Gimbal broadcasting the correct UUID. However, when I try to use Apple's AirLocate demo app, it is not working in trying to find the iBeacon. I also cannot find it in the iOS version of iBeacon Locate, by the same company, Radius Networks.
I am using the beta version of Xcode / iOS.
We have internal apps that would like to use the micro-location features that iBeacons allow, and I'm trying to put together a quick proof of concept. Unless I can get the iBeacon distance using the sample code in AirLocate, I cannot proceed. Any help or experience with this would be greatly appreciated.
Two suggestions:
First, Look closely to verify that have every single character of that ProximityUUID entered as above in the Gimbal configuration. If even one character is off, it will not be visible in AirLocate or the iOS version of the Locate for iBeacon app.
The Android version of iBeacon Locate shows all iBeacons regardless of ProximityUUID, so it will still be visible in the event of a configuration issue.
Second, there is a known bug in iOS 7.1 CoreLocation where iBeacon detections can stop entirely until you reboot your phone. Try rebooting and see if the beacon starts showing up in both applications on iOS.

Unable to transmit as an iBeacon from iPad Air

We have an existing iPad app that we are adding iBeacon transmitting capabilities to. I am unable to transmit an iBeacon signal. I won't provide the code at this point because I've also tested the Apple AirLocate example and the Radius Networks Locate iB app as a transmitter and in both cases the iPad won't transmit a beacon.
We tested with iPhone 5 devices and they can both transmit and range beacons.
What could be the issue with our iPad test device that it won't transmit? It can range beacons from the iPhones just fine.
BT is enabled. Location Services are enabled and approved for the apps in question.
Two likely causes:
The Proximity UUID of the iBeacon transmitter is not configured with Locate for iBeacon or Air Locate. Locate cannot see new iBeacons with unknown Proximity UUIDs. Even if the configuration is off by only a single digit, the iBeacon will be invisible.
Many users have reported recently that their phones are getting into a state where they cannot see iBeacons, and a reboot solves the problem. See here for more details.
How do you detect the iBeacon, actually?
I once encountered the problem that CLLocationManager#startMonitoringForRegion: did require a certain period of time, until the regions were updated and a region was ranged. So CLLocationManager#requestStateForRegion:...
In either way. What I first did to validate that beacons were emitting/sending correctly (not receiving): I downloaded a common Bluetooth Scanning-App and checked, whether the App is able to range the emitted beacon. Could you verify this at first? Maybe the iPad Air is sending correctly, but the receives do not range the beacon yet.

Resources