Just flashed a card with Raspbian Buster Lite on a Raspberry Pi 2, and ssh'd into it using an ethernet cable. raspi-config
/wpa_cli
can't communicate with wpa_supplicant
(there's no /var/run/wpa_supplicant
control interface).
At the end of the post I explain a workaround, but it's not permanent.
Here's some debugging information,
pi@raspberrypi:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.19.97-v7+ #1294 SMP Thu Jan 30 13:15:58 GMT 2020 armv7l GNU/Linux
pi@raspberrypi:~ $ ps aux | grep wpa
root 289 0.0 0.4 10740 3976 ? Ss may02 0:00 /sbin/wpa_supplicant -u -s -O /run/wpa_supplicant
pi 915 0.0 0.0 7356 496 pts/0 S+ 00:00 0:00 grep --color=auto wpa
pi@raspberrypi:~ $ sudo systemctl status wpa_supplicant.service
● wpa_supplicant.service - WPA supplicant
Loaded: loaded (/lib/systemd/system/wpa_supplicant.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2020-05-04 02:04:51 -03; 2min 50s ago
Main PID: 602 (wpa_supplicant)
Tasks: 1 (limit: 2200)
Memory: 496.0K
CGroup: /system.slice/wpa_supplicant.service
└─602 /sbin/wpa_supplicant -u -s -O /run/wpa_supplicant
may 04 02:04:51 raspberrypi systemd[1]: Starting WPA supplicant...
may 04 02:04:51 raspberrypi systemd[1]: Started WPA supplicant.
may 04 02:04:51 raspberrypi wpa_supplicant[602]: Successfully initialized wpa_supplicant
pi@raspberrypi:~ $ sudo cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
network={
ssid="****"
psk="****"
}
As you can see, I've only edited the config with network's ssid/psk after failing at raspi-config
.
Here's my usb wifi adapter / driver,
pi@raspberrypi:~ $ sudo lsusb -v
Bus 001 Device 004: ID 0bda:8179 Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0bda Realtek Semiconductor Corp.
idProduct 0x8179 RTL8188EUS 802.11n Wireless Network Adapter
bcdDevice 0.00
iManufacturer 1 Realtek
iProduct 2 802.11n NIC
iSerial 3 00E04C0001
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0027
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
can't get debug descriptor: Resource temporarily unavailable
Device Status: 0x0002
(Bus Powered)
Remote Wakeup Enabled
pi@raspberrypi:~ $ ip addr show wlan0
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 18:a6:f7:1d:36:90 brd ff:ff:ff:ff:ff:ff
pi@raspberrypi:~ $ cat /var/log/syslog
...
May 3 00:04:04 raspberrypi kernel: [ 8.225728] r8188eu: module is from the staging directory, the quality is unknown, you have been warned.
May 3 00:04:04 raspberrypi kernel: [ 8.324223] Chip Version Info: CHIP_8188E_Normal_Chip_TSMC_D_CUT_1T1R_RomVer(0)
May 3 00:04:04 raspberrypi kernel: [ 8.362213] usbcore: registered new interface driver r8188eu
May 3 00:04:04 raspberrypi kernel: [ 10.939312] random: crng init done
May 3 00:04:04 raspberrypi kernel: [ 10.939336] random: 7 urandom warning(s) missed due to ratelimiting
May 3 00:04:04 raspberrypi kernel: [ 11.394678] 8021q: 802.1Q VLAN Support v1.8
May 3 00:04:04 raspberrypi systemd[1]: Started triggerhappy global hotkey daemon.
May 3 00:04:04 raspberrypi systemd[1]: Started System Logging Service.
May 3 00:04:05 raspberrypi avahi-daemon[288]: Successfully called chroot().
May 3 00:04:05 raspberrypi avahi-daemon[288]: Successfully dropped remaining capabilities.
May 3 00:04:05 raspberrypi avahi-daemon[288]: No service file found in /etc/avahi/services.
May 3 00:04:05 raspberrypi avahi-daemon[288]: Network interface enumeration completed.
May 3 00:04:05 raspberrypi avahi-daemon[288]: Server startup complete. Host name is raspberrypi.local. Local service cookie is 2935413426.
May 3 00:04:05 raspberrypi wpa_supplicant[307]: Successfully initialized wpa_supplicant
May 3 00:04:05 raspberrypi systemd[1]: Started Login Service.
May 3 00:04:05 raspberrypi systemd[1]: Started Avahi mDNS/DNS-SD Stack.
May 3 00:04:05 raspberrypi systemd[1]: Started WPA supplicant.
May 3 00:04:05 raspberrypi raspi-config[313]: Checking if shift key is held down:Error opening '/dev/input/event*': No such file or directory
May 3 00:04:05 raspberrypi raspi-config[313]: No. Switching to ondemand scaling governor.
May 3 00:04:05 raspberrypi systemd[1]: Started LSB: Switch to ondemand cpu governor (unless shift key is pressed).
May 3 00:04:05 raspberrypi kernel: [ 11.661234] Adding 102396k swap on /var/swap. Priority:-2 extents:1 across:102396k SSFS
May 3 00:04:05 raspberrypi systemd[1]: Started dphys-swapfile - set up, mount/unmount, and delete a swap file.
May 3 00:04:05 raspberrypi dhcpcd[306]: eth0: waiting for carrier
May 3 00:04:05 raspberrypi kernel: [ 11.679881] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
May 3 00:04:05 raspberrypi dhcpcd[306]: wlan0: waiting for carrier
May 3 00:04:05 raspberrypi dhcpcd[306]: eth0: carrier acquired
May 3 00:04:05 raspberrypi kernel: [ 12.338131] MAC Address = 18:a6:f7:1d:36:90
May 3 00:04:05 raspberrypi kernel: [ 12.341657] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
...
After reading some posts, people seems to have issues with the driver, so tried with wext
,
pi@raspberrypi:~ $ sudo pkill wpa_supplicant
pi@raspberrypi:~ $ sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -D wext
Successfully initialized wpa_supplicant
rfkill: Cannot get wiphy information
ioctl[SIOCSIWAP]: Operation not permitted
ioctl[SIOCSIWENCODEEXT]: Invalid argument
ioctl[SIOCSIWENCODEEXT]: Invalid argument
pi@raspberrypi:~ $ ps aux | grep wpa
root 496 0.2 0.2 10996 2760 ? Ss 01:58 0:00 wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -D wext
That worked, and wlan0
went up, but I'm not sure how to keep it permanent for reboot, because it's not clear who is responsable for starting wpa_supplicant, dhcpcd
hooks (10-wpa_supplicant.conf
)? systemd
's wpa_supplicant dbus service?
According to ps aux
output, it's using the DBus service, and tried adding -Dwext
parameter on ExecStart
and rebooted but didn't work. It's like the default DBus version doesn't work. Is it expecting NetworkManager to be installed or something?
pi@raspberrypi:~ $ ps aux | grep wpa
root 321 0.2 0.4 10740 3972 ? Ss 01:56 0:00 /sbin/wpa_supplicant -u -s -O /run/wpa_supplicant -Dwext
When running wpa_supplicant using the default nl80211 I get this output,
pi@raspberrypi:~ $ sudo /sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -i wlan0
Successfully initialized wpa_supplicant
nl80211: Driver does not support authentication/association or connect commands
nl80211: deinit ifname=wlan0 disabled_11b_rates=0
wlan0: Failed to initialize driver interface
raspi-config
, right? I can't even do that because it fails communicating with wpa_supplicant control interface (there's no /var/run/wpa_supplicant created at boot). I had already set country code and rebooted and it doesn't matter, at least for my interface.dhcpcd
doesn't seem to start wlan0, whereas starting wpa_supplicant settingwext
driver manually does work. – soundblaster May 04 '20 at 13:53ls /sys/class/net
will show if there is a wireless interface - if not fiddling with other files is futile. – Milliways May 05 '20 at 00:45wpa_supplicant.conf
file and made no other changes. – Daniele Procida May 08 '21 at 09:16