DashingDave
Posts: 1
Joined: Wed Jul 17, 2019 3:30 pm

I can't get the wpa_supplicant.conf to work

Wed Jul 17, 2019 4:03 pm

I need to be able to vnc my headless pi3B+ so that I can use the single keyboard and mouse that I own (which are connected to my Mac) to control the pi.

From the research I've been able to do/understand, I believe that to active the vnc server I need to use SSH to access the pi via Mac's Terminal application. And to access the pi via SSH, I need to pi to automatically log itself into my home's wireless network.

To that end, I've tried multiple ways of saving one text file as "wpa_supplicant.conf" and another text file as "ssh": saving them to my Mac's desktop and then dragging them to /boot/ on the SD flash drive, saving them directly to the /boot/ directory, saving the text files with different encodings (the TextEdit application defaults to UTF-8, but I've also read about people having to save it as a Windows file).... I was able to get the pi to automatically login to my home network once, last night, and I wrote down the steps I used afterwards. I tried those same steps today, and the pi boots with the menu bar symbol of two red "X"s in the spot where the wifi icon should appear.

So I'd like to ask: is there a certain way I should be putting these files into /boot/? Should I save them first to my Mac, and then copy them? Should I save them directly to /boot/? Should I use a format other than the unicode/UTF-8? Is Buster so new that the information I've researched is now out of date?

Here're the steps that I thought worked:
• flash disk image using Etcher
• mount BOOT to Mac desktop
• edit config.txt file to include code to make an LCD screen (that I don't want to ultimately use, but I need it to see what's happening on the pi's end) work
• create new document with TextEdit
• save to /boot/ as "ssh"
ssh.png
Saving as ssh
ssh.png (209.07 KiB) Viewed 399 times
• close file; create new document with TextEdit
• enter the following code:

Code: Select all

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

network={
     ssid=“EXAMPLE NETWORKNAME“
     psk=“examplenetworkpassword”
     key_mgmt=WPA-PSK
}
• save to /boot/ as "wpa_supplicant.conf"
wpa.png
Saving as wpa_supplicant.conf
wpa.png (246.01 KiB) Viewed 399 times
• quit TextEdit
• eject BOOT drive

Does that all appear as if it should work?

I'm using the 2019-07-10-raspbian-buster-full image file for the flash drive.

danjperron
Posts: 3382
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: I can't get the wpa_supplicant.conf to work

Wed Jul 17, 2019 7:16 pm

I had the same thing Yesterday.

Removed the key_mgmt and put the country on the first line.

Code: Select all

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

network={
    ssid="NETWORK-NAME"
    psk="NETWORK-PASSWORD"
}

Set your country, essid and password and save it.


I also go some disconnections time to time and I fixed it by disabling the wpa_supplicant from systemD.

Two wpa_supplicant applications running in the same times and I think they conflict each other.

if you do

Code: Select all

pi@pi3plus:~ $ ps -ef | grep wpa_supplicant
root       385     1  0 jui12 ?        00:00:02 /sbin/wpa_supplicant -u -s -O /run/wpa_supplicant
root       458     1  0 jui12 ?        00:01:19 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -Dnl80211,wext
pi        3579  3567  0 15:06 pts/1    00:00:00 grep --color=auto wpa_supplicant


And you if get two processes, disable the first one and your wifi will be more stable.

Code: Select all

sudo systemctl stop wpa_supplicant
sudo systemctl disable wpa_supplicant
This is what I found from another post on the forum. Since I did that the wifi doesn't disconnect anymore.

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

Re: I can't get the wpa_supplicant.conf to work

Wed Jul 17, 2019 7:29 pm

Text editors on Mac OS default to changing straight quotes to curly quotes. You have to disable that in configuration settings.

danjperron wrote:
Wed Jul 17, 2019 7:16 pm
Removed the key_mgmt and put the country on the first line.
Neither one of those changes matter.
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?

jamesmyatt
Posts: 2
Joined: Wed Nov 19, 2014 6:13 pm

Re: I can't get the wpa_supplicant.conf to work

Wed Jul 17, 2019 10:58 pm

I have exactly the same issue on my Raspberry Pi B+ using an RTL8188ETV USB dongle. A clean Buster-lite (2019-06-20 or 2019-07-10) SD card works as expected in a 3B+ using the built-in WiFi, but not on the B+. Stretch-lite (earlier install, but fully updated) also works fine on the B+.

Using Buster on the B+, the WiFi adapter seems to be working correctly since `iwlist` shows my WiFi network, so I assume it's something to do with wpa_supplicant. No idea what to try next though.

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

Re: I can't get the wpa_supplicant.conf to work

Thu Jul 18, 2019 3:28 pm

jamesmyatt wrote:
Wed Jul 17, 2019 10:58 pm
Using Buster on the B+, the WiFi adapter seems to be working correctly since `iwlist` shows my WiFi network, so I assume it's something to do with wpa_supplicant. No idea what to try next though.
Copy the wpa_supplicant.conf file from your Stretch card to your Buster card. If it still doesn't work, then it's a problem with the WiFi dongle.
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?

jamesmyatt
Posts: 2
Joined: Wed Nov 19, 2014 6:13 pm

Re: I can't get the wpa_supplicant.conf to work

Thu Jul 18, 2019 10:59 pm

HawaiianPi wrote:
Thu Jul 18, 2019 3:28 pm
jamesmyatt wrote:
Wed Jul 17, 2019 10:58 pm
Using Buster on the B+, the WiFi adapter seems to be working correctly since `iwlist` shows my WiFi network, so I assume it's something to do with wpa_supplicant. No idea what to try next though.
Copy the wpa_supplicant.conf file from your Stretch card to your Buster card. If it still doesn't work, then it's a problem with the WiFi dongle.
It is the same file.

The problem is with the wifi adapter. I found that my other ones use the RT5370 chipset, which worked fine with Buster.

I assume that the issue is a specific incompatibility between the version of wpa_supplicant in Buster and the RTL8188 chipset, since it can see the network in Buster and it works fine in Stretch.

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

Re: I can't get the wpa_supplicant.conf to work

Thu Jul 18, 2019 11:51 pm

jamesmyatt wrote:
Thu Jul 18, 2019 10:59 pm
HawaiianPi wrote:
Thu Jul 18, 2019 3:28 pm
jamesmyatt wrote:
Wed Jul 17, 2019 10:58 pm
Using Buster on the B+, the WiFi adapter seems to be working correctly since `iwlist` shows my WiFi network, so I assume it's something to do with wpa_supplicant. No idea what to try next though.
Copy the wpa_supplicant.conf file from your Stretch card to your Buster card. If it still doesn't work, then it's a problem with the WiFi dongle.
It is the same file.

The problem is with the wifi adapter. I found that my other ones use the RT5370 chipset, which worked fine with Buster.

I assume that the issue is a specific incompatibility between the version of wpa_supplicant in Buster and the RTL8188 chipset, since it can see the network in Buster and it works fine in Stretch.
There is a problem with the r8188eu wifi driver in Buster. I am using a different version of the 8188eu driver that I compile myself and it works fine with my rtl8188 wifi with Buster, and all other versions of Raspbian on all the different Pi's I am running.

No problem with wpa_supplicant.conf as I am using the exact same one I was using with Stretch.


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

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

Return to “Troubleshooting”