Connecting the Raspberry Pi to a Wi-Fi network is straight forward providing you have a compatible Wi-Fi adapter. If you do not have a compatible wireless adapter then you can purchased one below from Amazon.
To achieve this, a file called interfaces needs to be edited with the correct network information. What is the interfaces file?
The interfaces file holds the information required to give the Raspberry Pi access to the wireless network or a wired network. The file exists in /etc/network/ folder. Open a terminal window and enter the following. $ sudo nano /etc/network/interfaces Nano will load a file similar to this. —————————————– auto lo
iface lo inet loopback iface eth0 inet dhcp
allow-hotplug wlan0 auto wlan0 iface wlan0 inet dhcp wpa-ssid “YOUR_SSID” wpa-psk “YOUR-PASSWORD” —————————————– Edit the last two lines with your SSID and your password. Your SSID is the network ID that your Wi-Fi router is broadcasting. Note that your SSID and password need to appear in between the quotes. Save the file by pressing CTRL-X followed by Y to overwrite the file. To be sure that these changes take affect reboot your password by enter the following. Before continuing, a quick summary of the file is in order. The word auto is used to identify the physical interface files that will be brought on or offline. The lineauto wlan0 is an example of this. It will allow wlan0 to be shut down or brought back online when using commands or when the system boots up. The iface refers to the interface which is followed by eth0, eth1 or wlan0 etc ,depending on which device it is referencing. The inet dhcp is informing the raspberry pi that you require an IP address in order to access the network. Enter the following to restart the system. $ sudo reboot If you are still having problems connecting see the troubleshooting page on Raspberry Pi Wireless Network SetupIssues.
|