1

I want to connect my raspberry pi to wi-fi and this wi-fi uses ip address. I use raspberry pi model 2 (B+), I have wi-fi dongle. How do I connect? I have connected to pi using ssh, and I'm only able to access the command line of pi and don't have access to it's GUI.

EDIT::

>> cat /etc/os-release

PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
  • 1
    What distro do you use? There are quite a lot of guides out there about configuring wireless from cli on various distros. Have you tried any of them? – Michael Daffin Sep 02 '16 at 10:00
  • Can you check the below answer and confirm if it works for you. Post if you are having any errors. – Varad A G Sep 02 '16 at 10:10
  • @VaradAG where do I specify the ip address of the wi-fi which I'm supposed to connect to? Moreover there is no password for the wi-fi acess, –  Sep 02 '16 at 10:11
  • no, not a static one, I have to change the proxy settings manually specifying the proxy hostname and proxy port –  Sep 02 '16 at 10:15
  • @kvmanohar looks like the one I posted would not help you to get the issue resolved. There is a example here http://raspberrypi.stackexchange.com/questions/37920/how-do-i-set-up-networking-wifi-static-ip/37921#37921. This should help – Varad A G Sep 02 '16 at 10:21

1 Answers1

1

The Raspberry Pi Foundation has a guide on setting up WiFi without a GUI.

To summarize:

Use the following to scan for available WiFi networks:

sudo iwlist wlan0 scan

This will bring up a list of available networks, make a note of the ssid of your network. Then open and edit the wpa-supplicant configuration file with:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Once open, add the following to the end of the file:

network={
ssid="The ssid"
psk="The router password"
}

The ssid is the network name you found earlier, the password is the normal WiFi password. You may need to reboot.

You can check that this is running:

ifconfig wlan0

There should be an IP address under inet addr.

Deleuze
  • 236
  • 2
  • 10