TCP connection with hololens works only in one way

For a while now I’m trying to send data to hololens but nothing works.

I’m using Windows.Networking and I have an UWP application running on my PC.
I based it on this example:

When I try to communicate between two PCs or when I’m sending a message from hololens it gets recieved normally but any attempt to send it to the hololens was unsuccessful.

I have also tried UDP example from this post with the same results - I can recieve a message from hololens but I can’t send it:

I have tried using different ports and disabling firewall. Tried updating and resetting hololens. Updating Visual Studio, Unity and HoloToolkit. I tried creating a new project with only networking script to check if something other in my project wasn’t interfering.

So if anyone had a similar could you please share what has or hasn’t worked for you?

1 Like

Did you enable the server capability in the manifest?

Yes, tried all combinations of enabling nothing, private network, internet client/server, all of them.

Are you sure you’re sending the message to the correct IP address? Is it the same that you get when you communicate from HoloLens to PC?

I am not aware of any known issues in such communication, and since you’re using Windows APIs directly, Unity doesn’t it at all.

I am sure, I use the same IP for deploying and debugging or accessing web client. I can also add that i used different ports also.

I’m facing the same problem: sending from HoloLens to server is possible but receiving from server isn’t because Accept() does not get any connection. Could you find a solution for your problem in the meantime?

Update: releasing the port in windows defender firewall solved the problem.

1 Like

I have the same issue. HoloLens simply does not receive any messages, or rather disconnects or crashes. But it can send to other devices if it is the client. I tried TCP and Bluetooth, TCP seems to work better.

Unity 2018.3.6f1 (64-bit), I enabled the server capability in the manifest, and I still have this error