Skip to main content
Version: 12 Dec 2024

Network Configurations

This guide provides detailed instructions for configuring your network to optimize and troubleshoot the performance of Remote Rendering with Magic Leap 2 (ML2). It includes recommendations for local network setup, using USB networking, and operating over the internet. Follow the steps below to ensure your network is set up correctly.

Local Network

By default, Remote Rendering operates over your local network. Ideally you will setup your network with the following:

  • A WiFi 6 router with a discrete 5GHz SSID
  • Your ML2 connected to the 5GHz SSID
  • Your PC connected to the router via ethernet

This configuration maximizes bandwidth and minimizes network latency, which is crucial for Remote Rendering performance. Other configurations are possible, but the key is to optimize bandwidth and reduce latency between your PC and the Magic Leap 2.

Bandwidth requirements

  • Bandwidth usage: Remote Rendering consumes between 2 Mbps and 20 Mbps during normal operation.
  • Dynamic adjustment: Bandwidth usage adjusts based on network conditions.
  • Low bandwidth impact: At very low bandwidths, image quality may degrade.
note

Remote Rendering includes mitigations to handle constrained networks and provide an acceptable experience even when ideal network conditions are not met.

Network Ports

Remote Rendering communicates using TCP and UDP traffic on ports 50051 and 50052. Upon installation, appropriate inbound rules are automatically configured in the Windows Firewall to allow this traffic.

Ensure these ports are not blocked by your network to maintain uninterrupted communication between your Magic Leap 2 and PC.

Verify That Your Network Allows Local Traffic

To ensure proper communication between your Magic Leap 2 and PC, verify that your network allows local traffic. Network setups, particularly in corporate or restricted environments, may block communication between local devices.

Testing Network Traffic

You can test if traffic between your Magic Leap 2 and PC is allowed by attempting to ping your PC’s IP address from your Magic Leap 2.

note

Some networks may block ping requests but still allow Remote Rendering traffic. While ping tests are not conclusive, they provide a quick initial check.

1. Identify your PC's IP address

  1. Open PowerShell on your PC.

  2. Run the following command:

    ipconfig
Example Output
Example Output
PS C:\Users\ebridgewater> ipconfig

Windows IP Configuration
Ethernet adapter Ethernet:

Connection-specific DNS Suffix . :
IPv6 Address. . . . . . . . . . . : 6417:afed:d04f:a914:26a6:9c9e:2537:928d
Temporary IPv6 Address. . . . . . : 25b3:9f97:0c82:a704:ae75:d870:c2dc:0157
Link-local IPv6 Address . . . . . : fe92:bcc2:7aca:a4f0:ee74:604b:7c19:6b54
IPv4 Address. . . . . . . . . . . : 92.83.36.160
Subnet Mask . . . . . . . . . . . : 255.255.255.0
  1. Locate your IPv4 Address in the output. For example:

    Ethernet adapter Ethernet:

    IPv4 Address. . . . . . . . . . . : 192.168.1.100

2. Ping your PC from the ML2

  1. Ensure that ADB (Android Debug Bridge) is set up and your Magic Leap 2 is connected. For setup instructions, see Set up the Android Debug Bridge (ADB).

  2. In PowerShell, run the following command, replacing 192.168.1.100 with your PC's IP address:

    adb shell ping -c 4 192.168.1.100
  3. Review the output:

    PING 192.168.1.100 (192.168.1.100) 56(84) bytes of data.
    64 bytes from 192.168.1.100: icmp_seq=1 ttl=128 time=1.69 ms
    64 bytes from 192.168.1.100: icmp_seq=2 ttl=128 time=1.71 ms
    64 bytes from 192.168.1.100: icmp_seq=3 ttl=128 time=1.68 ms
    64 bytes from 192.168.1.100: icmp_seq=4 ttl=128 time=1.70 ms

    --- 192.168.1.100 ping statistics ---
    4 packets transmitted, 4 received, 0% packet loss, time 3002ms
    rtt min/avg/max/mdev = 1.668/1.695/1.713/0.028 ms

Troubleshooting Network Connectivity

If you cannot ping your PC from your Magic Leap 2:

  • Check network settings: Ensure both devices are on the same subnet and network segment.
  • Disable client isolation: Client isolation prevents devices on the same network from communicating. Consult your network administrator to disable it.
  • Verify firewall settings: Ensure that firewalls on both your PC and network allow the necessary ports and protocols.
  • Consult IT support: If you're on a managed network, your IT department may need to adjust network policies.

