Hello everyone.
The Mixed Reality Forums here are no longer being used or maintained.
There are a few other places we would like to direct you to for support, both from Microsoft and from the community.
The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.
For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.
If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.
And always feel free to hit us up on Twitter @MxdRealityDev.
The Mixed Reality Forums here are no longer being used or maintained.
There are a few other places we would like to direct you to for support, both from Microsoft and from the community.
The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.
For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.
If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.
And always feel free to hit us up on Twitter @MxdRealityDev.
Options
Hololens networking (Websocket, OPC-UA)
I'm looking for a solution to use either a Websocket connection on the Hololens (doesn't work with the websocketsharp implementation for Unity) or an OPC-UA connection.
I think both implementations are possible for an UWP-App, but I need the values in Unity. So I need either an implementation for Unity or some way to push the data from the UWP wrapper into my Unity app.
If you can think of another way to send continuous data to the lens, let me know
Tagged:
1
Answers
I would put the UA Client and a web server on UWP and a web client on Unity. I would use something like node.js from UWP to Unity. node.js supports websockets.
Well since it's not possible to use a websocket in Unity with UWP export this is not possible right? My last setup for the GearVR (Android) worked like this, nodejs websocket server and Unity as websocket client. But this doesn't work with the UWP export for the Hololens.
http://www.gamedev.net/page/resources/_/technical/multiplayer-and-network-programming/integrating-socketio-with-unity-5-webgl-r4365
Let me know if it helps anyone out! Its for webgl but should translate for external calls to a c# library.
Looks interesting, but it is it compatible with UWP?
For UWP see https://msdn.microsoft.com/en-us/windows/uwp/networking/websockets
For using Socketio+NodeJS in UWP you can use SocketIOClient with NewtonSoft(JSON)
https://github.com/Quobject/SocketIoClientDotNet
For using Socketio+NodeJS in UWP you can use SocketIOClient with NewtonSoft(JSON)
https://github.com/Quobject/SocketIoClientDotNet
I also want to connect my Unity-App with a NodeJS WebSocket server. But I can't install SocketIoClientDotNet, because it says, that there are no assembly references, because this project uses ".NETFramework,Version=v3.5,Profile=Unity Subset v3.5". Is there any solution for his?
Found out how to do it: use Windows.Networking.Sockets - like utekai says, but have to wrap it in "#if WINDOWS_UWP" - doesn't work with Socket.IO, because it got a problem, as Socket.IO switches the modes after connection, but works perfectly with the "websockets" library under node.
@sga_batix were you able to use it?
Any1 else tried OPC UA client on HoloLens?