User Tools

Site Tools


doc:appunti:hardware:raspberrypi_wpa_supplicant_problem

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:appunti:hardware:raspberrypi_wpa_supplicant_problem [2024/11/15 15:06] – [dhcpcd process dies without configuring wlan0] niccolodoc:appunti:hardware:raspberrypi_wpa_supplicant_problem [2024/11/17 16:55] (current) – [dhcpcd process dies without configuring wlan0] niccolo
Line 112: Line 112:
 It results that wlan0 gets a sqeuence of ''wlan0: carrier acquired'' and ''wlan0: carrier lost'', after that the fatal error **main: eloop_start: Invalid argument** kills dhcpcd. Maybe this problem is triggered by the autoconfiguration of IPv6. It results that wlan0 gets a sqeuence of ''wlan0: carrier acquired'' and ''wlan0: carrier lost'', after that the fatal error **main: eloop_start: Invalid argument** kills dhcpcd. Maybe this problem is triggered by the autoconfiguration of IPv6.
  
-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 only the interface-specific version service:
  
 <code> <code>
 mv /etc/wpa_supplicant/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant-wlan0.conf mv /etc/wpa_supplicant/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
 systemctl enable wpa_supplicant@wlan0.service systemctl enable wpa_supplicant@wlan0.service
 +systemctl disable wpa_supplicant.service
 </code> </code>
  
Line 135: Line 136:
 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**, thus ensuring that the above startup sequence is respected. You can generate the SVG graphic detailing which system services have been started at what time using the command:+**NOTICE**: The default systemd configuration shipped with **Raspbian 11 Bullseye** does not ensure that the **wpa_supplicant@..service** is started before **dhcpcd.service**, thus ensuring that the above startup sequence is respected. You can generate the SVG graphic detailing which system services have been started at what time using the command:
  
 <code> <code>
Line 141: Line 142:
 </code> </code>
  
-Indeed you can see that **dhcpcd.service** is started before **wpa_supplicant@wlan0.service**. We should customize the dhcpcd.service unit adding **Before=wpa_supplicant@..service** option. FIXME.+Indeed you can see that **dhcpcd.service** becomes active after the **wpa_supplicant@wlan0.service**, but nothing is ensuring this behaviour. We should actually customize the dhcpcd.service unit adding an **After=wpa_supplicant@..service** option. For this purpose we use the command **systemctl edit**:
  
 +<code>
 +systemctl edit dhcpcd.service
 +</code>
 +
 +this will launch an editor to create the file **/etc/systemd/system/dhcpcd.service.d/override.conf**; this is a drop-in snippet to extend or override the definition of the unit. Here we write:
 +
 +<file>
 +[Unit]
 +After=wpa_supplicant@..service
 +</file>
 +
 +The systemd daemon will be automatically reloaded, se we can reboot.
  
 ===== Web References ===== ===== Web References =====
  
   * [[https://www.raspberrypi.org/forums/viewtopic.php?t=191061|Raspbian Stretch: Wifi not starting on boot]]   * [[https://www.raspberrypi.org/forums/viewtopic.php?t=191061|Raspbian Stretch: Wifi not starting on boot]]
doc/appunti/hardware/raspberrypi_wpa_supplicant_problem.1731679570.txt.gz · Last modified: 2024/11/15 15:06 by niccolo