Open ghost opened 6 years ago
I guess this is related https://stackoverflow.com/questions/37307301/ble-scan-interval-windows-10/37328965. It suggests a hack of using DeviceIoControl
and DeviceIoControl isn't allowed in uwp apps?
DeviceIOControl
isn't allowed in UWP apps published to the store. (Although developer / sideloaded UWP apps can call any Win32 APIs.) Even if it was allowed, it would be difficult to call from JavaScript, since the NodeRT bindings only expose WinRT APIs.
What about adjusting the BluetoothLEAdvertisementWatcher.MinSamplingInterval
property... I don't see that discussed on that stackoverflow page, but it seems like maybe it could help?
what's the default sampling interval? I tried reading the docs, but I couldn't see what the defaults for any of those properties in BluetoothLEAdvertisementWatcher
I admit I'm rather new to Windows so maybe I missed it.
The UWP API docs are nearly worthless. :( But I just realized MinSamplingInterval
is a read-only property, so that's not going to help.
This seems like a very unfortunate limitation of the UWP BluetoothLEAdvertisementWatcher
class, for which we don't have any workaround.
Can you tell me about what kind of numbers you see? and what settings your peripherals have?
I'm actually on vacation now, I won't be able to really look into this for at least a couple weeks.
Did anyone get a way to get better scan timings in UWP?
Using the
advertisment-discovery.js
script from examples enablingallowDuplicates
instartScanning
i get results between say 5 and 12 seconds for a device that advertises once every 500ms. I get much quicker responses when using the hci-socket binding.I'm using a BCM20702A based dongle and node 10.6.0
Can anybody else replicate this sort of behavior?