ARM / ARM64 Catastrophic Failure when connecting to BLE Device Arduino Nano Sense 33(u-blox NINA B306 Bluetooth 5)
See original GitHub issueHoloLens 2 OS version: 100.19041.1103 (up to date as of 10am June 2, 2020) Windows 10 PC OS version 1909 Microsoft.NETCore.UniversalWindowsPlatform v6.2.10 UWP SDK version 1903 (10.0; Build 18362) (target and min)
We’re trying to get our HoloLens 2 devices to communicate with Bluetooth LE devices (specifically the u-blox NINA B306 – which is a standard Bluetooth 5 series – embedded on an Arduino Nano Sense 33).
NINA info:
https://www.u-blox.com/sites/default/files/NINA-B3_DataSheet_(UBX-17052099).pdf
Nano BE Sense 33 Info:
https://store.arduino.cc/usa/nano-33-ble-sense
Using: https://github.com/microsoft/Windows-universal-samples/tree/master/Samples/BluetoothLE Under a Windows 10 PC (v 1909) the UWP x86/x64 build works 100% fine. Devices are enumerated, can be connected to and queried for GATT services and characteristics, can listen to value changes. No real problems. We extracted the code from the example to our own app and all works well. Device name, id, isConnected isConnectable, isPaired, and isEnabled properties all report as expected.
Under HoloLens 2 neither the UWP ARM or ARM64 build will work properly. Devices are discovered and my nano device shows up. It seems to fail when either connecting or when trying to get the service list with a CATASTROPHIC FAILURE HR Result. This failure occurs within this repository’s BluetoothLE sample, my app, and the “Bluetooth LE Explorer (by MS)” app on the windows store. Interestingly on the HoloLens the device names are often not listed. The ID of the devices seems different than Windows desktop sees, and the properties are not the same such as isConnectable (almost always false but sometimes flips very frequently) and isConnected seem to be wrong.
For example (differing IDs): On HoloLens the name / ID of the Nano is BLEServduino / BluetoothLE#BluetoothLE84:57:33:69:a6:92-e5:2f:88:f8:d5:ce On windows PC it is BLEServduino / BluetoothLE#BluetoothLEfc:77:74:37:b2:97-e5:2f:88:f8:d5:ce The device’s address (according to the ArduinoBLE library running on the device) is: 33:69:a6:92:00:01
Failure occurs at
await device.GetGattServicesAsync(BluetoothCacheMode.Uncached);
I’ve also tried
await device.GetGattServicesForUuidAsync(MyService_GUID, BluetoothCacheMode.Uncached);
I’ve tried a few other methods too like using AdvertisementWatcher. Works on Win10 x86/64 but not on ARM/ARM64.
I’m stuck and unfortunately we thought that, like most mobile BLE APIs, this would just work out of the box without a hassle. Now I’ve spent days trying to work with this and it seems no one knows.
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (1 by maintainers)
Top GitHub Comments
MS is aware of the issue, but is asking for devs to report feedback to elevate the issue.
Here’s what they asked:
I ask that anyone affected by this should report ASAP so that we can get MS to pay attention as this is pretty critical to a lot of us.
I can also confirm that 10.0.18362.1061 is working. Interestingly I get a similar issue with connecting to the Arduino MKR WiFi 1010 using the BLE sample on my Windows 10 desktop running build 19041.329 (Version 2004). It was working when previously running a 18362 build (1903). So it seems the issue may not just be the Hololens 2, but the 19041 build.