doc:appunti:hardware:raspberrypi_wpa_supplicant_problem
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:appunti:hardware:raspberrypi_wpa_supplicant_problem [2024/11/15 10:27] – [dhcpcd process dies without configuring wlan0] niccolo | doc:appunti:hardware:raspberrypi_wpa_supplicant_problem [2024/11/17 16:55] (current) – [dhcpcd process dies without configuring wlan0] niccolo | ||
---|---|---|---|
Line 63: | Line 63: | ||
===== dhcpcd process dies without configuring wlan0 ===== | ===== dhcpcd process dies without configuring wlan0 ===== | ||
- | This is a similar problem encountered on a **Raspberry Pi Model B Rev 2** running Raspbian GNU/Linux 11 Bullseye, the **wlan0** interface is an USB dongle **Realtek RTL8188CUS**, | + | This is a similar problem encountered on a **Raspberry Pi Model B Rev 2** running Raspbian GNU/Linux 11 Bullseye. The **wlan0** interface is an USB dongle **Realtek RTL8188CUS**, |
- | At first I decided to **disable** the Systemd **wpa_supplicant.service** and let **dhcpcd** to manage the interface starting wpa_supplicant on its own, as seen above. Suddendly the system started to have random problems on bootstrap: sometimes the host resulted having the wpa_supplicant process (lanched by dhcpcd) | + | At first I decided to **disable** the Systemd **wpa_supplicant.service** and let **dhcpcd** to manage the interface starting wpa_supplicant on its own, as seen above. Suddendly the system started to have random problems on bootstrap: sometimes the host resulted having the wpa_supplicant process |
To trace the problem I had to enable the debugging option of dhcpcd, adding the **%%-d%%** parameter in **/ | To trace the problem I had to enable the debugging option of dhcpcd, adding the **%%-d%%** parameter in **/ | ||
Line 112: | Line 112: | ||
It results that wlan0 gets a sqeuence of '' | It results that wlan0 gets a sqeuence of '' | ||
- | I solved the problem by letting Systemd to start wpa_supplicant on the specific wlan0 interface. This is achieved renaming the wpa_supplicant.conf file and enabling the service: | + | I solved the problem by letting Systemd to start wpa_supplicant on the specific wlan0 interface. This is achieved renaming the wpa_supplicant.conf file and enabling |
< | < | ||
mv / | mv / | ||
systemctl enable wpa_supplicant@wlan0.service | systemctl enable wpa_supplicant@wlan0.service | ||
+ | systemctl disable wpa_supplicant.service | ||
</ | </ | ||
Line 134: | Line 135: | ||
Nevertehless dhcpcd is informed by udev when the wlan0 interface is activated and then it can configure it using DHCP. | Nevertehless dhcpcd is informed by udev when the wlan0 interface is activated and then it can configure it using DHCP. | ||
+ | |||
+ | **NOTICE**: The default systemd configuration shipped with **Raspbian 11 Bullseye** does not ensure that the **wpa_supplicant@..service** is started before **dhcpcd.service**, | ||
+ | |||
+ | < | ||
+ | systemd-analyze plot > services-start-graph.svg | ||
+ | </ | ||
+ | |||
+ | Indeed you can see that **dhcpcd.service** becomes active after the **wpa_supplicant@wlan0.service**, | ||
+ | |||
+ | < | ||
+ | systemctl edit dhcpcd.service | ||
+ | </ | ||
+ | |||
+ | this will launch an editor to create the file **/ | ||
+ | |||
+ | < | ||
+ | [Unit] | ||
+ | After=wpa_supplicant@..service | ||
+ | </ | ||
+ | |||
+ | The systemd daemon will be automatically reloaded, se we can reboot. | ||
===== Web References ===== | ===== Web References ===== | ||
* [[https:// | * [[https:// |
doc/appunti/hardware/raspberrypi_wpa_supplicant_problem.1731662849.txt.gz · Last modified: 2024/11/15 10:27 by niccolo