0

This is the first time I use my Raspberry Pi 3 with Raspbian Lite. Both my PC and the Rasp are on the same WPA2-personal network. I am trying to get an IP address for the Raspberry in order to SSH through PuTTy, but it's not being easy! The few things that I've been able to find out from reading different places are:

  • sudo ifconfig gives me what is shown in the picture:

shown in the picture

  • Cannot access /etc/network/interfaces

  • Can't ping the raspberry from the cmd on the PC

Note an easy start for me I must say!

0

Assuming that you are using sudo to attempt to read /etc/network/interfaces. Then the file appears to be missing. Check by trying to list the network folder

$ sudo ls -l /etc/network/

From the ifconfig output it's clear that your pi doesn't have an IP address on the wlan0 interface. Check the wpa_supplicant file. First check that it's present.

$ sudo ls -l /etc/wpa_supplicant/wpa_supplicant

If it is, then check the contents.

$ sudo cat /etc/wpa_supplicant/wpa_supplicant

Use the information from the documentation here https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md to configure it correctly.

At a minimum the file should contain the ssid of your access point and the pasword or pre-shared key. (normally at the end of the file) e.g.

network={
ssid="testing"
psk="testingPassword"
}

Once you are sure the configuration files are correct then try restarting the wlan0 interface.

$ sudo ifconfig wlan0 down
$ sudo ifconfig wlan0 up

Then run ifconfig again to display the connection status, it may take some time to obtain an address so be patient. (e.g. up to 1 minute but usually faster)

$ sudo ifconfig

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.