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

Scanner does not start with Wi-Fi turned off #121

Open
Qualcuno opened this issue Nov 16, 2022 · 0 comments
Open

Scanner does not start with Wi-Fi turned off #121

Qualcuno opened this issue Nov 16, 2022 · 0 comments

Comments

@Qualcuno
Copy link

If the application starts with the wifi on, everything works fine, the beacons are detected and even when the wifi is switched off during the life of the app the scanner continues to work without any problems.
But if the application starts with wifi turned off, no beacon is detected. If I turn on wifi when the app is running, the scanner starts working.
Looking at the logs

When at app starts wifi is off, the log appear like this:

D/RANGING ( 3114): Start ranging = [{identifier=com.beacon}]
I/ScanJob ( 3114): Using immediateScanJobId from manifest: 208352939
I/ScanJob ( 3114): Using periodicScanJobId from manifest: 208352940
W/JobInfo ( 3114): Requested interval +5m0s0ms for job 208352940 is too small; raising to +15m0s0ms
W/JobInfo ( 3114): Requested flex 0 for job 208352940 is too small; raising to +5m0s0ms
I/ScanJob ( 3114): Using immediateScanJobId from manifest: 208352939
I/ScanJob ( 3114): Using periodicScanJobId from manifest: 208352940
W/JobInfo ( 3114): Requested interval +5m0s0ms for job 208352940 is too small; raising to +15m0s0ms
W/JobInfo ( 3114): Requested flex 0 for job 208352940 is too small; raising to +5m0s0ms

while when app starts with wifi on, the log appear like this:

D/RANGING ( 2800): Start ranging = [{identifier=com.beacon}]
I/ScanJob ( 2800): Using immediateScanJobId from manifest: 208352939
I/ScanJob ( 2800): Using periodicScanJobId from manifest: 208352940
W/JobInfo ( 2800): Requested interval +5m0s0ms for job 208352940 is too small; raising to +15m0s0ms
W/JobInfo ( 2800): Requested flex 0 for job 208352940 is too small; raising to +5m0s0ms
I/ScanJob ( 2800): Using immediateScanJobId from manifest: 208352939
I/ScanJob ( 2800): Using periodicScanJobId from manifest: 208352940
W/JobInfo ( 2800): Requested interval +5m0s0ms for job 208352940 is too small; raising to +15m0s0ms
W/JobInfo ( 2800): Requested flex 0 for job 208352940 is too small; raising to +5m0s0ms 
       <--- STOP HERE IF WIFI IS OFF AS YOU CAN SE ON PREVIOUS LOGS ABOVE --->
       <--- CONTINUE BELOW IF WIFI IS ON --->
I/ScanJob ( 2800): ScanJob Lifecycle START: org.altbeacon.beacon.service.ScanJob@2fadc6d
I/CycledLeScanner( 2800): Using Android O scanner
E/libc    ( 2800): Access denied finding property "ro.vendor.df.effect.conflict"
E/libc    ( 2800): Access denied finding property "ro.vendor.knock.type"
I/ScanJob ( 2800): Using immediateScanJobId from manifest: 208352939
I/ScanJob ( 2800): Running immediate scan job: instance is org.altbeacon.beacon.service.ScanJob@2fadc6d
I/ScanJob ( 2800): scanJob version 2.19 is starting up on the main process
W/ModelSpecificDistanceCalculator( 2800): Cannot find match for this device.  Using default
D/BluetoothAdapter( 2800): isLeEnabled(): ON
I/ScanJob ( 2800): Scan job running for 300000 millis
D/BluetoothAdapter( 2800): isLeEnabled(): ON
D/BluetoothLeScanner( 2800): onScannerRegistered() - status=0 scannerId=19 mScannerId=0
I/ScanHelper( 2800): Non-distinct packets detected in a single scan.  Restarting scans unecessary.
I/flutter ( 2800): RANGING: {"region":{"identifier":"com.beacon"},"beacons":[{"proximityUUID":"42A5BDE6.....

Sometimes the scanner worked even with the wifi off, but it started working after a long time, from 30 seconds up to 5 minutes later.
So, is wifi needed for the scanner to work well?

I've tried with

  • flutter_beacon: ^0.5.1 and with latest commit on repo
  • Flutter stable 3.3.6
  • Samsung s21 with Android 12
  • Redmi Note 8T with Android 11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant