BLE的扫描间隔视窗的IoT

问题描述:

我有一些问题与Windows的IoT(Rpi3)BLE的扫描间隔视窗的IoT

只有30个包的%已经捕获收集使用标准BluetoothLEAdvertisementWatcher BLE广告。 我在这里找到了一个解决方案: BLE Scan Interval Windows 10它适用于Windows 10 x64。

但有一件重要的事情:在该解决方案中使用的irprops.cpl不是为ARM平台设计的。

有什么办法让它在Windows IoT(ARM)上工作?

代码VB:

Private watcher As BluetoothLEAdvertisementWatcher 
    watcher = New BluetoothLEAdvertisementWatcher() 
    watcher.ScanningMode = BluetoothLEScanningMode.Passive 

    Protected Overrides Sub OnNavigatedTo(e As NavigationEventArgs) 

      AddHandler watcher.Received, AddressOf OnAdvertisementReceived 
      watcher.Start() 

    End Sub 

    Private Async Sub OnAdvertisementReceived(watcher As BluetoothLEAdvertisementWatcher, eventArgs As BluetoothLEAdvertisementReceivedEventArgs) 

    'here is the code for counting BLE frames 

    Await Me.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, Sub() 

    End Sub 
+0

首先,您需要检查为什么BLE广告包丢失了70%?请分享您的代码。 –

+0

我在第一篇文章中添加了代码。它来自UWP的官方Microsoft Sample Pack。 – Mike

请参考Bluetooth LE GATT。在这个样本DeviceWatcher用于发现蓝牙LE设备而非BluetoothLEAdvertisementWatcher.In另外,请here要了解详情。

+0

感谢您的回答,但它不在话题中。我收到由我的信标发出的所有蓝牙广告都有问题。该代码适用于我的Windows 10 x64,但Win IoT的Rpi只能收到大约30%的广告。但是这里有一些研究:http://embedded101.com/Blogs/David-Jones/entryid/790/Win-10-IoT-Core-Raspberry-Pi3-Bluetooth-Driver-Issue-Workaround我已经实现了这个解决方案,并且增加了接收到的广告,但仍有超过50%的广告没有收集到。 – Mike