glynhudson
Posts: 9
Joined: Fri Mar 18, 2016 12:35 am

Raspberry Pi 3B+ WiFi issues CONN_FAILED

Sun Jun 24, 2018 12:26 am

Hi, I'm having Wifi issues with a Raspberry Pi 3B+

I'm running a Stretch image upgraded from Jessie following this guide: http://baddotrobot.com/blog/2017/10/26/ ... o-stretch/

Everything is working great, apart from the WiFi.

This first issue is that I get the error:

Code: Select all

ctrl_iface exists and seems to be in use - cannot override it
Delete '/var/run/wpa_supplicant/wlan0' manually if it is not used anymore
Removing the socket file

Code: Select all

rm /var/run/wpa_supplicant/wlan0
then restarting the interface (ifdown wlan0 / ifup wlan0) bring up the WiFi and I'm able to scan for networks and connect to a network.

But after a short time the Pi disconnects from the network. Subsequent attempts to reconnect (ifdown wlan0 / ifup wlan0) result in the following errors:

Code: Select all

Jun 24 00:07:06 test wpa_supplicant[5869]: wlan0: Failed to initiate sched scan
Jun 24 00:07:09 test dhclient[5949]: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
Jun 24 00:07:13 test wpa_supplicant[5869]: wlan0: Failed to initiate sched scan
Jun 24 00:07:19 test dhclient[5949]: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15
Jun 24 00:07:21 test wpa_supplicant[5869]: wlan0: CTRL-EVENT-SSID-REENABLED id=1 ssid="Crumble"
Jun 24 00:07:21 test wpa_supplicant[5869]: wlan0: Trying to associate with 70:3a:cb:3a:b0:da (SSID='Crumble' freq=5180 MHz)
Jun 24 00:07:21 test wpa_supplicant[5869]: wlan0: Associated with 70:3a:cb:3a:b0:da
Jun 24 00:07:21 test wpa_supplicant[5869]: wlan0: CTRL-EVENT-DISCONNECTED bssid=70:3a:cb:3a:b0:da reason=0 locally_generated=1
Jun 24 00:07:21 test wpa_supplicant[5869]: wlan0: WPA: 4-Way Handshake failed - pre-shared key may be incorrect
Jun 24 00:07:21 test wpa_supplicant[5869]: wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=1 ssid="Crumble" auth_failures=3 duration=46 reason=WRONG_KEY
Jun 24 00:07:21 test wpa_supplicant[5869]: wlan0: CTRL-EVENT-SSID-TEMP-DISABLED id=1 ssid="Crumble" auth_failures=4 duration=77 reason=CONN_FAILED
Jun 24 00:07:21 test systemd-udevd[6630]: Process '/sbin/crda' failed with exit code 249.
Jun 24 00:07:21 test wpa_supplicant[5869]: wlan0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
Jun 24 00:07:21 test wpa_supplicant[5869]: wlan0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=GB
Jun 24 00:07:24 test wpa_supplicant[5869]: wlan0: Failed to initiate sched scan
Jun 24 00:07:34 test wpa_supplicant[5869]: wlan0: Failed to initiate sched scan
Jun 24 00:07:34 test dhclient[5949]: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
Jun 24 00:07:41 test wpa_supplicant[5869]: wlan0: Failed to initiate sched scan
Jun 24 00:07:44 test dhclient[5949]: No DHCPOFFERS received.
Jun 24 00:07:44 test dhclient[5949]: No working leases in persistent database - sleeping.
I'm certain the PSK is correct since it did connect successfully for a while my wpa_supplicant.conf looks like:

Code: Select all

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


network={
        ssid="myssid"
        #psk="xxxxxxx"
        psk=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
}
and /etc/network/interfaces

Code: Select all

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

iface eth0 inet manual

auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface wlan0 inet dhcp
How can I try and debug this issue further? I think it could be something to do with setting the country code since this is the main change since the RasPi 3B which was very reliable for WiFi . Thank you.

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Raspberry Pi 3B+ WiFi issues CONN_FAILED

Sun Jun 24, 2018 12:36 am

I will guess the upgrade from Jessie to Stretch didn't work as well as you expected. Have you tried a fresh install of Stretch?

glynhudson
Posts: 9
Joined: Fri Mar 18, 2016 12:35 am

Re: Raspberry Pi 3B+ WiFi issues CONN_FAILED

Sun Jun 24, 2018 1:08 am

