-
Notifications
You must be signed in to change notification settings - Fork 0
Internet Connection
This section covers different methods on how-to set up and connect to the internet on your Raspberry Pi.
Ethernet is the preferred and easiest method.
Requirements:
- Internet access (router)
- An Ethernet cable
Steps to connect:
- Make sure that your router is connected to the internet.
- Connect one (1) Ethernet cable end to your Raspberry Pi and the other end to your router.
- Access https://github.com/gitluis/rpi-cluster through the web browser.
- If page shows up, you have successfully connected your board to the internet.
- Done!
Troubleshooting:
Requirements:
- Internet access (router)
Steps to connect:
- If you are using the command-line interface, refer to the next section for details on how to set up WiFi through the command line.
- If you are using the Raspberry Pi Desktop or another Desktop Environment, you can set up wireless networking by going to the network icon at the right-hand end of the menu bar. See image reference here.
Troubleshooting:
- Refer to Raspberry Pi Foundation's wireless connectivity guide.
How-to configure WiFi Protected Access (WPA) based wireless network interfaces manually on Linux-based operating systems via the Command Line Interface (CLI).
- Run
sudo raspi-config
- Select the Network Options item from the menu
- Select Wi-fi option
- Set the network SSID and the passphrase for the network
If you do not know the SSID of the network, the next section details how to list all available networks prior to running raspi-config
command.
To scan and list all available WiFi networks along with other useful information, run the following command in a terminal window
sudo iwlist wlan0 scan
Retrieve the following information from your WiFi Network:
-
'ESSID:"testing"'
which is the name of the WiFi network -
'IE:IEEE 802.11i/WPA2 Version 1'
which is the authentication method that such network uses - The password for the wireless network (commonly found in the back of the router)
Try using raspi-config after writing down the network details. If raspi-config
fails to connect the Pi to the desired network, the next section covers how to manually add such network to the Pi and connect to it.
Create a wpa-supplicant
configuration file
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
Generate an encrypted pre-shared key (psk)
wpa_passphrase "<network ssid>" >> /etc/wpa_supplicant/wpa_supplicant.conf
Enter the network SSID and WPA password or keyphrase then hit Enter again.
Here is how wpa_supplicant.conf
should look like so far:
network={
ssid="network ssid"
psk="encrypted pre-shared key"
key_mgmt=WPA-PSK
}
Add the following information at the top of the wpa_supplicant.conf
file
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=<country-code-here>
Refer to en.wikipedia.org/wiki/ISO_3166-1 for your specific country code.
Re-configure the network interface
wpa_cli -i wlan0 reconfigure
Verify whether the Raspberry Pi has successfully connected to the internet using:
ifconfig wlan0
If inet addr
displays an IP address beside it, the Raspberry PI is connected to the internet. Otherwise, please refer to the Raspberry Pi Foundation's guide on how to connect to WiFi via command line.