Scan parameters in BLE API

Ask, and ye shall receive.
wsialex
Posts: 2
Joined: 13:03, 26 Oct 2015

Scan parameters in BLE API

Postby wsialex » 13:58, 26 Oct 2015

Hi,

I was wondering if you have any plans on adding support for different Scan Settings in your BLE API? I saw a previous Forum post: viewtopic.php?f=8&t=5&p=35&hilit=scan+interval#p35

where you said thast that android did not let you choose scan parameters. I think this has changed since then (https://developer.android.com/reference ... tings.html). Is this something that you have plans on adding to your cordova ble plugin?

The reason that I ask is because the BLE apps I have made using Evothings sometimes take very long time to connect after a scan is started (depending on advertising interval on peripheral device). This might be beacuse of the default scan settings on the android device ( scan type, scan interval, scan window etc).

Regards,
Alex

User avatar
micke
Posts: 256
Joined: 20:49, 18 Nov 2013

Re: Scan parameters in BLE API

Postby micke » 15:23, 16 Dec 2015

Hi Alex!

Sorry for the super-slow response!

Yes as you say Android API Level >= 21 has the possibility to set scan parameters, found this class following your link:

https://developer.android.com/reference ... ilder.html

Lets talk further about the settings you wish to be able to configure.

On iOS it is not possible to supply these settings.

As for your issue with connecting taking time, I have noted that scanning is quick but reading all services, characteristics etc takes time.

We could add so that scanning only scans for specific services, this could make things faster (available on both Android and iOS).

One thing to test is using the BLE Scan example app and see how long it takes for your device to appear in the scan result.

Regarding the scan interval I found a document from Apple that may be of interest:

https://developer.apple.com/hardwaredri ... elines.pdf

And a related forum question:

http://stackoverflow.com/questions/1409 ... ction-time

Let's stay in touch!

Best, Mikael


Return to “Questions and answers”

Who is online

Users browsing this forum: MSN [Bot] and 1 guest