flycast
Posts: 10
Joined: Mon Oct 23, 2017 1:51 am

WiFi not connecting - Pi 3

Fri Nov 03, 2017 1:46 pm

Using the latest Sketch - release date 2017-09-07
Fresh install.
I have followed the instruction here exactly...
https://www.raspberrypi.org/documentati ... ess-cli.md
No avail...
Don't know if the Wifi is not turning on, not connecting or some other issue.
I am absolutely positive I have the SSID and pw correct.
Any help would be greatly appreciated.

pcmanbob
Posts: 2582
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: WiFi not connecting - Pi 3

Fri Nov 03, 2017 3:32 pm

If you are using raspbian stretch then the entries in wpa_supplicant.conf have changed form what is show in your linked web page.

it should now look like this.

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=GB

network={
	ssid="SSID here"
	psk="password here"
	key_mgmt=WPA-PSK
}
you may need to change
country and key_mgmt if these settings do not match your network.
Please only ask questions in the forum I will not answer questions sent to me directly via PM
Remember we want information.......................no information no help

flycast
Posts: 10
Joined: Mon Oct 23, 2017 1:51 am

Re: WiFi not connecting - Pi 3

Fri Nov 03, 2017 4:46 pm

Perfect! I did change the country to US...not surf if that helped.

Now...who keeps the web page up to date that I reference? Is that the correct web page for RP3?

User avatar
HawaiianPi
Posts: 1517
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: WiFi not connecting - Pi 3

Fri Nov 03, 2017 7:04 pm

flycast wrote:
Fri Nov 03, 2017 4:46 pm
Perfect! I did change the country to US...not surf if that helped.

Now...who keeps the web page up to date that I reference? Is that the correct web page for RP3?
There is nothing wrong with the guide. Note that it says,
Go to the bottom of the file and add the following:

Code: Select all

network={
    ssid="testing"
    psk="testingPassword"
}
The default wpa_supplicant.conf file has the top 3 lines (ctrl_interface=...), but if you don't "Go to the bottom" and simply replace it with the network= section, it still worked in Jessie, but it does not work in Stretch. So if you follow the guide properly and add the network stuff below the default 3 lines, it works, (and should look like what pcmanbob posted above).

EDIT:
This is the procedure I use for setting up headless boot with SSH and wireless network. It works with Raspbian Jessie or Stretch, Desktop or Lite, and with the built-in WiFi on the Pi3, or a Raspbian compatible USB WiFi dongle on other models (tested on an old model B, Pi2 and Pi Zero). Everything is done before you boot the SD card, and can be done on a Windows or Mac computer which only has access to the small FAT32 boot partition of a Raspbian SD card.
  1. Grab the latest Raspbian image from https://www.raspberrypi.org/downloads/raspbian/
  2. Grab the Etcher software from https://etcher.io/
  3. Install Etcher and use it to write the Raspbian image to your SD card. You don't need to extract the image or format the card prior to writing. Just choose the Raspbian .zip, pick your SD card and write (if you have trouble, verify the SHA256 checksum of the download).
  4. Remove and reinsert the SD card so that your Windows or Mac PC can see the small FAT32 partition on the SD card.
  5. On that small partition, create a file with the name ssh (or ssh.txt).
  6. To connect to a wireless network, create another file on the FAT32 partition called wpa_supplicant.conf which has the following inside:

    Code: Select all

    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    country=US
    
    network={
    	ssid="Your network SSID"
    	psk="Your WPA/WPA2 security key"
    	key_mgmt=WPA-PSK
    }
  7. Edit country=, ssid= and psk= with your information and save the file.
  8. Safely eject the card from your PC and use it to boot the Pi.
If Raspbian finds an ssh file it will enable SSH and delete the file, and when it finds a wpa_supplicant.conf file, it will move it to its correct location and connect to your wireless network.
My password is the last 8 digits of Pi.

Cobb528491
Posts: 2
Joined: Mon Jan 01, 2018 5:22 pm

