Skip to main content

Timeline for wlan0 doesn't get an IP Address

Current License: CC BY-SA 4.0

7 events
when toggle format what by license comment
Sep 27, 2019 at 11:47 comment added bleah1 I've ended up adding country=" and the country code to wpa_supplicant.conf` and also using system("systemctl daemon-reload && systemctl restart dhcpcd.service") whenever I change the network settings and it works nicely. I don't know which fixed it.
Sep 27, 2019 at 11:45 vote accept bleah1
Sep 24, 2019 at 9:33 comment added Ingo @bleah1 If everything works on the command line then the problem must be your C++ program. I can't say much about it because I don't know it. Maybe you don't match the correct environment to execute system commands in the invoked shell?
Sep 24, 2019 at 8:25 comment added bleah1 I've went into raspi-config and set a ssid and password and, as expected, wlan0 was assigned a dhcp IP. Then I've went into /etc/dhcpcd.conf and /etc/wpa_supplicant/wpa_supplicant.conf files and the only lines that were added were network={ ssid="MySSID" psk="Password1234" }
Sep 24, 2019 at 8:17 comment added bleah1 Also, systemctl daemon-reload && systemctl restart dhcpcd.service with root rights had no effect. wlan0 still doesnt' have any IP
Sep 24, 2019 at 8:07 comment added bleah1 But ip link set eth0 down && ip link set eth0 works. So, dhcpcd reconfigures the eth0 interface. Why isn't wlan0 working ?
Sep 20, 2019 at 22:09 history answered Ingo CC BY-SA 4.0