Reputation: 924
Another Beacon question.
I purchase a $10 beacon from Amazon for testing and experimental purpose. I developed an app in iOS swift and based on the distance, It displays a message on the screen
func updateDistance(distance: CLProximity) {
UIView.animateWithDuration(1.0) { [unowned self] in
switch distance {
case .Unknown:
self.view.backgroundColor = UIColor.grayColor()
self.distanceReading.text = "No Beacon Signal Detected"
case .Far:
self.view.backgroundColor = UIColor.redColor()
self.distanceReading.text = "Weak Beacon Signal Detected"
case .Near:
self.view.backgroundColor = UIColor.yellowColor()
self.distanceReading.text = "Medium Beacon Signal Detected"
case .Immediate:
self.view.backgroundColor = UIColor.greenColor()
self.distanceReading.text = "Strong Beacon Signal Detected"
}
}
}
I am running the same app on 2 different iPhones. one is iphone 6 software version 8.4.1 and the other is iPhone 5S software version 8.4.1.
Both iphones are at the same distance gives me 2 different readings. For example when iPhone6 shows "Strong Beacon Signal Detected" iphone 5s shows medium Signal". Also when iphone 5S shows "No Beacon Signal Detected" iPhone 6 still shows "Weak signal for another 15 to 20 feet. Also iPhone 5s sometimes looses signal for a sec or so.
So my question is shouldn't both phones behave the same?
Upvotes: 1
Views: 103
Reputation: 131481
The distance value for iBeacons is relative, and so variable as to be pretty much useless. It uses radio signal strength to estimate distance to the beacon, and radio signal strength is subject to an almost limitless number of variables.
One of those variables will be the gain of the antenna on the phone you are using to measure the signal. I wouldn't expect 2 recent generation phones to give results as radically different as you report though.
It sounds like the bluetooth receiver on your 5s may be "dodgy".
Are you using them both "naked"? (Not in a case) and holding them by the corners? Thinks like cases and how you hold the phone can affect signal strength, as can interference from things like fluorescent lights and signal blockage and echoes from nearby objects.
Upvotes: 2