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

 

 

 

[Software] No IP address for WiFi

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
I am a nobody
Posts: 45
Joined: 2012-04-13 03:44

[Software] No IP address for WiFi

#1 Post by I am a nobody »

Hi,

I am running Debian on an embedded system, it does not have NetworkManager, it runs wpa_supplicant, but no IP address:
# ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr cc:1b:e0:a0:13:7f
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

I added wpa_passphrase to /etc/wpa_supplicant/wpa_supplicant.conf
network={
ssid="MyWiFiNetwork"
psk=795f1ead4308b9ea2b51dc9bc79a46241141935f41e9fc736a741331cfbb80e1
}

Could not get IP after running dhclient

# dhclient -v wlan0
Listening on LPF/wlan0/cc:1b:e0:a0:13:7f
Sending on LPF/wlan0/cc:1b:e0:a0:13:7f
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 20
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

I can ensure you my wifi works, I can run the same dhclient on my laptop running on ubuntu 18.04 which is able to connect to my WiFi:
$ sudo dhclient -v wlp2s0
Listening on LPF/wlp2s0/9c:b6:d0:8e:f3:d5
Sending on LPF/wlp2s0/9c:b6:d0:8e:f3:d5
Sending on Socket/fallback
DHCPDISCOVER on wlp2s0 to 255.255.255.255 port 67 interval 3 (xid=0x2766654)
DHCPREQUEST of 192.168.0.104 on wlp2s0 to 255.255.255.255 port 67 (xid=0x54667602)
DHCPOFFER of 192.168.0.104 from 192.168.0.1
DHCPACK of 192.168.0.104 from 192.168.0.1
RTNETLINK answers: File exists
bound to 192.168.0.104 -- renewal in 43040 seconds.

Why doesn't the Debian work?

Thank you.

arzgi
Posts: 1185
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: [Software] No IP address for WiFi

#2 Post by arzgi »

You have to start wpa_supplicant, try first manually, then add to

Code: Select all

/etc/systemd/network/
I have changed to iwd/iwctl, but you find plenty of examples how to use wpa_supplicant.

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 557
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 76 times
Been thanked: 85 times

Re: [Software] No IP address for WiFi

#3 Post by wizard10000 »

I do minimal installs so I generally use a quick and dirty config in /etc/network/interfaces until I get things going and some network manager installed. Not messing with wpa_supplicant, I let Debian do that :)

Code: Select all

auto wlp2s0
allow-hotplug wlp2s0
iface wlp2s0 inet dhcp
    wpa-ssid ssid-goes-here
    wpa-psk 32e1d4c0b9a27c37faecabf486837d4532fe8c715c68043a129b8b130f4c1b39
Note that my wpa-psk is hashed - you don't need to do that, especially if the entry is temporary. A plaintext key will work just as well but if your key has spaces in it *don't* enclose the key in quotes.

Hope this helps -
we see things not as they are, but as we are.
-- anais nin

Post Reply