Tuesday 23 July 2013

How to Setup Wi-Fi On Your Raspberry Pi via the Command Line?

Description


In case, you are a Raspberry Pi enthusiast then you should configure your Raspberry Pi for remote access. With this tutorial, you can remotely connect to your Pi as well as activate a Wi-Fi add-on dongle.


Solution:

For this, you need:

• 1 Raspberry Pi unit with Raspbian installed

• 1 Ethernet connection to Pi unit

• 1 Wi-Fi Dongle

For those who are not using Wi-Fi Dongle model, to purchase it USB Wi-Fi adapter section of the RPi wiki is very helpful. Also, check the configuration of the Wi-Fi node to which you intend to connect your Raspberry Pi unit.

Below are the steps to enable the Wi-Fi Dongle via the Terminal:

Power up the Raspberry Pi unit without the Wi-Fi dongle attached. Now, the only network device should be the onboard Ethernet NIC. Connect to your Pi via SSH to access a remote terminal prompt.

At the prompt, enter the following command:

sudo nano /etc/network/interfaces

In the nano text editor, you will see:

auto lo

iface lo inet loopback

iface eth0 inet dhcp

This is the basic configuration which governs your Pi’s Ethernet connect. To enable the Wi-Fi dongle, you need to add a bit. Use the arrow keys to move down below the existing entry and add the following lines:

allow-hotplug wlan0

iface wlan0 inet dhcp

wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

iface default inet dhcp

After annotated the file, press “CTRL+X” to save it and exit nano editor. Then at the prompt again, enter the following command- sudo nano /etc/wpa_supplicant/wpa_supplicant.conf.

If the content is present in the file, compare it to the following code. If the file is empty, you can use this code to populate it. Take note of the commented lines (indicated by the # marks) to reference which variable you should use based on your current Wi-Fi node configuration.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

update_config=1

network={

ssid="YOURSSID"

psk="YOURPASSWORD"

# Protocol type can be: RSN (for WP2) and WPA (for WPA1)

proto=WPA

# Key management type can be: WPA-PSK or WPA-EAP (Pre-Shared or Enterprise)

key_mgmt=WPA-PSK

# Pairwise can be CCMP or TKIP (for WPA2 or WPA1)

pairwise=TKIP

#Authorization option should be OPEN for both WPA1/WPA2 (in less commonly used are SHARED and LEAP)

auth_alg=OPEN

}

After performing the task of file editing, press “CTRL+X” for saving and exit the document. Now you can unplug the Ethernet cable and plug in the Wi-Fi dongle.

At the command prompt, enter the following command:

sudo reboot

After finishing rebooting, device automatically connect to the Wi-Fi node. Thus, this is the easy way to setup Wi-Fi on your Raspberry Pi. For more from the XpertCrewTM team, please follow us on Twitter @Techvedic or contact Techvedic’s computer support helpdesk, as per below contact-details:

U.S. +855-859-0057 (http://www.techvedic.com/ )

U.K. +800-635-0716 (http://www.techvedic.co.uk/ )

CA 1-855-749-5861 (http://www.techvedic.ca/)

AU 1-800-197-298 (http://www.techvedic.com.au/)



We would be more than happy to help you. We are available 24/7.

Keywords:
raspberry pi wireless, raspberry pi wifi, mobile wifi,wi-fi or wi-fi, wifi internet, setup wireless raspberry pi,setup wireless on raspberry pi, portable wifi, wifi card, usb wireless router, wifi for raspberry pi, wireless raspberry pi, how to setup your wifi, wireless router setup, linksys ,wireless router, wireless connection, wifi raspberry pi, wireless internet card, usb wireless internet, wi-fi network, raspberry pi with wifi,wireless internet for laptops, wifi on raspberry pi, best usb wifi for raspberry pi, wifi with raspberry pi set up wifi, wireless internet usb wifi gratis, how to get wireless internet, wifi finder, wireless modem, wireless internet, wifi providers, usb bluetooth,wifi pi,home wireless, network raspberry pi with wireless, free wireless internet, raspberry pi, wireless network, wifi connection wireless card, setup wifi on raspberry, pi wireless card for raspberry pi, best raspberry ,pi wifi, setup wifi raspberry pi, raspberry pi usb wifi, wifi on the gowireless, home network wipi raspberry pi, mifi


0 comments:

Post a Comment