pleriche
Posts: 90
Joined: Mon Oct 14, 2013 8:44 am

Fresh Stretch install - WiFi not working

Wed Jun 12, 2019 9:42 pm

I have an original Pi Model B which has been running Wheezy all this time, connecting to WiFi with a USB dongle (RTL5370) which I'm tryng to upgrade to Stretch.

I downloaded the latest Stretch (with desktop but without recommended software) and copied it to a fresh SDCard. To /boot I wrote a file ssh and a wpa_supplicant.conf file containing a copy of the wpa_supplicant.conf from my Wheezy installation.

I booted it up but it didn't connect to WiFi so I had to pull the plug. So I connected a screen and keyboard/mouse to see what was going on, and plugged in an ethernet cable. On the next boot I got a desktop and ssh login but shortly after I got segmentation faults to anything I did. I reseated the SDCard and rebooted, and this time it seemed stable but still not connected to WiFi.

lsusb shows the dongle is being recognised.
lsmod shows the rt2800usb module loaded.
ifconfig shows wlan0 with a credible MAC address but not connected.
/etc/wpa_supplican/wpa_supplicant.conf contains what it should, in fact identical to the Wheezy vertion.
/etc/network/interfaces just contains a pointer to /etc/network/interfaces.d, which is empty.
/etc/dhcpcd.conf has no mention of wlan0 and only commented lines relating to eth0.

What gives?

User avatar
davidcoton
Posts: 4761
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Fresh Stretch install - WiFi not working

Wed Jun 12, 2019 10:13 pm

pleriche wrote:
Wed Jun 12, 2019 9:42 pm

/etc/wpa_supplican/wpa_supplicant.conf contains what it should, in fact identical to the Wheezy vertion.

What gives?
Since Wheezy, wpa_supplicant has aquired an extra line defining the country, so as to enforce regional rules on WiFi channels. Does your version contain that? It might help to post the contents (with the passcode redacted).
Signature retired

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

Re: Fresh Stretch install - WiFi not working

Wed Jun 12, 2019 10:26 pm

I have a USB WiFi dongle with that same chipset and it works on my Pi Zero and Pi 2B with the latest Raspbian Stretch with Desktop.

As suggested above, something may be wrong with your old wpa_supplicant.conf file. Mine looks like this.

Code: Select all

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

network={
	ssid="WiFi SSID"
	psk="WPA/WPA2 passphrase"
	key_mgmt=WPA-PSK
}
Edit country=, ssid= and psk= with your information and save the file.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

pleriche
Posts: 90
Joined: Mon Oct 14, 2013 8:44 am

Re: Fresh Stretch install - WiFi not working

Thu Jun 13, 2019 7:42 am

I do have the country line. In fact I didn't get the wpa_supplicant.conf from the old Wheezy system (as it was necessarily offline at the time!) but from a Pi 3 running Jessie. Here it is (redacted):

Code: Select all

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

network={
        ssid="AR9716_std"
        psk="***********"
        key_mgmt=WPA-PSK
        id_str="home"
}

network={
        ssid="BTBusinessHub-572"
        psk="*************"
        id_str="church"
}

network={
        ssid="Philip's iPhone 5S"
        psk="*************"
        key_mgmt=WPA-PSK
}

User avatar
B.Goode
Posts: 9819
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Fresh Stretch install - WiFi not working

Thu Jun 13, 2019 8:04 am

First line is incorrect.

ctrl_interface

MrEngman
Posts: 4016
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: Fresh Stretch install - WiFi not working

Thu Jun 13, 2019 8:05 am

There is a character "c" missing from the first line of the file which would cause your problem, but possibly it is a typo.


MrEngman
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

pleriche
Posts: 90
Joined: Mon Oct 14, 2013 8:44 am

Re: Fresh Stretch install - WiFi not working

Thu Jun 13, 2019 10:15 am

OK, thanks all. Simple problem: 1 character short when I selected the text to copy and paste.

As I aways say, there's no such thing as a hard problem - but some easy problems are hard to find.

Return to “Troubleshooting”