Search Unity

TCP connection with hololens works only in one way

Discussion in 'VR' started by Antah, Oct 21, 2017.

  1. Antah

    Antah

    Joined:
    Oct 21, 2017
    Posts:
    3
    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:
    https://docs.microsoft.com/en-us/windows/uwp/networking/sockets

    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:
    https://forums.hololens.com/discussion/7980/udp-communication-solved#latest

    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?
     
    JS_Richard likes this.
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Did you enable the server capability in the manifest?
     
  3. Antah

    Antah

    Joined:
    Oct 21, 2017
    Posts:
    3
    Yes, tried all combinations of enabling nothing, private network, internet client/server, all of them.
     
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    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.
     
  5. Antah

    Antah

    Joined:
    Oct 21, 2017
    Posts:
    3
    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.
     
  6. JW_123

    JW_123

    Joined:
    Jul 11, 2018
    Posts:
    2
    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.
     
    Last edited: Jul 29, 2018
    JS_Richard likes this.
  7. JS_Richard

    JS_Richard

    Joined:
    Apr 23, 2018
    Posts:
    3
    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.
     
  8. unity_tmTrLyCJHohNrw

    unity_tmTrLyCJHohNrw

    Joined:
    Dec 21, 2017
    Posts:
    4
    Unity 2018.3.6f1 (64-bit), I enabled the server capability in the manifest, and I still have this error