2017-10-10 148 views
0

我有一些問題與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

回答

0

請參考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