- Home /
How to Read Data from a Bluetooth Device with a Windows Store App
Hello and thank you for looking at this question.
I have an Arduino Uno R3 device that has an Bluetooth HC-06 module on it. I'm trying to send a string from my Arduino to the game.
I have been able to get this to work when my Build Platform is PC Standalone, because I am able to use the System.IO.Ports namespace and it is easy to just read the data that is sent to the SerialPort.
Unfortunately, the WSA platform does not allow the use of the System.IO.Ports namespace (among many other limitations).
How do I get this string of data to be sent to the game when the target platform is WSA?
Answer by The_Disposer · Mar 26, 2017 at 05:55 PM
I ended up using a BLE solution based on the example here:
https://www.simplicity.be/article/eddy-and-his-stones-diy-arduino-beacon-mobile-apps/
You can use the Universal Beacon Library if you make a plugin for it.
Here is the documentation on plugins https://docs.unity3d.com/Manual/Plugins.html
Answer by davidgodard3d · Feb 21, 2017 at 10:33 AM
Hello,
Look at this article : https://issuetracker.unity3d.com/issues/wsa-bluetooth-devices-are-not-supported
A trick : . in "player settings" enable "Bluetooth" and "HumanInterfaceDevice" capabilities.
Regards.
Well, I'm pretty sure it is possible to get working, i'm just not sure how.
Someone was able to have Bluetooth data from an Android phone sent to their Hololens (WSA platform):
But unfortunately i'm not sure how to translate that example into using the Arduino ins$$anonymous$$d of the android phone.
Answer by Marshall_Hu · Oct 30, 2017 at 12:03 PM
Did you do it with HC-06? I dont know how to get message from it. What is the key Code to connect The HC-06? Thx
I have paired HC-06 with Hololens. But I dont know how to connect it in the unity. Can you just tell me what APIs can I use.
Your answer
Follow this Question
Related Questions
submitting to windows app store 1 Answer
Bluetooth on windows 32feet dll 0 Answers
Windows. What is best way to avoid launch of multiple instances of the same application? 1 Answer
About launching Unity application of UnityMain function in C ++ application using DirectX11 0 Answers
Android Bluetooth 0 Answers