pauldemarco / flutter_blue

Bluetooth plugin for Flutter
BSD 3-Clause "New" or "Revised" License
2.36k stars 1.23k forks source link

Incredibly slow/few scan results on iPhones <7 (tested on 5+6) #227

Closed chu86 closed 5 years ago

chu86 commented 5 years ago

Hello everyone. We are currently creating an app that relies on scanning for BLE advertisements. We have noticed that there are barely any, some times no results at all in several seconds of scanning. (Scan mode balanced and lowLatency tested). Other devices (All tested android phones, iPhone 7+) consistently produce 15+ results a second for our Beacon. Trying to eliminate problem sources and so far my best guess is the hardware?

Have any of you run flutter_blue on older iPhones with similar or better results?

fvisticot commented 5 years ago

Hello, I get the same pb !! A ticket is already opened but no news :(

[iOS] Scan method is loosing peripheral detections #211

I plan to redevelop a more simple plugin only for scanning purpose if nothing is moving on this current issue.

chu86 commented 5 years ago

I have an update on this. We have noticed that these problems (at least in our usecase) can be 100% eliminated when we constantly slightly update our advertisement value. iPhones <7 seem to have some kind of power saving going on when advertisement data stays static - this results in very few actual scan results appearing when they do not change.

So our solution, since we do use this very dynamic anyway, is have the sender slightly update one of the payload values all the time.

riccardoratta commented 5 years ago

In my case a solution was to relaunch a new scan every 2/3 seconds, have you tried this approach?