【发布时间】:2016-11-21 13:18:33
【问题描述】:
对于一个原型,我目前正在尝试使用 c# 创建一个蓝牙信标。我发现了一些有希望的例子
- https://gist.github.com/petrosoininen/869059881614f32854a1
- https://github.com/Microsoft/Windows-universal-samples/blob/master/Samples/BluetoothAdvertisement/cs/Scenario2_Publisher.xaml.cs
- setting the BluetoothLEAdvertisement.Flags in C# for iBeacon advertisemet
对于 UWP。问题是……这些似乎都不起作用。
在任一示例上调用 _bluetoothLEAdvertisementPublisher.Start(); 时,我都会收到一条异常消息,即“Die Daten sind unzulässig. Es wurde eine ungültige Anzeigennutzlast erkannt”。这意味着“无效数据。检测到无效(显示?)paylad”。
我想到的第一个问题是我是否应该在_bluetoothLEAdvertisementPublisher.Advertisement 上设置ManufacturerData 或DataSections?或两者?
第二个问题:windows周年纪念更新是否会杀死上面的例子?
【问题讨论】:
标签: c# .net bluetooth windows-10-universal