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

ScanTimeout seems to be ignored #783

Open
alessandrofrancesconi opened this issue Nov 26, 2023 · 3 comments
Open

ScanTimeout seems to be ignored #783

alessandrofrancesconi opened this issue Nov 26, 2023 · 3 comments

Comments

@alessandrofrancesconi
Copy link

I'm using StartScanningForDevicesAsync and the Adapter is configured with the following parameters

  • ScanMode = BALANCED
  • ScanMatchMode = AGGRESSIVE
  • ScanTimeout = 3000

Testing on Android 11, by calling this:

await this.Ble.Adapter.StartScanningForDevicesAsync(...);

The function always completes after 10 second instead of 3.

Configuration

Version of the Plugin: 3.0.0

Platform: Android 11

Device: Xperia Compact XZ1

@smsissuechecker
Copy link

Hi @alessandrofrancesconi,

I'm the friendly issue checker.
It seems like (50.00 %) you haven't used our issue template 😢 I think it is very frustrating for the repository owners, if you ignore them.

If you think it's fine to make an exception, just ignore this message.
But if you think it was a mistake to delete the template, please close the issue and create a new one.

Thanks!

@axa88
Copy link

axa88 commented Feb 6, 2024

I'm using StartScanningForDevicesAsync and the Adapter is configured with the following parameters

* ScanMode = BALANCED
* ScanMatchMode = AGGRESSIVE
* **ScanTimeout = 3000**

Testing on Android 11, by calling this:

await this.Ble.Adapter.StartScanningForDevicesAsync(...);

The function always completes after 10 second instead of 3.

Configuration

Version of the Plugin: 3.0.0
Platform: Android 11
Device: Xperia Compact XZ1

Assuming "The function" refers to device scanning, I have confirmed no issue using ScanTimeout property set to non default value, using the above ScanMode nor ScanMatchMode have any burden.
Scanning stops and the ScanTimeoutElapsed event triggers upon the set time.
Confirmed working on WinUI, Android 9, 12 and 13. Not likely a valid issue on 11 either.

@janusw
Copy link
Member

janusw commented Mar 3, 2024

I cannot reproduce this either. I'm testing on Android 14 with Plugin.BLE 3.1.0-beta.2 (on a Samsung Galaxy device). No matter which ScanMode or ScanMatchMode I set, I see that the received advertisements stop roughly after the requested time, and also StartScanningForDevicesAsync returns after that time span.

@alessandrofrancesconi I will close this, unless you can provide further info as to when or why this occurs. It's definitely not a general problem with our library. Maybe just some specific issue with the BT implementation on your Experia device? Do you see this with other devices or Android versions as well?

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

4 participants