Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Networking] [Solved] Can't configure wifi on a fresh Deb 12 install

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
Ravi Joshi
Posts: 12
Joined: 2015-10-03 16:56
Has thanked: 3 times

[Networking] [Solved] Can't configure wifi on a fresh Deb 12 install

#1 Post by Ravi Joshi »

Fresh install - Debian 12 netinst. The installer happily connected to wifi, but after reboot the system doesn't.
I did some reading up, but hit hurdle everywhere.
ifconfig and rfkill are not avaiable

Code: Select all

iwconfig wlp4s0 shows some info.
used 'iwconfig wlp4s0 essid "ssid" s:passphrase' but always get an error 'Invalid argument'. I try to add single quotes / double quotes and combinations thereoff.
I also read on multiple forums that iwconfig/iw thing supports WEP only, but 'iwlist wlp4s0 auth' shows the interface supports WPA & WPA2.
Resorted to wpa,

Code: Select all

wpa_passphrase "ssid" "passphrase" >> /etc/wpa_supplicant/wpa_supplicant.conf
wpa_supplicant -B -i wlp4s0 -c /etc/wpa_supplicant/wpa_supplicant.conf
	reports n180211: kernel reports: Match already configured (this line appears multiple times)
	[b]rfkill: WLAN soft blocked[/b]
dlclient wlp4s0 => operation not possible due to RF-KILL
Then press Fn + F2 key to turn on radio should it be off. and repeat dhcliet, but to no avail.
There is a service called 'ifup@wlp4s0.service' which seems to start and exit.
I turn the radio on/off/on again and restart the service to see following status (active/exited).
Feb 10 21:05:39 debian sh[1274]: send_packet: Network is down
Feb 10 21:05:39 debian sh[1274]: dhclient.c:2600: Failed to send 300 byte long packet over wlp4s0 interface.
Feb 10 21:05:39 debian dhclient[1274]: send_packet: Network is down
Feb 10 21:05:39 debian dhclient[1274]: dhclient.c:2600: Failed to send 300 byte long packet over wlp4s0 interface.

At this point I don't know what to do. Any help is appreciated. TIA.
Last edited by Ravi Joshi on 2024-02-21 12:45, edited 2 times in total.

Aki
Global Moderator
Global Moderator
Posts: 2753
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 67 times
Been thanked: 374 times

Re: Can't configure wifi on a fresh Deb 12 install

#2 Post by Aki »

Hello,
Ravi Joshi wrote: 2024-02-11 04:29

Code: Select all

wpa_passphrase "ssid" "passphrase" >> /etc/wpa_supplicant/wpa_supplicant.conf
wpa_supplicant -B -i wlp4s0 -c /etc/wpa_supplicant/wpa_supplicant.conf
	reports n180211: kernel reports: Match already configured (this line appears multiple times)
	[b]rfkill: WLAN soft blocked[/b]
dlclient wlp4s0 => operation not possible due to RF-KILL
Then press Fn + F2 key to turn on radio should it be off. and repeat dhcliet, but to no avail.
There is a service called 'ifup@wlp4s0.service' which seems to start and exit.
I turn the radio on/off/on again and restart the service to see following status (active/exited).

Code: Select all

Feb 10 21:05:39 debian sh[1274]: send_packet: Network is down
Feb 10 21:05:39 debian sh[1274]: dhclient.c:2600: Failed to send 300 byte long packet over wlp4s0 interface.
Feb 10 21:05:39 debian dhclient[1274]: send_packet: Network is down
Feb 10 21:05:39 debian dhclient[1274]: dhclient.c:2600: Failed to send 300 byte long packet over wlp4s0 interface.
What is you computer ?

What is your network adapter ? You can check with the following command:

Code: Select all

lspci -vnn -d ::0280
You can check if there is some missing firmware; you can search system logs with the following command (root password is required):

Code: Select all

su -l -c "journalctl -b --no-pager -g firmware"
Is your computer dual booted (e.g.: Windows is installed on the same system) ? If yes, you should completely shutdown Windows (disabling fast boot: turn off fast start) before using Debian: see [1].

Please post the contents of your /etc/wpa_supplicant/wpa_supplicant.conf after obscuring the password.

Are you able to connect using a wired interface ?

