Set up Jetson Wifi
This instruction will help you set up the Wifi via SSH. To be able to SSH into the device you need to be connected with an ethernet cable first. The your_username should in general be knightec, unless you have a special reason to set it up with some other username.
Step 1: SSH into Your Jetson
First, ensure you are connected to the Jetson via SSH over Ethernet:
ssh your_username@jetson_ip_address
Replace your_username with your actual username and jetson_ip_address with the IP address of the Jetson device.
Step 2: Identify Available Wi-Fi Networks
You can use the nmcli tool (NetworkManager CLI) to list available Wi-Fi networks:
nmcli device wifi list
This command will display a list of Wi-Fi networks (SSIDs) available in your area.
Step 3: Connect to a Wi-Fi Network
To connect to a Wi-Fi network, use the nmcli command with the network’s SSID and password:
sudo nmcli device wifi connect "Your_SSID" password "Your_WiFi_Password"
Replace Your_SSID with the name of the Wi-Fi network you want to connect to and Your_WiFi_Password with the network’s password.
If the connection is successful, nmcli will respond with a confirmation message.
Step 4: Verify the Wi-Fi Connection
To verify that you are connected to the Wi-Fi network, you can check the IP address assigned to the Wi-Fi interface:
nmcli device status
Look for the Wi-Fi interface (typically wlan0) and ensure it shows connected.
You can also use ifconfig or ip a to check the status of the Wi-Fi interface:
ifconfig wlan0
or
ip a show wlan0
This command should display the IP address assigned to the wlan0 interface if the connection is successful.
Step 5: Set Wi-Fi to Auto-Connect (Optional)
If you want the Jetson to automatically connect to this Wi-Fi network in the future, you can set the connection to auto-connect:
sudo nmcli connection modify "Your_SSID" connection.autoconnect yes
This will ensure that the Jetson will connect to the Wi-Fi network automatically whenever it is in range.
Network Manager
In order for autoconnect to work, your network manager config must be correct. First open the config file
sudo nano /etc/NetworkManager/NetworkManager.conf
Then look for managed= and make sure it's set to true.
This is an example of a NetworkManager.conf
[main]
plugins=ifupdown,keyfile
[ifupdown]
managed=true
[device]
wifi.scan-rand-mac-address=no
Summary
- SSH into the Jetson via Ethernet.
- Use
nmcli device wifi listto list available Wi-Fi networks. - Connect to a Wi-Fi network using
nmcli device wifi connect "Your_SSID" password "Your_WiFi_Password". - Verify the connection using
nmcli device statusorifconfig wlan0. - Optionally, set the connection to auto-connect with
nmcli connection modify "Your_SSID" connection.autoconnect yes.
These steps should allow you to connect your Jetson to a Wi-Fi network via the command line while you're connected over Ethernet.
Troubleshooting
On 5G routers there's some times an option to have two separate networks, 5G and 2.4G. ESP32 can only connect to 2.4G. These routers normally have smart connect so it changes the band automatically. If you want to force Jetson and ESP32 to use the same band, you can use the separate networks option. On some Realtek routers, you then have to switch the settings on the 2.4G network to legacy mode and deactivate b/g-protection.