1

The wifi worked before the initial setup, but after reboot it stopped working.

raspi-config says no wireless interface found when trying to set up the wifi.

wpa_supplicant.conf states:

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

network={  
        ssid="myssid"  
        scan_ssid=1  
        psk="mypwd"  
        key_mgmt=WPA-PSK  
}

Checked the file /etc/network/interfaces and it states:

source-directory /etc/network/interfaces.d (this directory is empty when checking)
mapping wlan0
script /root/bin/map_iface (this directory is empty when checking)
source /boot/realtimepi-network.txt (this file does not exist)

It seems the wifi (wlan0) is not properly initialized at boot.

How can I solve this?

1
  • The scan_ssid=1 infers you have a hidden SSID - more trouble than they are worth esp with Pi boxes - change WLAN config to show SSID - no security benefit - sniffer can find them as devices transmit ssid in plain text on connection! The lines 'ssid' to 'key_mgmt' should be indented. If you used Notepad or File Editor etc then the file has CRLF at the end of each line. Delete the file and recreate with sudo nano /etc/wpa_supplicant.conf . Key_mgmt line I find redundant.
    – user115418
    Commented Sep 13, 2020 at 21:41

4 Answers 4

1

I assume you have installed Raspberry Pi Os Buster. If it's not buster, first download it from https://www.raspberrypi.org/downloads/ and try again.

Buster uses dhcpcd to enable detected WiFi interfaces. In particular, when a WiFi interface is found, dhcpcd will launch:

wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 -Dnl80211,wext

This is what enables raspi-config to edit the wpa_supplicant configuration.

However, if anything extra is added to /etc/network/interfaces, then dhcpcd will see it and it won't activate anything. You've reported these extra lines:

mapping wlan0
script /root/bin/map_iface (this directory is empty when checking)
source /boot/realtimepi-network.txt (this file does not exist)

This is enough to stop dhcpcd working. It also means you've done something to your configuration which you haven't told us about.

realtimepi-network.txt is used by https://github.com/guysoft/RealtimePi/ and so your question may be more appropriate as an issue there. This existing issue might help you find the solution to your problem:

https://github.com/guysoft/RealtimePi/issues/7

0

This is an issue with OpenMediaVault 5. It messes up the Wi-Fi after install... So far no fix as of 1/1/2021

0

Running sudo dhcpcd command helped - network settings were refreshed and connection established automatically after the command completes.

0

Instead of creating or editing wpa_supplicant.conf I tried to solve the problem using the following script in /etc/netplan/50-cloud-init.yaml:

network:
    ethernets:
        eth0:
            dhcp4: true
            optional: true
    version: 2
    wifis:
      wlan0:
        optional: true
        dhcp4: true
        access-points:
          "SSID":
            password: "<YOUR PASSWORD>" 

And make sure to submit the changes :

sudo netplan generate

sudo netplan apply

Now check if it is (wlan0) configured correctly and works fine networkctl: enter image description here

1

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