Closed nmitrak closed 7 months ago
Would it be possible to compile and run the Microsoft sample on the Hololens 2?
After deploying the Microsoft sample it seems that Hololens 2 can discover the Microbit connect to a service and subscribe to a characteristic although the attribute isConnectable is false (1st pic)
This was my main question: whether Hololens can pair with Microbit because Microsoft documentation stated that Hololens 2 can connect with devices that have a Gatt profile. What could be wrong and Hololens 2 cannot connect through the Unity project? Again thanks for your time.
In the Unity demo scene only devices with isConnectable set to true are shown: https://github.com/adabru/BleWinrtDll/blob/f2635b7b02432ea3006983657107f092c862171d/BleWinrtDll%20Unity/Assets/Scenes/Demo.cs#L67
You can try to comment out that part of the expression.
If you encounter further differences between the Microsoft sample and the Unity demo scene, you can compare the Microsoft code to BleWinrtDll/BleWinrtDll.cpp .
Oops, I overlooked that you already connected in your first post. You can also try to debug with DebugBle/Program.cs . You'd have to replace "CynteractGlove"
with "BBC micro.bit [gotot]"
, "{f6f04ffa-9a61-11e9-a2a3-2a2ae2dbcce4}"
with your serviceUuid, "{f6f07c3c-9a61-11e9-a2a3-2a2ae2dbcce4}", ...
with your characteristicUuid and comment out the BLE.WritePackage
statement.
Again thank you for your response. When i run DebugBle/Program.cs on the laptop everything is ok as you can see at the screenshot below.
Is there a way to deploy this on Hololens 2?
Thank you
Maybe it's possible to compile the Console Program for "ARM64" as well and run the .exe on the HoloLens? You somehow managed to run the Microsoft sample there as well, didn't you? :sweat_smile:
Maybe it's possible to compile the Console Program for "ARM64" as well and run the .exe on the HoloLens? You somehow managed to run the Microsoft sample there as well, didn't you? 😅
Yes you are absolutely right but now i don't have the option target Device that i had with the Microsoft sample in order to deploy the program to Hololens. Which file of Microsoft Sample is similar to BleWinrtDll/BleWinrtDll.cpp ?
Hi
I managed to build your BleWinrtdll app for unity, deploy it succesfully on Hololens 2 and pair Hololens 2 succesfully with microbit by using the 2 compiled dlls from marianylund's application.
Thank you very much again for you time, and congrats to you and marianylund for your work
Hi I am trying to connect Hololens 2 with a Microbit and read the Temperature sensor value of the Microbit. While this is a success when i run this on Unity Editor (many many thanks to adabru and marianylund for the effort) this doesn't comply when the application is deployed on the Hololens 2. Hololens finds the Microbit device but cannot connect after scanning it. After some examination of the problem it seems that it cannot retrieve the BLE profile of the micro:bit Error Message Could not establish connection to device with ID BluetoothLE#BluetoothLEf4:7b:09:80:e9:d5-d2:c7:fb:ef:ad:dd System.Exception: Connection failed: BleWinrtDll.cpp:117 Failed to connect to device at BLE.Connect(System.String deviceId, System.String serviceUuid, System.String[] characteristiccUuids) [0x00000] in
<000000000000000000000000000000000>:0 and a bunch of other messages Any suggestions? I look forward to your support. Kind regards