Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long time between beacon detection #7

Open
trivector-se opened this issue Mar 18, 2016 · 10 comments
Open

Long time between beacon detection #7

trivector-se opened this issue Mar 18, 2016 · 10 comments

Comments

@trivector-se
Copy link

We are experiencing that the time between beacons detections tend to be very long after the app has run for a while.

Code used:
evothings.eddystone.startScan(
function(beacon)
{
newBeaconTime = new Date().getTime();
console.log('last found beacon ' + (newBeaconTime - lastFoundBeaconTime) + ' milliseconds ago');
lastFoundBeaconTime = newBeaconTime;
// Update beacon data.
beacon.timeStamp = Date.now();
beacons[beacon.address] = beacon;
},
function(error)
{
showMessage('Eddystone scan error: ' + error);
});
}

At first, the console outputs very small numbers, ranging from 20milliseconds to around 500 milliseconds.

After about a minute these numbers tend to reach 4000 to 7000 milliseconds.

Thanks in advance.

Regards,
Jimmie J

@idesignpixels
Copy link
Contributor

I have also seen this, it's almost like it gets lazy... spent ages debugging my own code but it's the plugin. I find after 3 minutes or so it deletes beacons and finds them and then deletes and so on, very frustrating!

@ghost ghost added the bug label Apr 28, 2016
@ghost ghost self-assigned this Apr 28, 2016
@ghost
Copy link

ghost commented Apr 28, 2016

Does this happen on iOS and/or Android?

@idesignpixels
Copy link
Contributor

I have only tested in ios

@ghost
Copy link

ghost commented Apr 28, 2016

@Lindstrom1989 Thanks, putting this on the TODO-list.

@idesignpixels
Copy link
Contributor

Has there been any progress on this?

@ghost
Copy link

ghost commented Jun 22, 2016

@Lindstrom1989 Sorry for slow response. I did testing on Android a while ago and noticed that performace varied a lot dependent on the device used. On Nexus 7 2013 it was very slow, on other Android devices it was much faster. On iOS it has been fast.

@rmarquois
Copy link

+1.

I have the same behavior on iOS 9.x (iPhone 5 and iPhone 6). The success callback is not called periodically when my beacon is on.

I logged into EVOBLE.m file - (void) centralManager: (CBCentralManager *)central didDiscoverPeripheral: (CBPeripheral *)peripheral advertisementData: (NSDictionary *)advertisementData RSSI: (NSNumber *)RSSI method and it seems that it comes from the Core Bluetooth framework.

No problem with Android (in my case Nexus 5 and Lollipop version).

@ghost
Copy link

ghost commented Aug 15, 2016

@rmarquois Thanks for the update, will test Eddystone on iOS 9.

@ghost ghost added the in-progress label Aug 15, 2016
@NodeKing
Copy link

Has anyone managed to implement a fix for this?

@yuhr
Copy link

yuhr commented Nov 8, 2017

Probably this is the same problem I ran into. The interval value of my beacon is set to 100ms, and at first the API reports data per 100-200ms (acceptable for me), but gradually slows down - after a few minutes it reports per 200-2000ms - while the app is in foreground. When the app returns from background, the interval seems reactivated.

I've found a workaround for this; stop and start scanning periodically.

evothings.eddystone.startScan(cb, console.error);
setInterval(function() {
  evothings.eddystone.stopScan();
  evothings.eddystone.startScan(cb, console.error);
}, 1000);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants