Open pablomendezroyo opened 3 years ago
The driver iwlwifi may break dappnode host, making wifi service to stop working. Driver iwlwifi is crutial for the host (with intel hardware) to detect the network interface, if iwlwifi not present the network interface may not be recognized by the host.
Is not a dappnode issue but a driver/debian issue
Issue
Users have had problems with the dappnode wifi for a long time, and seems like one of the root causes is the following issue:
When the wifi container starts, it takes the network interface from the host (commonly wlan0) as well as the physical layer, (commonly the phy0) these are the paths that simply disappear:
/sys/class/net/wlan0
/sys/class/ieee80211/phy0
When the wifi container gets stopped, the network interface and the physical layer should appear back in the host, but it seems like there is a delay of 1' 53'' average, to appear in the host back again.
The line of code that takes the network interface from the host is: https://github.com/dappnode/DNP_WIFI/blob/348eb25f7b4169e32b91ef557aa8e240bf86e4a8/build/wlanstart.sh#L84
Debugging
This report was obtained using a script for debugging purposes, which:
Timelapses obtained:
Time lapse: Thu Jul 8 16:27:50 CEST 2021 - Thu Jul 8 16:27:50 CEST 2021
Time lapse: Thu Jul 8 16:27:59 CEST 2021 - Thu Jul 8 16:29:52 CEST 2021
Time lapse: Thu Jul 8 16:30:01 CEST 2021 - Thu Jul 8 16:31:55 CEST 2021
Time lapse: Thu Jul 8 16:32:04 CEST 2021 - Thu Jul 8 16:33:58 CEST 2021
Time lapse: Thu Jul 8 16:34:07 CEST 2021 - Thu Jul 8 16:36:00 CEST 2021
Time lapse: Thu Jul 8 18:17:55 CEST 2021 - Thu Jul 8 18:17:55 CEST 2021
Time lapse: Thu Jul 8 18:18:05 CEST 2021 - Thu Jul 8 18:18:05 CEST 2021
Time lapse: Thu Jul 8 18:18:15 CEST 2021 - Thu Jul 8 18:20:07 CEST 2021
Time lapse: Thu Jul 8 18:20:17 CEST 2021 - Thu Jul 8 18:22:09 CEST 2021
Time lapse: Thu Jul 8 18:22:19 CEST 2021 - Thu Jul 8 18:24:11 CEST 2021
Note: notice that the first attempt works without issues, the rest of them has an average delay of 1' 50-58''
Possible solutions
systemctl restart network
and make interfaces appear back again in the host. The concern is that this procedure is a bit aggressive and I did not got it work