--
[1] superuser - Windows 10 setting for full shutdown?
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Ravi Joshi
Posts: 12
Joined: 2015-10-03 16:56
Has thanked: 3 times

Re: Can't configure wifi on a fresh Deb 12 install

#3 Post by Ravi Joshi »

Aki wrote: 2024-02-11 07:20 What is you computer ?
What is your network adapter ? You can check with the following command:
You can check if there is some missing firmware; you can search system logs with the following command (root password is required):
Is your computer dual booted (e.g.: Windows is installed on the same system) ?
Please post the contents of your /etc/wpa_supplicant/wpa_supplicant.conf after obscuring the password.
Are you able to connect using a wired interface ?
This is a laptop. Does not dualboot. I suspect missing firmware, one that is in net installer but not in installed OS. Here're some reading from commands you asked me to run. Also, I don't have an ethernet, so can't test it.

Code: Select all

 lspci -vnn -d ::0280
 04:00.0 Network controller [0280]: Qualcomm Atheros AR9485 Wireless Network Adapter [168c:0032] (rev 01)
	Subsystem: AzureWave AR9485 Wireless Network Adapter [1a3b:2c97]
	Flags: bus master, fast devsel, latency 0, IRQ 17
	Memory at fea00000 (64-bit, non-prefetchable) [size=512K]
	Expansion ROM at fea80000 [disabled] [size=64K]
	Capabilities: [40] Power Management version 2
	Capabilities: [50] MSI: Enable- Count=1/4 Maskable+ 64bit+
	Capabilities: [70] Express Endpoint, MSI 00
	Capabilities: [100] Advanced Error Reporting
	Capabilities: [140] Virtual Channel
	Capabilities: [160] Device Serial Number 00-00-00-00-00-00-00-00
	Kernel driver in use: ath9k
	Kernel modules: ath9k 
journalctl

Code: Select all

debian kernel: ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
debian kernel: psmouse serio1: elantech: assuming hardware version 3 (with firmware version 0x550f00)
debian kernel: platform regulatory.0: firmware: direct-loading firmware regulatory.db
debian kernel: platform regulatory.0: firmware: direct-loading firmware regulatory.db.p7s
debian kernel: radeon 0000:00:01.0: firmware: direct-loading firmware radeon/PALM_pfp.bin
debian kernel: radeon 0000:00:01.0: firmware: direct-loading firmware radeon/PALM_me.bin
debian kernel: radeon 0000:00:01.0: firmware: direct-loading firmware radeon/SUMO_rlc.bin
debian kernel: radeon 0000:00:01.0: firmware: direct-loading firmware radeon/SUMO_uvd.bin
debian kernel: ACPI: battery: [Firmware Bug]: (dis)charge rate invalid.
debian systemd[1]: systemd-pcrphase-sysinit.service - TPM2 PCR Barrier (Initialization) was skipped because of an unmet condition check (ConditionPathExists=/sys/firmware/efi/efivars/StubPcrKernelImage-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f).
debian systemd[1]: systemd-pcrphase.service - TPM2 PCR Barrier (User) was skipped because of an unmet condition check (ConditionPathExists=/sys/firmware/efi/efivars/StubPcrKernelImage-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f).

Code: Select all

wpa_supplicant.conf
network={
	ssid="TEST"
	psk="21212323"
	#psk=af5799e12597ae233418e2db3d88c5e2e1dca7d8489385e0d4eb619b5800fe67
}
iwconfig wlp4s0

Code: Select all

wlp4s0    IEEE 802.11  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=off   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
Could you tell if this is enough? Again, Thanks in advance.

Aki
Global Moderator
Global Moderator
Posts: 2753
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 67 times
Been thanked: 374 times

Re: Can't configure wifi on a fresh Deb 12 install

#4 Post by Aki »

Ravi Joshi wrote: 2024-02-11 11:16 [..] I suspect missing firmware [..]
Firmware for your Qualcomm Atheros AR9485 Wireless Network Adapter [168c:0032] is in the following debian package: You can verify if it is installed with the command (it will appear [Installed] next to package name):

Code: Select all

apt list firmware-atheros
What's in the log about the kernel module driving the wireless card ? You can check with the command:

Code: Select all

su -l -c "journalctl -b --no-pager -g ath9k\|wlp4s0\|wpa\|ifup\|kill"
What is the content of the file named /etc/network/interfaces ?

