Connect Raspberry Pi To Wireless Network (Open/Hidden)

, , Leave a comment

Raspberry Pi is too much of wiring without a Wireless connectivity. To make it more automated, its recommended that you connect to a Wireless Network. This can be simply done in the LXTerminal of Raspbian OS for Raspberry Pi.

Common Steps

  1. Open LXTerminal in Raspberry Pi or connect to Raspberry Pi using SSH. I have connected via SSH using Ethernet connected to my Router.
  2. Update and upgrade the packages on your Raspberry Pi.
    sudo apt-get update
    sudo apt-get upgrade
  3. Execute both these commands separately and sit back and relax as this is going to take, somewhere around 10-15 minutes.

  4. Now we need to check whether we have the latest Raspberry Pi Bootloader?
    sudo apt-get install raspberrypi-bootloader
  5. Install WPA Supplicant
    sudo apt-get install wpasupplicant

Open Networks

  1. Open the Network Interfaces File
    sudo nano /etc/network/interfaces
  2. The contents of the Network Interfaces file should be as follows
    auto lo
    iface lo inet loopback
    iface eth0 inet dhcp
    auto wlan0
    allow-hotplug wlan0
    wpa-ssid "Your Wifi Network Name"
    wpa-psk "Wifi Password"

    Now press Ctrl+X, Y and then Enter.

  3. Reboot your Raspberry Pi and make sure you connect the Wifi adapter before rebooting.

Enjoy your Wireless RPi.

Hidden Networks

  1. Generate PSK value
    wpa_passphrase "Wifi Network Name" 'Password'
    Many a times double quotes causes issues, so try single quotes. Copy the PSK value and store it somewhere temporarily.
  2. Open the Network Interfaces File
    sudo nano /etc/network/interfaces
  3. The contents of the Network Interfaces file should be as follows
    auto lo
    iface lo inet loopback
    iface eth0 inet dhcp
    auto wlan0
    allow-hotplug wlan0
    iface wlan0 inet dhcp
    wpa-scan-ssid 1
    wpa-ap-scan 1
    wpa-key-mgmt WPA-PSK
    wpa-proto RSN WPA
    wpa-pairwise CCMP TKIP
    wpa-group CCMP TKIP
    wpa-ssid "Nayan 2.4"
    wpa-psk 69baed7678d76573deedc5c83a34ebbbcac0d522dcc46fc4c008bad2edda9368

    Make sure you modify the SSID and PSK value. Now press Ctrl+X, Y and then Enter.
  4. Reboot your Raspberry Pi and make sure you connect the Wifi adapter before rebooting.

Enjoy your Wireless RPi.

 

Leave a Reply

You must be login to post a comment. Log in now