0
我正在嘗試使用xamarin做測試應用程序。 這個應用程序必須搜索藍牙設備,將它們查看列表並連接到它們以讀取或寫入數據。 我爲我的項目選擇xamarin Portable Class Library。Xamarin PCL藍牙無法看到設備
我看到很多例子,但是我看不到列表中的設備。
我嘗試Monkey Robotics(項目'Robocontroller'和項目'BLE')但掃描我看不到設備! Robocontroller:
05-30 15:14:21.048 D/Mono (11792): [0x7f6946d000] worker starting
05-30 15:14:21.063 I/mono-stdout(11792): BluetoothLEManager: Scan timeout has elapsed.
BluetoothLEManager: Scan timeout has elapsed.
05-30 15:14:21.065 D/BluetoothAdapter(11792): stopLeScan()
05-30 15:14:21.067 D/BluetoothAdapter(11792): 622203304: getState(). Returning 12
BLE:
Adapter: Starting a scan for devices.
05-30 15:23:53.549 D/BluetoothAdapter(17688): startLeScan(): null
05-30 15:23:53.647 D/BluetoothLeScanner(17688): onClientRegistered() - status=0 clientIf=5
adapter.StartScanningForDevices(00000000-0000-0000-0000-000000000000)
05-30 15:23:53.755 I/mono-stdout(17688): adapter.StartScanningForDevices(00000000-0000-0000-0000-000000000000)
[0:] adapter.StartScanningForDevices(00000000-0000-0000-0000-000000000000)
05-30 15:23:53.768 I/Choreographer(17688): Skipped 152 frames! The application may be doing too much work on its main thread.
Thread started: <Thread Pool> #7
05-30 15:24:03.718 D/Mono (17688): [0xba2bcf40] worker starting
BluetoothLEManager: Scan timeout has elapsed.
05-30 15:24:03.801 I/mono-stdout(17688): BluetoothLEManager: Scan timeout has elapsed.
05-30 15:24:03.808 D/BluetoothAdapter(17688): stopLeScan()
我tryed其他項目,如 'estimotes', 'xamarin BLE'(在一箇舊的代碼,重定向到Monkey.Robotics)和 'BluetoothLEExplorer'。 我使用vs2015 pro的最新版本的xamarin。
有什麼建議嗎? 謝謝
您是否在掃描範圍內擁有** LE **設備,與傳統藍牙設備相比?並非所有的設備都是LE或啓用這兩個配置文件.... – SushiHangover
是的,我用於調試華碩koa1和其他設備,必須找到的是:lumia 950xl,mac mini,其他Android手機。我嘗試改變與其他智能手機的華碩,但同樣的問題 – mene
當你使用第三方應用程序,如「BLE掃描儀」,你看到這些設備?你有沒有試過我們的BLE插件? :D https://github.com/xabre/xamarin-bluetooth-le使用1.0的預發佈,如果你想。 –