How to set up wifi on Raspberry Pi 3

I wrote about how to install Ubuntu on Raspberry Pi 3 yesterday. It was simple. However, ask you can see, I was using wired network connection. Now, with the VNCSERVER and a few tools set up, I am ready to set up WIFI connection.

Log in as root

‘thomas’ was the super user account created during the installation. Despite of the super user status, I cannot directly add WIFI connection through Ubuntu Mate GUI. Instead, I need to login as root and start a new VNCSERVER as root. Here is how.

# login as root
sudo su

# create a password for root
passwd

# start vncserver
vncserver

Below is a screenshot:

create-root-password

Add WIFI connection as root

From another computer, using VNCVIEWR to view the Ubuntu desktop.

Under the system menu, there is an option to update network connections:

modify network connection on Raspberry Pi 3
modify network connection on Raspberry Pi 3

It opens a dialog box below:

modify network connection on Raspberry Pi 3
modify network connection on Raspberry Pi 3

Click on the “+Add” button to add a new connection

add WIFI connection on Raspberry Pi 3
add WIFI connection on Raspberry Pi 3

Enter WIFI SSID name, MAC address. In this case, my SSID is “ck2”

add WIFI connection on Raspberry Pi 3
add WIFI connection on Raspberry Pi 3

Set WIFI security and password

set WiFi security and password on Raspberry Pi 3
set WiFi security and password on Raspberry Pi 3

New WIFI connection is ready!

At this point, we can log out from root account. Next time, when a user (or super user)  logs in, the WIFI connection should be ready. No more wired connection is needed.

WIFI connection is added to Raspberry Pi 3
WIFI connection is added to Raspberry Pi 3

Note, if you unplug the Ethernet cable now, your VNC session won’t work. It is because the IP addresses are different between wired and WIFI.

For example, if you used ‘192.168.0.113:1’ to open VNC viewer before setting up WIFI, now, you should open ‘192.168.0.114:1’ in VNC viewer because the IP address for WIFI on Raspberry Pi 3 is 192.168.0.114.

two IP addresses for Raspberry Pi 3
two IP addresses for Raspberry Pi 3