-
-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dietpi-wifi-monitor.sh forces disconnect every 10s #3359
Comments
Locally I have changed the test to
This has stopped the disconnects (as expected). |
@borpin Do you use WiFi for main internet connection? It is strange then that the ip r commands does not find a default gateway on that device, as this should be the default target for all network requests then. Your solution only checks if the adapter is available but not if it is connected to any access point, hence it breaks the aim of the script to reconnect, if I am not mistaken? What we should definitely add is to check if the found URL_PING is actually a valid IP. This gateway estimation could be added to the main loop, which would also allow a changed gateway IP without having to restart the service. |
In this case I had both eth0 and wlan0 connected as it is the only way (no video out on this device). I did hit more problems with the Wi-Fi - the driver for the OrangePi has always been iffy; I was hoping this was better. Even with this solution, I still could not get the wlan0 to come up when eth0 is disconnected on boot.
Possibly. As soon as the link was lost then the entry disappeared. The
In this case it doesn't help as it would still assume the link was down and disconnect! |
Yes, that is still strange to me. Could you please paste the output of these commands:
|
I had disabled the Wi-Fi so I re-enabled it and connected via both eth0 and wlan0.
I feel possibly the right route is not being added and it is falling back to the eth0 route all the time. eth0
wlan0
|
Digging around, I discovered this (installed
Checking an RPi running Raspbian;
|
@borpin You cannot simply connect multiple network adapters to the same network without having a routing table that tells the system which adapter to send requests to. Otherwise you face this issue with the switching default route. It is basically this issue: #2103
Now your Raspbian setup is interesting with two default routes active concurrently. While this might work, since one always overrides the other, this is dangerous since loosing one route might lead to requests from one adapter might be answered on the other adapter. I am no expert, probably this is ruled out, but at least it doesn't look like a robust network setup. Is regular Raspbian Lite, which tools manage the network connection, e.g. what is:
|
I can add a route using the 'route' command such as
The metric seems to help routing when both interfaces are up. But I cannot find a syntax to do the same with |
@borpin But hmm, that does not really fit to the explanation of the route man page:
https://manpages.debian.org/buster/net-tools/route.8.en.html#OPTIONS
And Ah and the German language man page states about route metric output:
Means: Can you please paste from Raspbian:
Probably there is some routing table applied via ip rules to manage the two gateways. |
I'll mark this as closed. Requests for WiFi => Ethernet support and native support for multiple active network adapters (aside of classic WiFi Hotspot) exist already |
Creating a bug report/issue
Required Information
cat /DietPi/dietpi/.version
G_DIETPI_VERSION_CORE=6
G_DIETPI_VERSION_SUB=28
G_DIETPI_VERSION_RC=0
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
echo $G_DISTRO_NAME
orcat /etc/debian_version
buster 10.2
uname -a
Linux DietPi-OrPi1 5.4.12-sunxi #rc0 SMP Sun Jan 19 21:11:41 CET 2020 armv7l GNU/Linux
echo $G_HW_MODEL_DESCRIPTION
or (EG: RPi3)OrangePi Zero (armv7l)
Generic 1A
SanDisk ultra
Additional Information (if applicable)
sed -n 5p /DietPi/dietpi/.hw_model
5494d63e-d34c-424b-860d-a364d6e8c572
Steps to reproduce
Expected behaviour
Actual behaviour
Extra details
More logs etc on this discussion. https://dietpi.com/phpbb/viewtopic.php?t=7220
DietPi/rootfs/var/lib/dietpi/services/dietpi-wifi-monitor.sh
Line 29 in 67ae9e4
On this system this command does not return anything
Therefore the monitor disconnects every 10s
This could be an issue with the use of
ip
as the command.An alternative might be to use the output from
iwconfig
orifquery
.Interface up...
Interface down
It seems though that
ifquery
always returns the same output.The text was updated successfully, but these errors were encountered: