-1

I am running into this issue where I have to run the same command every single time and I need to constantly have the window where I ran the command running to make sure the WiFi is connected.

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

Using the network settings does not work.

Details about my device:

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
yudhiesh
  • 99
  • 2
  • What power supplier are you using? WiFi has been very susceptible to cheap power chargers since the 3B boards. Best to be using a true Pi supply rather than anything else rated at the voltage and current. –  Nov 30 '20 at 10:32
  • How do you know you need to do this "to make sure the WiFi is connected" It works for everyone else. What is the ACTUAL problem that doesn't work. My multiple Pi (I only have 3 running at the moment) run for months, despite power outages. – Milliways Nov 30 '20 at 10:55
  • @Andyroo I am using the official power supply that came with the raspberry pi. – yudhiesh Nov 30 '20 at 12:10
  • @Milliways I am wondering why I have to run the same command everytime I shut off the raspberry pi and want to use the wifi. If I do not run ```sudo wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0``` when I boot the raspberry pi it will not work. – yudhiesh Nov 30 '20 at 12:12
  • You should describe what you did to configure the WiFi. Without having knowledge about the process its incredibly hard to guess what went wrong in the process! For example have you followed the official guide ? https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md And I guess that this is the reason for why you got an minus vote. – Mats Karlsson Dec 01 '20 at 07:29
  • @MatsKarlsson yes I followed this exact tutorial to setup the wifi. – yudhiesh Dec 01 '20 at 13:08

2 Answers2

0

I managed to fix the issue, the error was in wpa_supplicant.conf.

It should be this for Raspbian Buster:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network={
    ssid="YOUR_NETWORK_NAME"
    psk="YOUR_PASSWORD"
    key_mgmt=WPA-PSK
}

Instead I had it set to :

network={
    ssid="YOUR_NETWORK_NAME"
    psk="YOUR_PASSWORD"
}
yudhiesh
  • 99
  • 2
  • Then there is something wrong with your installation. As documented at [Setting up a wireless LAN via the command line](https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md) it must run without `key_mgmt=WPA-PSK`. You should fix your installation. It may cause other issues. – Ingo Nov 30 '20 at 21:43
  • Neither of these is "correct"! See [How to set up networking/WiFi](https://raspberrypi.stackexchange.com/a/37921/8697) – Milliways Nov 30 '20 at 22:39
  • @Ingo how can I do a proper installation? – yudhiesh Dec 01 '20 at 04:41
  • @Milliways thank you will have a look. – yudhiesh Dec 01 '20 at 04:41
  • @yudhiesh start with a fresh flashed Raspberry Pi OS and follow the link I have given in my comment. – Ingo Dec 01 '20 at 11:08
0

to me it is broke on every raspberry pi 4 qty(4+), with any power supply I use. I plug in a wifi dongle, boom I'm connected. raspberry pi 4 wifi in US on 2.4ghz band is fubar. Think I can setup a 5ghz ap, but that is not the issue, I'm getting

server wpa_supplicant[2648]: wlp8s0f3u3: AP-STA-POSSIBLE-PSK-MISMATCH dc:a6:32:20:e3:4a server wpa_supplicant[2648]: wlp8s0f3u3: AP-STA-POSSIBLE-PSK-MISMATCH dc:a6:32:69:18:c4 To me this says pi is not xmitting the passphrase correctly via the onboard wifi.