dappnode / DNP_WIFI

DAppNode package responsible for providing wifi access to the internal network.
GNU General Public License v3.0
2 stars 8 forks source link

Network interface in the host might dissappear for a while #33

Open pablomendezroyo opened 3 years ago

pablomendezroyo commented 3 years ago

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:

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:

  1. Stops wifi container and waits for the paths to exists
  2. Starts wifi container and start again

Timelapses obtained:

  1. Time lapse: Thu Jul 8 16:27:50 CEST 2021 - Thu Jul 8 16:27:50 CEST 2021
  2. Time lapse: Thu Jul 8 16:27:59 CEST 2021 - Thu Jul 8 16:29:52 CEST 2021
  3. Time lapse: Thu Jul 8 16:30:01 CEST 2021 - Thu Jul 8 16:31:55 CEST 2021
  4. Time lapse: Thu Jul 8 16:32:04 CEST 2021 - Thu Jul 8 16:33:58 CEST 2021
  5. Time lapse: Thu Jul 8 16:34:07 CEST 2021 - Thu Jul 8 16:36:00 CEST 2021

  6. Time lapse: Thu Jul 8 18:17:55 CEST 2021 - Thu Jul 8 18:17:55 CEST 2021
  7. Time lapse: Thu Jul 8 18:18:05 CEST 2021 - Thu Jul 8 18:18:05 CEST 2021
  8. Time lapse: Thu Jul 8 18:18:15 CEST 2021 - Thu Jul 8 18:20:07 CEST 2021
  9. Time lapse: Thu Jul 8 18:20:17 CEST 2021 - Thu Jul 8 18:22:09 CEST 2021
  10. 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

pablomendezroyo commented 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