What is the output of the following command ?

Code: Select all

su -l -c "ifdown --verbose -a; ifup --verbose wlp4s0”
Did you install a connection manager (see [1]) ?

--
[1] https://wiki.debian.org/WiFi
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Ravi Joshi
Posts: 12
Joined: 2015-10-03 16:56
Has thanked: 3 times

Re: Can't configure wifi on a fresh Deb 12 install

#5 Post by Ravi Joshi »

Yes, I installed firmware-atheros. (Thanks Aki)
Here are outputs of ifdown/ifup wlp4s0 (it didn't capture everything)

Code: Select all

ifdown- output
wpa_supplicant: terminating wpa_supplicant daemon via pidfile /run/wpa_supplicant.wlp4s0.pid
Stopped /sbin/wpa_supplicant (pid 485).
wpa_supplicant: removing /run/sendsigs.omit.d/wpasupplicant.wpa_supplicant.wlp4s0.pid

ifup- output
wpa_supplicant: wpa-driver nl80211,wext (default)
wpa_supplicant: /sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wlp4s0.pid -i wlp4s0 -D nl80211,wext -C /run/wpa_supplicant
wpa_supplicant: creating sendsigs omission pidfile: /run/sendsigs.omit.d/wpasupplicant.wpa_supplicant.wlp4s0.pid
wpa_supplicant: ctrl_interface socket located at /run/wpa_supplicant/wlp4s0
wpa_supplicant: configuring network block -- 0
wpa_supplicant: wpa-ssid "TEST" -- OK
wpa_supplicant: wpa-psk ***** -- OK
wpa_supplicant: enabling network block 0 -- OK

journal-
 dhclient[639]: Killed old client process
 dhclient[639]: Listening on LPF/wlp4s0/dc:85:de:8b:6e:35
 dhclient[639]: Sending on   LPF/wlp4s0/dc:85:de:8b:6e:35
 wpa_supplicant[485]: wlp4s0: CTRL-EVENT-DSCP-POLICY clear_all
 wpa_supplicant[485]: wlp4s0: CTRL-EVENT-DSCP-POLICY clear_all
 wpa_supplicant[485]: nl80211: deinit ifname=wlp4s0 disabled_11b_rates=0
 wpa_supplicant[485]: wlp4s0: CTRL-EVENT-TERMINATING
 wpa_supplicant[669]: Successfully initialized wpa_supplicant
 wpa_supplicant[669]: rfkill: WLAN soft blocked
 dhclient[680]: Listening on LPF/wlp4s0/dc:85:de:8b:6e:35
 dhclient[680]: Sending on   LPF/wlp4s0/dc:85:de:8b:6e:35
 dhclient[680]: DHCPDISCOVER on wlp4s0 to 255.255.255.255 port 67 interval 6
 dhclient[680]: dhclient.c:2600: Failed to send 300 byte long packet over wlp4s0 interface.
 dhclient[680]: receive_packet failed on wlp4s0: Network is down
 dhclient[680]: DHCPDISCOVER on wlp4s0 to 255.255.255.255 port 67 interval 15
 dhclient[680]: dhclient.c:2600: Failed to send 300 byte long packet over wlp4s0 interface.
 dhclient[680]: DHCPDISCOVER on wlp4s0 to 255.255.255.255 port 67 interval 12
 dhclient[680]: dhclient.c:2600: Failed to send 300 byte long packet over wlp4s0 interface.
 dhclient[680]: DHCPDISCOVER on wlp4s0 to 255.255.255.255 port 67 interval 14
 dhclient[680]: dhclient.c:2600: Failed to send 300 byte long packet over wlp4s0 interface.
 dhclient[680]: DHCPDISCOVER on wlp4s0 to 255.255.255.255 port 67 interval 14
 dhclient[680]: dhclient.c:2600: Failed to send 300 byte long packet over wlp4s0 interface.

Code: Select all

/etc/network/interfaces --
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug wlp4s0
iface wlp4s0 inet dhcp
	wpa-ssid TEST
	wpa-psk  21212323
------------
wpa_supplicant.conf
network={
	ssid="TEST"
	psk="21212323"
	#psk=af5799e12597ae233418e2db3d88c5e2e1dca7d8489385e0d4eb619b5800fe67
}
Several year ago, I had success with plaintext psk (encrypted was failing), hence decided to try the same today too.
At this point I am really stumped.

Is it possible bring interface up without a network manager? I am having hard time installing nmcli. I have to download it on one machie, take it to debian, mount the usb, try to install only for it to fail on dependencies. Repeat the process for each dependency. Spent several hours with no success. nmcli is ruled out for now.
Is there a simpler connection manager?

Ravi Joshi
Posts: 12
Joined: 2015-10-03 16:56
Has thanked: 3 times

Re: [Networking] Can't configure wifi on a fresh Deb 12 install

#6 Post by Ravi Joshi »

Hello Aki.
I reinstalled Deb 12 using full cd. And the issue is gone.
When I check interfaces / wpa_supplicant.conf, I don't see any mention of wlp4s0.
For now let me consider this issue resolved. Thanks.

Aki
Global Moderator
Global Moderator
Posts: 2753
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 67 times
Been thanked: 374 times

Re: Can't configure wifi on a fresh Deb 12 install

#7 Post by Aki »

Hello,
Ravi Joshi wrote: 2024-02-12 13:41 I reinstalled Deb 12 using full cd. And the issue is gone.
When I check interfaces / wpa_supplicant.conf, I don't see any mention of wlp4s0.
For now let me consider this issue resolved. Thanks.
I'm glad you sorted it out. :)

Did you configured the network using /etc/network/interfaces, after all ?

Please, mark the discussion as "solved" manually adding the text tag "[Solved]" at the beginning of the subject of the first message (after other tags, if any); for example: "[Solved] Can't configure WiFi after a fresh Debian 12 installation".

Even if you solved, some note from your previous post.
Ravi Joshi wrote: 2024-02-11 19:13 Here are outputs of ifdown/ifup wlp4s0 (it didn't capture everything)[/size]

Code: Select all

[..]
journal-
[..]
 wpa_supplicant[485]: wlp4s0: CTRL-EVENT-TERMINATING
 wpa_supplicant[669]: Successfully initialized wpa_supplicant
 wpa_supplicant[669]: rfkill: WLAN soft blocked
[..]
The "rfkill: WLAN soft blocked" suggests that the wireless interface adpter is "soft blocked". You can check with the following command:

Code: Select all

rfkill
Then, you can enable it with the command (as root):

Code: Select all

su -l -c "rfkill enable wlp4s0"
and then check again with:

Code: Select all

rfkill
Ravi Joshi wrote: 2024-02-11 19:13

Code: Select all

/etc/network/interfaces --
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug wlp4s0
iface wlp4s0 inet dhcp
	wpa-ssid TEST
	wpa-psk  21212323
------------
wpa_supplicant.conf
network={
	ssid="TEST"
	psk="21212323"
	#psk=af5799e12597ae233418e2db3d88c5e2e1dca7d8489385e0d4eb619b5800fe67
}
If you put the wpa-ssid in /etc/network/interfaces it should not be required in wpa_supplicant.conf (and vice versa). Therefore, modify one of them, then give the commands and report back logs:

Code: Select all

ifdown --verbose -a
ifup --verbose wlp4s0
Ravi Joshi wrote: 2024-02-11 19:13 Is there a simpler connection manager?[/size]
You can install the network manager: and use the program nmtui [2] (included in the network-manager package) to have a text user interface (tui) for setting up and activating connections.

--
[1] Package: network-manager (1.42.4-1)
[2] nmtui - Text User Interface for controlling NetworkManager
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Ravi Joshi
Posts: 12
Joined: 2015-10-03 16:56
Has thanked: 3 times

Re: [Networking] [Solved] Can't configure wifi on a fresh Deb 12 install

#8 Post by Ravi Joshi »

I realized that the default tool in Debian is NetworkManager - which doesn't use interfaces or systemd-networking.

Aki
Global Moderator
Global Moderator
Posts: 2753
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 67 times
Been thanked: 374 times

Re: [Networking] [Solved] Can't configure wifi on a fresh Deb 12 install

#9 Post by Aki »

Hello,
Ravi Joshi wrote: 2024-02-21 13:10 I realized that the default tool in Debian is NetworkManager - which doesn't use interfaces or systemd-networking.
I'm glad you sorted it out. :)

Happy Debian ! .)
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Post Reply