Re: WiFi not connecting - Pi 3

Tue Jan 02, 2018 11:40 pm

HawaiianPi wrote:
Fri Nov 03, 2017 7:04 pm
flycast wrote:
Fri Nov 03, 2017 4:46 pm
Perfect! I did change the country to US...not surf if that helped.

Now...who keeps the web page up to date that I reference? Is that the correct web page for RP3?
There is nothing wrong with the guide. Note that it says,
Go to the bottom of the file and add the following:

Code: Select all

network={
    ssid="testing"
    psk="testingPassword"
}
The default wpa_supplicant.conf file has the top 3 lines (ctrl_interface=...), but if you don't "Go to the bottom" and simply replace it with the network= section, it still worked in Jessie, but it does not work in Stretch. So if you follow the guide properly and add the network stuff below the default 3 lines, it works, (and should look like what pcmanbob posted above).

EDIT:
This is the procedure I use for setting up headless boot with SSH and wireless network. It works with Raspbian Jessie or Stretch, Desktop or Lite, and with the built-in WiFi on the Pi3, or a Raspbian compatible USB WiFi dongle on other models (tested on an old model B, Pi2 and Pi Zero). Everything is done before you boot the SD card, and can be done on a Windows or Mac computer which only has access to the small FAT32 boot partition of a Raspbian SD card.
  1. Grab the latest Raspbian image from https://www.raspberrypi.org/downloads/raspbian/
  2. Grab the Etcher software from https://etcher.io/
  3. Install Etcher and use it to write the Raspbian image to your SD card. You don't need to extract the image or format the card prior to writing. Just choose the Raspbian .zip, pick your SD card and write (if you have trouble, verify the SHA256 checksum of the download).
  4. Remove and reinsert the SD card so that your Windows or Mac PC can see the small FAT32 partition on the SD card.
  5. On that small partition, create a file with the name ssh (or ssh.txt).
  6. To connect to a wireless network, create another file on the FAT32 partition called wpa_supplicant.conf which has the following inside:

    Code: Select all

    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    country=US
    
    network={
    	ssid="Your network SSID"
    	psk="Your WPA/WPA2 security key"
    	key_mgmt=WPA-PSK
    }
  7. Edit country=, ssid= and psk= with your information and save the file.
  8. Safely eject the card from your PC and use it to boot the Pi.
If Raspbian finds an ssh file it will enable SSH and delete the file, and when it finds a wpa_supplicant.conf file, it will move it to its correct location and connect to your wireless network.
I have followed your instructions to a T, and the pi doesn't connect via wifi. I plugged in my ethernet cable, and was able to successfully ssh into it via my mac. Following that I checked the contents of my wpa_supplicant.conf file and it appears to have been moved to the right directory (etc/wpa_supplicant), and its content is the one I've originally created in the boot directory of the SD card with my country code, ssid and password. What do you think could be the problem here?

User avatar
HawaiianPi
Posts: 1517
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: WiFi not connecting - Pi 3

Wed Jan 03, 2018 10:18 pm

Cobb528491 wrote:
Tue Jan 02, 2018 11:40 pm
I have followed your instructions to a T, and the pi doesn't connect via wifi. I plugged in my ethernet cable, and was able to successfully ssh into it via my mac. Following that I checked the contents of my wpa_supplicant.conf file and it appears to have been moved to the right directory (etc/wpa_supplicant), and its content is the one I've originally created in the boot directory of the SD card with my country code, ssid and password. What do you think could be the problem here?
My guesses would be:
Something in your router settings, like MAC address filtering or other security, encryption settings (hopefully you're not still using WEP).
Your wpa_supplicant.conf file was not created by a pure text editor and has some embedded control characters that made it invalid.
Bad image or image write. Did you use Etcher? Did you verify the SHA256 hash of your download against the one published on the download page?
My password is the last 8 digits of Pi.

Return to “General discussion”

Who is online

Users browsing this forum: Bing [Bot], caracteriel, pepeEL and 45 guests