14

I have a new Pi 3 B+ and am running openplotter version of NOOBS. When I boot, WiFi doesn't show on the top right of the home screen. When I run raspi-config for Network Options and WiFi, I get

'Could not communicate with wpa_supplicant'

When I run iwconfig I get

pi@openplotter:~ $ sudo iwconfig

eth0      no wireless extensions.

lo        no wireless extensions.

wlan1     IEEE 802.11  Mode:Master  Tx-Power=31 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on

When I run ifconfig, I get

pi@openplotter:~ $ sudo ifconfig

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.50.226  netmask 255.255.255.0  broadcast 192.168.50.255
        inet6 fe80::ba27:ebff:fe3e:e651  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:3e:e6:51  txqueuelen 1000  (Ethernet)
        RX packets 443289  bytes 74664056 (71.2 MiB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 21257  bytes 2317306 (2.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 6593  bytes 1647054 (1.5 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6593  bytes 1647054 (1.5 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.10.10.1  netmask 255.255.255.0  broadcast 10.10.10.255
        inet6 fe80::ba27:ebff:fe6b:b304  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:6b:b3:04  txqueuelen 1000  (Ethernet)
        RX packets 184  bytes 12074 (11.7 KiB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 709  bytes 156809 (153.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

A feature of openplotter is that it establishes a WiFi hotspot when it is executed, so that is why I think you see that. Openplotter runs at boot time on this distribution. I can find that hotspot with my phone or tablet, and connect to it, but it shows that there is no internet available. I am running Rasbian OS, and I have upgraded. uname -a displays openplotter 4.14.79-v7+ #1159.

HELP !, please. I am obviously a newby here with little linux experience.Thanks in advance.

8
  • can you make the output readable? Commented Feb 13, 2019 at 4:49
  • Looks OK - what doesn’t work?
    – Milliways
    Commented Feb 13, 2019 at 5:42
  • When I execute raspi-config, and go to option N2, where I should see my WiFi environment, I get the message '
    – pander
    Commented Feb 13, 2019 at 6:01
  • sorry response is 'Could not communicate with wpa_supplicant'
    – pander
    Commented Feb 13, 2019 at 6:01
  • 1
    @pander All of this detail belongs in the question and if you had included this in the first place would have elicited a different response. Your expectation about what the OS would do is misguided. To achieve this you need to bridge interfaces.
    – Milliways
    Commented Feb 13, 2019 at 9:38

10 Answers 10

30

I found wpa_supplicant to be super confusing to work with until I figured out how to see its debug messages by running it manually.

sudo killall wpa_supplicant
sudo wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0

(Add a -d onto the end to make it verbose.)

Until I figured this out, it was complete voodoo. Once you get the config file right, reboot to get the normal daemon back, it should work normally.

1
  • This worked great. I had been pulling my hair out trying a ton of other stuff and this was it. I just ran it once and the wpa supplicant file automagically repaired itself.
    – Mac
    Commented Aug 11, 2020 at 1:20
7

O help, just found out here what went wrong. I've been having trouble with this too. The answer was inside this command:

sudo wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -d

I had placed the ssid and psk names between ' 'signs like ssid='my-network-ssid' Changing it to "my-network-ssid" made it work right away.

And besides: raspi-config refused to let me edit WiFi settings. After the change I could edit WiFi settings in raspi-config again.

Thanks for your help in this thread!

2

Modify wpa_supplicant file

If your output is Could not communicate with wpa_supplicant Then try and edit it.

Edit the wpa_supplicant.conf file

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Then add the following network information

network={
ssid="networkname"
psk="networkPassword"
}

See if you are then able to see the Networks on the top right of the display.

wireless connection

1
  • In my case the configuration was OK, but thanks for the tips, now I know where it can be added others wifi network's :) Commented May 22, 2021 at 23:48
2

This is a little weird but happened to me: just verify that there is a wpa_supplicant.conf file in /etc/wpa_supplicant/, I had deleted it and it was causing the problem.

2

if you trying to connect to a 5GHz network, you need to set the country code, so that the 5GHz networking can choose the correct frequency bands also for the latest version of Buster Raspberry Pi OS you need to add

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=<Insert 2 letter ISO 3166-1 country code here>
network={
ssid="YOUR_NETWORK_SSID"
psk="WIFI_PASSWORD"
}

Source : https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md

1
  • Adding the ctrl_interface, update_config, and country settings resolved my issue with the same error as the OP. I have a Raspberry Pi Zero W that I had not used since my provider pushed an update to my router that allowed devices to use 5GHz under the same SSID. These had previously been distinguished by having a "5G" appended to the 5GHz connection as a distinct network name. My Pi Zero W simply stopped connecting to WiFi after having been idle.
    – BalooRM
    Commented Dec 25, 2020 at 17:38
1

WiFi can be disabled in /etc/dhcpcd.conf. In my case, I had a

interface wlan0
        nohook wpa_supplicant

in /etc/dhcpcd.conf which I created during original installation following this answer.

If one wants to re-enable WiFi later, don't forget to remove these lines!

1

solution: This worked for me.

sudo rm /var/run/wpa_supplicant/wlan0
sudo reboot

P.S : Make sure you have already added your network credentials in /etc/wpa_supplicant.conf

0

SOLVED: Sorry, but I can't explain how I did it, because I started from scratch, followed all the instructions carefully, bought a new SD card, formatted it, loaded openplotter onto it. Booted the SD card, updated, upgraded, configured the WiFi for client only, no hotspot, attached and configured my USB GPS, loaded my charts, and everything works as advertised.

1
  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again months for months and others try to help you for nothing.
    – Ingo
    Commented Dec 13, 2019 at 21:38
0

For raspberry PI 3B+. Don't mess up with /etc/network/interface file. There is no use of it. Keep localization setting to US only. enter required info in /etc/wpa_supplicant/wpa_supplicant.conf. I am sure you are good to go. I have implement this successfully after trying all the solution provided here and there.

0

Also be aware that if you are trying to connect to a non-capable network - e.g., the wnic is unable to connect to N-type networks, this connection will also fail. Running the wpa_connect on the command line will give you most of the answers you need.

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