Hello team,
Is there a specific way to enable a secondary wireless interface (via USB dongles) on DietPi in Raspberry Pi 4 B+?
I have a Alfa wireless card (AWUS036ACM, Mediatek) I’d like to use as main wireless interface, it’s recognized as wlan1.
I tried to add wlan1 configuration in interfaces.d, however the interface remains in down state.
Disabling the on-board wifi, caused by the loss of connectivity as I don’t have cable access (I have to remove dtoverlay=disable-wifi manually from SD config.txt to restore access.
Eventually, I would consider to keep both interfaces enabled.
Any hint or suggestion?
Thanks!
Can you share the configuration you did within interfaces.d
I was using the following:
Filename wlan1
# WiFi-USB
allow-hotplug wlan1
iface wlan1 inet dhcp
address 192.168.1.8
netmask 255.255.255.0
gateway 192.168.1.1
#dns-nameservers 192.168.1.99 172.31.0.2
pre-up iw dev wlan1 set power_save off
post-down iw dev wlan1 set power_save on
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
I also tried to specify SSID/PSK in wlan1 config, but no luck.
And what happens when you try to bring it up?
I see the following (basically no logs for wlan1):
root@DietPi:~# ifup wlan1
error: main exception: cannot find interfaces: wlan1
root@DietPi:~# cat /etc/network/interfaces.d/*
# WiFi-USB
allow-hotplug wlan1
iface wlan1 inet dhcp
#dns-nameservers 192.168.1.99 172.31.0.2
pre-up iw dev wlan1 set power_save off
post-down iw dev wlan1 set power_save on
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
root@DietPi:~#
---
Dec 19 10:21:59 DietPi dietpi-wifi-monitor.sh[298]: [ INFO ] DietPi-WiFi_Monitor | Detected wlan0 connection loss. Reconnecting...
Dec 19 10:22:00 DietPi wpa_supplicant[430]: wlan0: CTRL-EVENT-DISCONNECTED bssid=AP_MAC_ADDR reason=3 locally_generated=1
Dec 19 10:22:00 DietPi wpa_supplicant[430]: wlan0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=IT
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: 2024-12-19 10:22:00.581 ERROR (MainThread) [aiodhcpwatcher] Fatal error while processing dhcp packet: [Errno 100] Network is down
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: Traceback (most recent call last):
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: File "/usr/local/lib/python3.13/site-packages/aiodhcpwatcher/__init__.py", line 158, in _on_data
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: data = sock.recv()
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: File "/usr/local/lib/python3.13/site-packages/scapy/supersocket.py", line 205, in recv
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: cls, val, ts = self.recv_raw(x)
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: ~~~~~~~~~~~~~^^^
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: File "/usr/local/lib/python3.13/site-packages/scapy/arch/linux/__init__.py", line 286, in recv_raw
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: pkt, sa_ll, ts = self._recv_raw(self.ins, x)
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: ~~~~~~~~~~~~~~^^^^^^^^^^^^^
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: File "/usr/local/lib/python3.13/site-packages/scapy/supersocket.py", line 147, in _recv_raw
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: pkt, ancdata, flags, sa_ll = sock.recvmsg(x, flags_len)
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: ~~~~~~~~~~~~^^^^^^^^^^^^^^
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: OSError: [Errno 100] Network is down
Dec 19 10:22:00 DietPi dietpi-wifi-monitor.sh[23998]: error: wlan0 : wlan0: down cmd '/etc/network/if-down.d/wpasupplicant' failed: returned 1 (wpa_supplicant: unknown phase: "down"
Dec 19 10:22:00 DietPi dietpi-wifi-monitor.sh[23998]: )
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: 2024-12-19 10:22:00.649 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback None() (None)
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: Traceback (most recent call last):
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: self._context.run(self._callback, *self._args)
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: File "/usr/local/lib/python3.13/site-packages/aiodhcpwatcher/__init__.py", line 165, in _on_data
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: if data:
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: ^^^^
Dec 19 10:22:00 DietPi 57e4a70c9cdf[443]: UnboundLocalError: cannot access local variable 'data' where it is not associated with a value
Dec 19 10:22:02 DietPi wpa_supplicant[430]: p2p-dev-wlan0: CTRL-EVENT-DSCP-POLICY clear_all
Dec 19 10:22:02 DietPi wpa_supplicant[430]: p2p-dev-wlan0: CTRL-EVENT-DSCP-POLICY clear_all
Dec 19 10:22:02 DietPi wpa_supplicant[430]: nl80211: deinit ifname=p2p-dev-wlan0 disabled_11b_rates=0
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: Successfully initialized wpa_supplicant
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: kernel reports: Match already configured
Dec 19 10:22:02 DietPi kernel: brcmfmac: brcmf_cfg80211_set_power_mgmt: power save disabled
Dec 19 10:22:02 DietPi wpa_supplicant[430]: p2p-dev-wlan0: CTRL-EVENT-TERMINATING
Dec 19 10:22:02 DietPi wpa_supplicant[430]: wlan0: CTRL-EVENT-DSCP-POLICY clear_all
Dec 19 10:22:02 DietPi wpa_supplicant[430]: wlan0: CTRL-EVENT-DSCP-POLICY clear_all
Dec 19 10:22:02 DietPi wpa_supplicant[430]: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: ctrl_iface exists and seems to be in use - cannot override it
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: Delete '/run/wpa_supplicant/wlan0' manually if it is not used anymore
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: Failed to initialize control interface 'DIR=/run/wpa_supplicant GROUP=netdev'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.
Dec 19 10:22:02 DietPi wpa_supplicant[430]: wlan0: CTRL-EVENT-TERMINATING
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: wlan0: CTRL-EVENT-DSCP-POLICY clear_all
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: wlan0: CTRL-EVENT-DSCP-POLICY clear_all
Dec 19 10:22:02 DietPi wpa_supplicant[24036]: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Dec 19 10:22:03 DietPi dietpi-wifi-monitor.sh[24014]: error: wlan0 : wlan0: pre-up cmd '/etc/network/if-pre-up.d/wpasupplicant' failed: returned 1 (wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
Dec 19 10:22:03 DietPi dietpi-wifi-monitor.sh[24014]: )
Dec 19 10:22:03 DietPi dietpi-wifi-monitor.sh[298]: [ OK ] DietPi-WiFi_Monitor | Completed
Dec 19 10:22:13 DietPi dietpi-wifi-monitor.sh[24109]: [FAILED] DietPi-WiFi_Monitor | A default gateway on interface "wlan0" does not exist.
Dec 19 10:22:13 DietPi dietpi-wifi-monitor.sh[298]: [ INFO ] DietPi-WiFi_Monitor | Detected wlan0 connection loss. Reconnecting...
Dec 19 10:22:15 DietPi wpa_supplicant[24151]: Successfully initialized wpa_supplicant
Dec 19 10:22:15 DietPi kernel: brcmfmac: brcmf_cfg80211_set_power_mgmt: power save disabled
Dec 19 10:22:15 DietPi dietpi-wifi-monitor.sh[298]: [ OK ] DietPi-WiFi_Monitor | Completed
Dec 19 10:22:17 DietPi wpa_supplicant[24154]: MBO: Disable MBO/OCE due to misbehaving AP not having enabled PMF
Dec 19 10:22:17 DietPi wpa_supplicant[24154]: wlan0: Trying to associate with SSID 'SSID'
Dec 19 10:22:20 DietPi wpa_supplicant[24154]: wlan0: Associated with AP_MAC_ADDR
Dec 19 10:22:20 DietPi wpa_supplicant[24154]: MBO: Disable MBO/OCE due to misbehaving AP not having enabled PMF
Dec 19 10:22:20 DietPi wpa_supplicant[24154]: wlan0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
Dec 19 10:22:20 DietPi wpa_supplicant[24154]: wlan0: WPA: Key negotiation completed with AP_MAC_ADDR [PTK=CCMP GTK=CCMP]
Dec 19 10:22:20 DietPi wpa_supplicant[24154]: wlan0: CTRL-EVENT-CONNECTED - Connection to AP_MAC_ADDR completed [id=0 id_str=]
Dec 19 10:22:20 DietPi kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Dec 19 10:22:20 DietPi wpa_supplicant[24154]: wlan0: TRANSITION-DISABLE 01
Dec 19 10:22:21 DietPi wpa_supplicant[24154]: RRM: Ignoring radio measurement request: Not RRM network
Dec 19 10:22:31 DietPi wpa_supplicant[24154]: RRM: Ignoring radio measurement request: Not RRM network
Dec 19 10:22:41 DietPi wpa_supplicant[24154]: RRM: Ignoring radio measurement request: Not RRM network
Dec 19 10:22:51 DietPi wpa_supplicant[24154]: RRM: Ignoring radio measurement request: Not RRM network
root@DietPi:~# lsusb
Bus 002 Device 002: ID 0e8d:7612 MediaTek Inc. MT7612U 802.11a/b/g/n/ac Wireless Adapter
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@DietPi:~# ifconfig wlan1; iwconfig wlan1
wlan1: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether USB_MAC_ADDR txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan1 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=3 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:on
I think you need to add auto wlan1
to your interface config, otherwise ifup can not find it.
Can you also share:
lsusb
ip link show
dmesg | grep wlan1
No output for dmesg | grep wlan1.
4: wlan1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 00:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
root@DietPi:~# lsusb
Bus 002 Device 002: ID 0e8d:7612 MediaTek Inc. MT7612U 802.11a/b/g/n/ac Wireless Adapter
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@DietPi:~# cat /etc/network/interfaces.d/wlan1
# WiFi-USB
auto wlan1
allow-hotplug wlan1
iface wlan1 inet dhcp
#dns-nameservers 192.168.1.99 172.31.0.2
pre-up iw dev wlan1 set power_save off
post-down iw dev wlan1 set power_save on
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
This is after a reboot.
Did you try to bring it up again?
Yup, same error:
root@DietPi:~# ifup wlan1
error: main exception: cannot find interfaces: wlan1
root@DietPi:~#
Hm, weird.
Can you try
sudo systemctl restart networking
If this does not help, can you try
sudo ip link set wlan1 up
sudo ifup wlan1
Nada:
root@DietPi:~# sudo ip link set wlan1 up
root@DietPi:~# ifconfig wlan1
wlan1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether x txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
root@DietPi:~# iwconfig wlan1
wlan1 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
root@DietPi:~# ifup wlan1
error: main exception: cannot find interfaces: wlan1
root@DietPi:~# iwconfig wlan1
wlan1 IEEE 802.11 ESSID:off/any
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
root@DietPi:~# ifconfig wlan1
wlan1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether x txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
I re-set DHCP for wlan0 (via dietpi-config) and had these errors:
root@DietPi:~# dietpi-config
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
[ OK ] DietPi-WiFiDB | mkdir -p /etc/wpa_supplicant
[ OK ] DietPi-WiFiDB | eval > /var/lib/dietpi/dietpi-wifi.db
[ INFO ] DietPi-WiFiDB | Applied WiFi DB slot 0 with SSID "XXX"
[ INFO ] DietPi-WiFiDB | Applied WiFi DB slot 1 with SSID ""
[ INFO ] DietPi-WiFiDB | Applied WiFi DB slot 2 with SSID ""
[ INFO ] DietPi-WiFiDB | Applied WiFi DB slot 3 with SSID ""
[ INFO ] DietPi-WiFiDB | Applied WiFi DB slot 4 with SSID ""
[ OK ] DietPi-WiFiDB | chown root:root /var/lib/dietpi/dietpi-wifi.db /etc/wpa_supplicant/wpa_supplicant.conf
[ OK ] DietPi-WiFiDB | chmod 600 /var/lib/dietpi/dietpi-wifi.db /etc/wpa_supplicant/wpa_supplicant.conf
[ SUB1 ] DietPi-Set_hardware > wifimodules (enable)
[ INFO ] DietPi-Set_hardware | Please wait, enabling WiFi modules...
[ OK ] DietPi-Set_hardware | modprobe cfg80211
[ OK ] DietPi-Set_hardware | modprobe brcmfmac
[ OK ] DietPi-Set_hardware | modprobe brcmutil
[ INFO ] DietPi-Set_hardware | Checking for required APT packages: iw wireless-tools wpasupplicant wireless-regdb
[ OK ] wifimodules enable | Completed
[ INFO ] DietPi-Config | Restarting network connections, please wait...
[ OK ] DietPi-Config | systemctl daemon-reload
[ INFO ] DietPi-Config | systemctl restart ifup@wlan0, please wait...
Dec 19 12:03:37 DietPi systemd[1]: Starting ifup@wlan0.service - ifup for wlan0...
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: Successfully initialized wpa_supplicant
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: nl80211: kernel reports: Match already configured
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: ctrl_iface exists and seems to be in use - cannot override it
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: Delete '/run/wpa_supplicant/wlan0' manually if it is not used anymore
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: Failed to initialize control interface 'DIR=/run/wpa_supplicant GROUP=netdev'.
You may have another wpa_supplicant process already running or the file was
left by an unclean termination of wpa_supplicant in which case you will need
to manually remove this file before starting wpa_supplicant again.
Dec 19 12:03:37 DietPi wpa_supplicant[15185]: wlan0: CTRL-EVENT-DSCP-POLICY clear_all
[ OK ] DietPi-Config | systemctl restart ifup@wlan0
[ INFO ] DietPi-Config | Reloading networking data, please wait...
[ OK ] DietPi-Config | Network restarted
root@DietPi:~# sudo systemctl restart networking
ok I don’t have the same USB dongle but did a testing on RPi5 using following config
root@DietPi5:/etc/network/interfaces.d# cat wlan1
# WiFi
allow-hotplug wlan1
iface wlan1 inet dhcp
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
#dns-nameservers 9.9.9.9 149.112.112.112
wireless-power off
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
root@DietPi5:/etc/network/interfaces.d#
at least after reboot I had 2 WIFI interface
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether d8:3a:dd:c0:0e:c4 brd ff:ff:ff:ff:ff:ff
4: wlan1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 5c:62:8b:67:1e:3a brd ff:ff:ff:ff:ff:ff
and I could start wlan1
(even if not configured)
root@DietPi5:/etc/network/interfaces.d# ifup wlan1
Error for wireless request "Set Power Management" (8B2C) :
SET failed on device wlan1 ; Operation not supported.
Internet Systems Consortium DHCP Client 4.4.3-P1
Copyright 2004-2022 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/wlan1/5c:62:8b:67:1e:3a
Sending on LPF/wlan1/5c:62:8b:67:1e:3a
Sending on Socket/fallback
Created duid "\000\001\000\001.\366\312\230\\b\213g\036:".
DHCPDISCOVER on wlan1 to 255.255.255.255 port 67 interval 4
Just wait a moment and do ifup wlan0
again
maybe it does not use the logical name wlan1
?
What is the output of
sudo lshw -C network
*-interface:0
description: Wireless interface
product: 43430
vendor: Broadcom
physical id: 1
bus info: mmc@1:0001:1
logical name: mmc1:0001:1
logical name: wlan0
serial: x
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=brcmfmac driverversion=7.45.16.144 firmware=01-b677b91b ip=192.168.1.8 multicast=yes wireless=IEEE 802.11
*-network:0 DISABLED
description: Ethernet interface
physical id: 3
logical name: eth0
serial: x
capabilities: ethernet physical
configuration: broadcast=yes driver=bcmgenet driverversion=6.1.21-v8+ link=no multicast=yes
*-network:1
description: Wireless interface
physical id: 4
bus info: usb@2:2
logical name: wlan1
serial: x
capabilities: ethernet physical wireless
configuration: broadcast=yes driver=mt76x2u driverversion=6.1.21-v8+ firmware=0.0.00-b1 link=no multicast=yes wireless=IEEE 802.11
Do you want me to run ifup wlan0
? wlan0 is the internal IF
I was not sure if you had issues on wlan0
as you shared some error messages for this interface
Btw, you could try to upgrade kernel on your system to a new kernel structure that hast been introduced with RPI5, but is applicable for all RPi device Image | Raspberry Pi 5: Testing and firmware migration script · Issue #6676 · MichaIng/DietPi · GitHub
Just done it, nothing changed…
root@DietPi:~# uname -a
Linux DietPi 6.6.62+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.62-1+rpt1 (2024-11-25) aarch64 GNU/Linux
root@DietPi:~# ifup wlan1
error: main exception: cannot find interfaces: wlan1
can you share iw dev
It’s not exactly the same but close to AWUS036ACM not functioning on Raspberry P4 B 8GB - Hardware Questions and Recommendations - OpenWrt Forum
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@DietPi:~# iw dev
phy#1
Interface wlan1
ifindex 4
wdev 0x100000001
addr 0xb
type managed
txpower 0.00 dBm
multicast TXQ:
qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets
0 0 0 0 0 0 0 0 0
phy#0
Unnamed/non-netdev interface
wdev 0x2
addr x
type P2P-device
txpower 31.00 dBm
Interface wlan0
ifindex 3
wdev 0x1
addr x
ssid x
type managed
channel 36 (5180 MHz), width: 80 MHz, center1: 5210 MHz
txpower 31.00 dBm
I used this dongle on other OS such Kali, but on Raspberry Pi 5. Haven’t tried on 4 yet.
??? I thought you are trying this on RPi4??