Using Remote Rendering Over the Internet

Remote Rendering can operate over the internet if a performant UDP route is available between your Magic Leap 2 and PC, and your PC is exposed to the internet via port forwarding or other methods.

Requirements

  • Public IP address: Your PC must have a publicly accessible IP address or be reachable via port forwarding.
  • Open ports: Ports 50051 and 50052 must be open for both TCP and UDP traffic.
  • Low latency: Network latency should be minimized for optimal performance.
tip

If you are attempting to use Remote Rendering over the internet, it is especially important that your OpenXR application submit a valid depth layer, as detailed here. This allows our latency-mitigating reprojection to work optimally.

Setup steps

  1. Obtain public IP address:

  2. Configure port forwarding (if behind a router):

    • Access your router's configuration page.
    • Set up port forwarding for ports 50051 and 50052 to your PC's local IP address.
  3. Adjust firewall settings:

    • Ensure that your PC's firewall allows inbound traffic on ports 50051 and 50052 for both TCP and UDP.
  4. Specify the public IP address for pairing:

    • Use the setup_viewer.exe utility with the --ip argument:

      "C:\Program Files\Magic Leap Remote Rendering\bin\setup_viewer.exe" --ip <your.public.ip.address>

      Replace <your.public.ip.address> with your actual public IP.

    • Alternatively, set the MLRR_IP_OVERRIDE environment variable:

      [Environment]::SetEnvironmentVariable("MLRR_IP_OVERRIDE", "<your.public.ip.address>", "User")
  5. Pair your ML2 device:

    • Generate a new QR code with the updated IP address.
    • Use the ML2 device to scan the QR code and establish the connection.

Important considerations

  • Latency impact: Higher latency can degrade rendering performance and responsiveness.
  • Security measures: Ensure your PC has up-to-date security software and only necessary ports are open.
  • Depth layer submission: For optimal latency mitigation, your OpenXR application should submit a valid depth layer. See Remote Rendering OpenXR Depth.

Using USB Networking

For environments where Wi-Fi connectivity is unreliable or unavailable, USB networking provides an alternative. This can be achieved using either a USB-C to Ethernet adapter or a direct USB-C connection to the PC.

USB Ethernet Adapter

You can connect your Magic Leap 2 to a wired network using a compatible USB-C to Ethernet adapter.

Requirements

  • Compatible adapter: Use a USB-C to Ethernet adapter that enumerates as eth0 on Android. The Plugable USB 3.0 to Ethernet adapter is regularly tested and recommended.
  • Ethernet connection: Connect both your PC and Magic Leap 2 to the same router or network switch via Ethernet.

Using a USB Cable Directly via RNDIS

Alternatively, it is possible direct network connection between your Magic Leap 2 and PC using a USB-C cable by enabling RNDIS (Remote Network Driver Interface Specification) to establish a virtual network over the cable.

Setup steps

  1. Connect USB-C cable: Connect a USB-C cable between your ML2 device and your PC.

  2. Ensure ADB connectivity: Verify that ADB recognizes your ML2 device:

    adb devices

    You should see your device listed.

  3. Enable RNDIS on ML2: Run the following command to enable RNDIS:

    adb shell svc usb setFunctions rndis
  4. Configure network adapter on PC:

    • A new network adapter (e.g., "Remote NDIS Compatible Device") should appear.
    • Windows may automatically install drivers. If not, you may need to install them manually.
  5. Obtain IP addresses:

    • The PC and ML2 device will be assigned new IP addresses for the RNDIS connection.
    • Use ipconfig on your PC and adb shell ifconfig on the ML2 to find the IPs.
  6. Update pairing information:

    • Regenerate the QR code for pairing so it includes the new IP address.
    • Pair your ML2 device using the updated QR code.
info

Enabling RNDIS and regenerating pairing information must be repeated each time the USB cable is disconnected. If you generated a QR Code for Remote Render pairing, you must regenerate that QR code so that the new IP address is included.

Verify network connectivity

  • Ping your PC from ML2:

    adb shell ping -c 4 <PC_RNDIS_IP>
  • Ping ML2 from your PC:

    ping <ML2_RNDIS_IP>

Replace <PC_RNDIS_IP> and <ML2_RNDIS_IP> with the respective IP addresses obtained earlier.