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.

Firewall on HoloLens

I am seeing strange behavior when trying to connect to a TCP port running on the HoloLens. It seems to only accept incoming connections on certain ports.

I wrote a UWP application that does the following:
listener = new StreamSocketListener();
listener.ConnectionReceived += OnConnection;
await listener.BindServiceNameAsync(PortTextBox.Text);

(Where the PortTextBox is an input field on the GUI.)

I have the proper capabilities set: Internet (client & server), Internet (client), Private Networks (client & server)

When the HoloLens listens on TCP port 9005, my laptop can successfully connect via Wifi.
However, if I try another port the HoloLens does not respond. (I've tried 4444, 9000, 9004.)
I ran Wireshark, and see the TCP SYN sent from my laptop, but no response from the HoloLens.

It seems like there is a Firewall running on the HoloLens that does a "drop" rather than a "reject" for unallowed ports.

Has anyone else experienced this issue?



  • I'm not personally familiar with this issue but I did some research. You're not the first person to report such a problem, though for the other person it seemed to resolve itself.

    I also found a case where such an issue was reproduced by the team that owns the feature and they were going to look into it, but there was no response back.

    If you're still dealing with the issue it would be good to document which ports are working and which are not, and I could attempt to get that information into that team.

    Our Holographic world is here

    RoadToHolo.com      WikiHolo.net      @jbienz
    I work in Developer Experiences at Microsoft. My posts are based on my own experience and don't represent Microsoft or HoloLens.

  • I did some more investigating and have the following observations:

    1) The HoloLens does not seem to respond to pings at all (over WiFi)
    2) The HoloLens sometimes does not want to accept incoming TCP connections.
    3) When the HoloLens does accept incoming TCP connections, it can at least listen to TCP port 9000-9100.

    To remedy 2:

    • On my local machine, start a web server (python -m SimpleHTTPServer)
    • On the HoloLens, open up Edge and connect to the web server (mymachine:8000)
      After that, I can seem to reliably connect from my machine to the HoloLens.

    To determine 3:

    • Create a UWP app that listens on a range of TCP ports [code snippet below]
    • Run nmap (or nc), to connect to those ports

          private void StartListeners(int startPort, int endPort)
              for (int port = startPort; port <= endPort; port++)
          private async void CreateListener(int port)
              Debug.WriteLine("Listen on port: " + port);
              StreamSocketListener listener = new StreamSocketListener();
              listener.ConnectionReceived += OnConnection;
              await listener.BindServiceNameAsync(port.ToString());
          private async void OnConnection(
              StreamSocketListener sender,
              StreamSocketListenerConnectionReceivedEventArgs args)
              String statusMsg = "Received connection on port: " + args.Socket.Information.LocalPort;
  • Currently you need to enable the following capabilities in Package.appxmanifest:
    Private networks (Client and Server)
    Internet (Client and Server)
    Internet (Client)

    Now, the application should be able to connect to an any specified port.

Sign In or Register to comment.