Skip to main content
Version: 12 Dec 2024

Advanced Usage for Remote Rendering

This guide covers advanced usage scenarios for users who prefer more control over Remote Rendering by bypassing the Magic Leap Hub and managing the system directly via command-line tools.

info

The steps use the Android Device Bridge (adb). Adding adb to your computer’s PATH variable simplifies runnning these scripts. Learn more about installing ADB on your computer by reading our Installing Android Device Setup guide.

Bypassing the Magic Leap Hub

While the Magic Leap Hub is the primary interface for managing Remote Rendering, some users may prefer managing it through the command line for greater flexibility. This section explains how to bypass the Hub, manually install the Remote Viewer, and perform pairing and diagnostic tasks.

Manually Managing the Remote Rendering Service

Users can manually start or stop the Remote Rendering service through the Windows Services interface or by using the command line.

caution

Only one instance of the Remote Rendering service can run at a time. If the service is already running, you must stop it before starting another instance.

Managing the Remote Rendering Service with Windows Services

You can start or stop the Remote Rendering service through the Windows Services interface, which provides a graphical method for managing system services.

Opening Windows Services

  1. Press Win + R to open the Run dialog.
  2. In the Run dialog, type services.msc, then press Enter.

Start / Stop Magic Leap Remote Rendering Service

  1. In the Services window, scroll down and locate MagicLeap Remote Rendering Service.
info

The service name may include a unique suffix, but it will always begin with MagicLeap Remote Rendering.

  1. Right-click the service name:
    • To start the service, select Start.
    • To stop the service, select Stop.

Downloading and Installing the Remote Viewer APK

The Remote Viewer APK is automatically downloaded by the Magic Leap Hub during installation of the Remote Rendering package. By default, the APK is saved in the following directory:

~/MagicLeap/tools/remote_render/VERSION/ml_remote_viewer.apk

To install the APK manually via ADB, use the following command:

adb install ~/MagicLeap/tools/remote_render/VERSION/ml_remote_viewer.apk

Installing Older Versions of the Remote Viewer

If you need to install an older version of the Remote Viewer, you must first uninstall the current version. Be aware that different versions of Remote Rendering are tested against specific Magic Leap OS versions, so using mismatched versions may result in unexpected behavior.

Uninstall the current version:

adb uninstall com.magicleap.remote_viewer_app

Install the older version:

Use the same ADB install command, specifying the path to the older APK:

adb install <path-to-older-apk>
caution

Ensure that the older version of the Remote Viewer is compatible with your version of the Magic Leap OS and Remote Rendering to avoid compatibility issues.

Pairing the Remote Viewer via Command Line

Pairing the Remote Viewer can be accomplished using Android Intents. The pairing process is managed via the setup_viewer.exe included in the Remote Rendering installation. This tool provides several pairing options.

Running the Setup Viewer Utility

The setup_viewer.exe utility is located in the following directory:

C:\Program Files\Magic Leap Remote Rendering\bin\setup_viewer.exe

Run the utility with the --help argument to view all available options:

C:\Program Files\Magic Leap Remote Rendering\bin\setup_viewer.exe --help

Key Command-Line Options:

Here are some key options you can use with the setup_viewer.exe utility for pairing your ML2 device:

  • --mode {adb, qr}
    Specifies the pairing method:

    • adb: Pairs the ML2 device directly via ADB (if available).
    • qr: Generates a QR code for pairing, similar to the Magic Leap Hub's method.

    Example:

    C:\Program Files\Magic Leap Remote Rendering\bin\setup_viewer.exe --mode qr
note

If no mode is specified, the tool defaults to pairing via ADB. All pairing methods generate a secure pairing code that is valid for 5 minutes. The Magic Leap Hub automatically regenerates this code if needed.

  • --ip {IP address}
    Overrides the auto-discovery of the host IP address. This is useful if auto-discovery fails or if you need to manually specify the host’s IP address.

    Example:

    C:\Program Files\Magic Leap Remote Rendering\bin\setup_viewer.exe --ip 192.168.1.100
  • --print_launch_args
    Outputs the pairing intents used during the process. This can be helpful if you are managing multiple PCs, where one PC hosts the Remote Rendering service, and another connects to the ML2 via ADB.

    Example:

    C:\Program Files\Magic Leap Remote Rendering\bin\setup_viewer.exe --print_launch_args

Querying Remote Rendering Service Status

The mlrrc.exe tool, also included in the Remote Rendering installation, can be used to query the current status of the Remote Rendering service. This tool provides insight into whether the ML2 device is currently connected to the Remote Rendering service and other key information.

Running the mlrrc.exe Tool

The mlrrc.exe tool is located at:

C:\Program Files\Magic Leap Remote Rendering\bin\mlrrc.exe

Common Commands

  • Check device connection status:

    C:\Program Files\Magic Leap Remote Rendering\bin\mlrrc.exe device

    This command provides feedback on whether an ML2 device is currently connected to the Remote Rendering service.

  • Other commands: Use the --help flag to explore additional commands and options:

    C:\Program Files\Magic Leap Remote Rendering\bin\mlrrc.exe --help