0

I have a raspberry pi 4 running raspberry pi os lite(headless). I have a wifi dongle attached to the pi for a better wifi signal (wlan1) as the built-in one was giving me issues, but I couldn't get wlan0 to connect to the network either. I'm using wpa_supplicant which worked perfect at my house but the location I'm at now has a hidden ssid and that seems to be the issue.

Ive tried using scan_ssid=1 which I thought would be the solution but it just didn't connect witch I thought to be very odd. I've tried adding a bunch of other options to get it to work such as 'proto', 'key_mgmt', 'pairwise' etc.

If I use sudo raspi-config to change the wifi network I get the error 'Could not communicate with wpa_supplicant' and 'There was an error running option N2 Wireless LAN'

here is the network configuration in /etc/wpa_supplicant...

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

network={ ssid="Hidden_Network" scan_ssid=1 psk="password" key_mgmt=WPA-PSK }

output of 'ipa && ipr'

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether b8:27:eb:bd:b8:c5 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.100/8 brd 10.255.255.255 scope global noprefixroute eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::fb4:fdb9:f917:c380/64 scope link 
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
    link/ether b8:27:eb:e8:ed:90 brd ff:ff:ff:ff:ff:ff
4: wlan1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 84:16:f9:1a:1e:2e brd ff:ff:ff:ff:ff:ff
10.0.0.0/8 dev eth0 proto dhcp scope link src 10.0.0.100 metric 202

added lines to /etc/dhcpcd.conf...

interface eth0
metric 202
static ip_address=10.0.0.100

denyinterfaces wlan0

interface wlan1 metric 302 static ip_address=172.16.0.62 static domain_name_servers=1.1.1.1 static routers=172.16.0.1

1 Answers1

1

Both wlan interfaces are DOWN. There is no connection problem with wpa_supplicant, it is an initialization problem of your interfaces. Because we can't see details about your installation I would suggest to flash a fresh Raspberry Pi OS Lite on a spare SD Card and follow to Setting up a Raspberry Pi headless or Setting up a wireless LAN via the command line. In the latter guide you also find a section to connect to a hidden network.

If you have the RasPi connected with its default settings using interface wlan0 then you should plug in your USB/WiFi dongle and disable the built-in interface with this option in /boot/config.txt:

dtoverlay=disable-wifi

provided you are using a RasPi version of 3B, 3B+, 3A+, 4B and Zero W. The dongle will then become wlan0. May be it works out of the box. Otherwise you would have to look first for the correct driver to the USB/WiFi dongle.

If you got it to run then you know how to configure your production installation.

Ingo
  • 42,961
  • 20
  • 87
  • 207