Page 1 of 1

Headless WLAN with Stretch, how?

Posted: Mon Aug 21, 2017 11:56 am
by Tinue
I have seen a number of threads related to Raspbian Stretch and networking. Despite having read all of them, I could not get a fresh SD card to connect to my WLAN and open up SSH.

With Jessie, an empty "ssh" file is required, and a properly set-up wpa_supplicant.conf file. Both go to the FAT partition of the SD card. This worked reliably since a few releases with both Raspbian and Raspbian Lite.

When I do the exact same thing with Stretch, the Raspberry Pi does not connect to the WLAN. At the moment I have no possibility to debug, because I have neither a display available, not an Ethernet connection. All I see is on the WLAN router: There is no Raspberry Pi associated after boot.

Does anyone know what exactly has to be done? If need be I could mount the SD card with Ubuntu and also do stuff in the ext4 partition.

Thanks! Martin

Re: Headless WLAN with Stretch, how?

Posted: Mon Aug 21, 2017 12:26 pm
by ShiftPlusOne
A little difficult without being able to connect in some other way. Serial? Enable persistent journalctl storage and then upload a tarball of /var/log/journal/?

It should (and it my case does), just work as it has with Jessie.

Re: Headless WLAN with Stretch, how?

Posted: Mon Aug 21, 2017 12:31 pm
by ShiftPlusOne
In light of this post:
viewtopic.php?f=28&t=191061&p=1200935#p1200929

What does your wpa_supplicant.conf look like?

Re: Headless WLAN with Stretch, how?

Posted: Mon Aug 21, 2017 12:35 pm
by Tinue
Thank you both! I'll give it a try. So far I don't have the "ctrl_interface=/var/run/wpa_supplicant" in my file.

Update: No success, unfortunately. This is my wpa_supplicant.conf:

Code: Select all

country=CH
ctrl_interface=/var/run/wpa_supplicant
network={
	ssid="myssid"
	psk="mypassword"
	key_mgmt=WPA-PSK
}

Re: Headless WLAN with Stretch, how?

Posted: Mon Aug 21, 2017 1:04 pm
by ShiftPlusOne
Try this:

Code: Select all

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

network={
	ssid="myssid"
	psk="mypassword"
	key_mgmt=WPA-PSK
}

Re: Headless WLAN with Stretch, how?

Posted: Mon Aug 21, 2017 1:09 pm
by mattmiller
There are many threads on this issue

This one seems to be a good one to follow and try out the solution

http://www.raspberrypi.org/forums/viewt ... 8&t=191061

Re: Headless WLAN with Stretch, how?

Posted: Mon Aug 21, 2017 1:33 pm
by Tinue
The extended version doesn't work either.

Actually, not even the simplest thing works: Fresh, unmodified SD card, plugged into a (different) Raspberry Pi 3, which has a working Ethernet connection. No IP Address is being fetched from the Apple Airport Extreme.

So, possibly the WLAN is not even the issue in my case.

Edit: Definitly not WLAN. I found an Adafruit HDMI Backpack LCD and connected it to the failing Pi. It's caught in a boot cycle:
- can't find /boot in fstab
and some more messages, then it reboots.

So, I guess I have to ask why the tried and tested way of creating an SD card no longer works:

Code: Select all

sudo sudo dd if=~/2017-08-16-raspbian-stretch.img of=/dev/rdisk4 bs=2m

Re: Headless WLAN with Stretch, how?

Posted: Mon Aug 21, 2017 2:17 pm
by B.Goode
So, I guess I have to ask why the tried and tested way of creating an SD card no longer works:
I can't explain why, but the Raspberry Pi Foundation now document the use of the conv=fsync option

https://www.raspberrypi.org/documentati ... s/linux.md

Re: Headless WLAN with Stretch, how?

Posted: Mon Aug 21, 2017 2:19 pm
by ShiftPlusOne
B.Goode wrote:
Mon Aug 21, 2017 2:17 pm
So, I guess I have to ask why the tried and tested way of creating an SD card no longer works:
I can't explain why, but the Raspberry Pi Foundation now document the use of the conv=fsync option

https://www.raspberrypi.org/documentati ... s/linux.md
conv=sync, on a mac.

Re: Headless WLAN with Stretch, how?

Posted: Mon Aug 21, 2017 2:28 pm
by B.Goode
To cover all the options, the 'landing page' for documentation on installing images is here: https://www.raspberrypi.org/documentati ... /README.md

Re: Headless WLAN with Stretch, how?

Posted: Mon Aug 21, 2017 2:30 pm
by Tinue
Thanks, I have seen this as well, and tried it: Same result.

To exclude more error possibilities I re-downloaded the image file, and compared it to the one I downloaded yesterday: They are different :oops:
This teaches me to always check the checksum of the download before using the file.

I am now starting all of my tests again, and will post the results once done.

Thanks for all of the help so far!

Re: Headless WLAN with Stretch, how?

Posted: Mon Aug 21, 2017 3:00 pm
by Tinue
Everything is fine now. The image boots, and the wpa_supplicant.conf works with this content:

Code: Select all

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

network={
	ssid="myssid"
	psk="mypassword"
}
Thanks again for all the help!

Re: Headless WLAN with Stretch, how?

Posted: Mon Aug 21, 2017 3:04 pm
by ShiftPlusOne
Phew, thanks.

Re: Headless WLAN with Stretch, how?

Posted: Mon Aug 21, 2017 5:58 pm
by elkberry
Does a "plain" wpa_supplicant.conf also works, one that only contains one or more network= blocks?

I'm asking because I also failed in preparing a fresh Stretch mSD for headless boot.

Re: Headless WLAN with Stretch, how?

Posted: Mon Aug 21, 2017 6:01 pm
by Tinue
From what I have read in other threads, this does not work anymore. But I have not tested this myself: I fixed the wpa_supplicant.conf file before I fixed the SD card itself, so by the time the Pi could boot, the rest of the headless configuration was already ok.