You can connect your Magic Leap 2 to a wireless network via the on-device Network and Internet menu, or using ADB commands. The Network and Internet menu also allows you to connect your device to a VPN and setup private DNS.
Connecting to Wi-Fi
Connecting on Device
Open "Settings" in the app launcher. Select "Network & Internet".
Select the wireless network you're connecting to from the list. If a password is required, a virtual keyboard will pop up to enter your password with.
Connecting via ADB
You can configure Wi-Fi using Android Debug Bridge. Your Magic Leap 2 will need to be plugged in to your computer and turned on for these commands to work. You will also need Android Debug Bridge set up on your computer, for more information on setting up Android Debug Bridge, see our Developer Portal. To make sure your device is recognized, you can enter:
adb devices
To see a list of available commands, enter:
adb shell wifi-ml
in your command line interface.
Enabling and Disabling Wi-Fi
You can use the following commands to enable or disable Wi-Fi on your device:
adb shell wifi-ml set-wifi-enabled enabled
and
adb shell wifi-ml set-wifi-enabled disabled
Connecting to a Network
To connect to an open or WPA2-secured wireless network such as your home wifi, use the following template:
adb shell wifi-ml connect-network <SSID> <open|wpa2> <password>
Here's an example:
adb shell wifi-ml connect-network leaper-wifi wpa2 password123!
Connecting to an Enterprise Network
To connect to an enterprise network requiring a username and password, use the following template:
adb shell wifi-ml connect-enterprise-network <SSID> --eid <userid> --epw <password>
Here's an example:
adb shell wifi-ml connect-enterprise-network leaper-enterprise-wifi --eid customer_care --epw verysecurepassword123!
Finding Your MAC Address
Your can find your device's MAC address opening the Settings app. In the Settings app, scroll down and select "About device". On the screen that appears, you will see the "Wi-fi MAC Address" listed.
VPN
Edit or set up a VPN (Virtual Private Network).
Private DNS
Change the Private DNS settings. Your options are:
- Off - This disables any private DNS
- Automatic - Automatically use Private DNS if the current network supports it
- Private DNS provider hostname - Enter the hostname for the private DNS you wish to use