No, not properly but I assume it will work well. It's important for my application that I get the upgraded image to work.

I will give the stock Jessie image a try, at least this will inform how wifi should work! The fact the wifi does initially connect indicates that it's *nearly* working on my upgraded image.

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Raspberry Pi 3B+ WiFi issues CONN_FAILED

Sun Jun 24, 2018 1:32 am

glynhudson wrote:
Sun Jun 24, 2018 1:08 am
I will give the stock Jessie image a try, at least this will inform how wifi should work! The fact the wifi does initially connect indicates that it's *nearly* working on my upgraded image.
I would recommend using the Stretch version. If you insist on using Jessie, you should look at this link.
https://raspberrypi.stackexchange.com/q ... rry-pi-3-b

glynhudson
Posts: 9
Joined: Fri Mar 18, 2016 12:35 am

Re: Raspberry Pi 3B+ WiFi issues CONN_FAILED

Sun Jun 24, 2018 2:33 am

Apologies I meant Stretch!

I've just made a breakthrough with the issue affecting my Jessie > Stretch upgraded image wifi issue

I noticed the following error in dmesg

Code: Select all

11.890225] brcmfmac: brcmf_cfg80211_add_iface: iface validation failed: err=-16
This made me suspect a wifi driver issue.

Removing the re-installing the wifi drivers has now fixed the issue, Wifi connects everytime reliably

Code: Select all

sudo apt remove firmware-brcm80211
sudo apt install firmware-brcm80211
It's now successfully showing in dmesg

Code: Select all

[   10.088270] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac43455-sdio.bin for chip 0x004345(17221) rev 0x000006
[   10.090076] usbcore: registered new interface driver brcmfmac
[   10.275276] random: crng init done
[   10.418569] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Feb 27 2018 03:15:32 version 7.45.154 (r684107 CY) FWID 01-4fbe0b04
[   10.419113] brcmfmac: brcmf_c_preinit_dcmds: CLM version = API: 12.2 Data: 9.10.105 Compiler: 1.29.4 ClmImport: 1.36.3 Creation: 2018-03-09 18:56:28 
You can mark this topic as resolved. Thanks for your help

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

Re: Raspberry Pi 3B+ WiFi issues CONN_FAILED

Sun Jun 24, 2018 11:10 am

glynhudson wrote:You can mark this topic as resolved.
Actually, you can do that. Go back to your first post in the thread, edit the title to include the tag "[Solved]". Job done :D
Signature retired

wonderworker
Posts: 1
Joined: Wed Jun 27, 2018 8:10 am

Re: Raspberry Pi 3B+ WiFi issues CONN_FAILED

Wed Jun 27, 2018 8:44 am

I have the same problem. And i don't really understand how they can break something every time when they want to improve it. this is my second Raspi 3B+ and i can not use it because of updates. solution is simple remove everything lose everything and install again stable version of Raspbian. and there is no easy way to understand how and when they are gonna fix it. Guys this is not a charity. I have spent lots of money for this and i want something in return something like my Raspi will work stable. nothing too much. just do something that we can work on again. and please dont tell me some bllsht do this do that have you ever tried wlan0 do that config open terminal and write these lines. bla bla. I have spent my last 3 weeks for this and nothing happens. I have 3 MicroSD cards 32 16 16 GB and i have all possible distro's and their combinations into Raspi I have 2 Raspi so i know how to do stuff this is not the way how i want it. if i pay for a product because of its label/brand i want something from that company. I don't really care who s gonna fix this issue but please be enthusiastic about your job and fix it. I have windows comp and Macbook pro i don't have any wifi issues when i update those systems. wifi god damn is the simplest thing in the world.

glynhudson
Posts: 9
Joined: Fri Mar 18, 2016 12:35 am

Re: Raspberry Pi 3B+ WiFi issues CONN_FAILED

Wed Jun 27, 2018 3:48 pm

You can mark this topic as resolved. Thanks for your help
The issue may not be as resolved as I thought. The issue seems to reappear after a reboot :-(

TimSmall
Posts: 5
Joined: Sat Jun 03, 2017 11:14 am

Re: Raspberry Pi 3B+ WiFi issues CONN_FAILED

Tue Nov 05, 2019 8:37 am

wonderworker wrote:wifi god damn is the simplest thing in the world
As a network administrator, who has also occasionally worked on Linux kernel wifi drivers, and the OpenWRT distribution, I respectfully beg to differ.

Return to “Troubleshooting”