-
-
Notifications
You must be signed in to change notification settings - Fork 495
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 | Option: Check for Ethernet, else fallback to WiFi #3254
Comments
@camdenorrb |
The issue seems to go away if I turn off auto reconnect and change the static ip to dhcp, I can't have them on together nor separately as it disconnects randomly. This may be a work around, but I would like to have both features enabled if possible. |
@camdenorrb But the reason for your issue most likely is this:
You have WiFi and Ethernet both active on the same local network. When doing a request, it is not clear for the system which adapter to send it through, since both share the same route. In such cases a routing table is required, to define which requests to send to which adapter, but most likely this setup is not what you want. There is usually no point in connecting with two adapters in parallel to the same network, I guess you want to use either Ethernet or WiFi? Please disable the other adapter then via Auto reconnect btw tries to ping the default route on the WiFi adapter. Could you paste what in your case this is:
Since your default route is attached to eth0, probably the above does not give a valid output. Probably we can find a better ping target when WiFi is not used for the default route. |
@camdenorrb Actually, since the idea of redundancy is reasonable, we could add an alternative WiFi monitor mode:
So you can plug&play on different locations and it will always use Ethernet, when available, else fallback to WiFi. Other way round doesn't make much sense, does it? If Ethernet is connected, why would one want WiFi, and if one uses WiFi for reason, then because one doesn't want or can lay out a cable. I plan to rework our network configs to make them more flexible and compatible with custom setups. I'll add this issue to the project as well: https://github.com/MichaIng/DietPi/projects/1 |
I don't know how you plan to do it but i'll leave here some info about it, or specifically about what I was trying to do (having the same static IP for both interfaces but only having active ethernet, and if Ethernet is unplugged then connect the wifi), it makes use of network bonding, and optionally it uses systemd networkd https://raspberrypi.stackexchange.com/questions/83845/automatically-switch-between-wifi-and-ethernet-with-static-ip |
@MichaIng I will link the related forum post. For using same IP on both interfaces, some tweaks necessary |
Yeah, ifplugd is working really well to keep only one interface up at the same time, and I really suggest that it is added to dietpi config as an option in the network menu, as it is really simple to configure as we have tested in that forum thread |
At least it works with ifplugd although its not really its intention to switch interfaces but only to auto-configure/de-configure Ethernet interfaces on cable (un)plug and device hotplug. Basically we can do the same thing with DietPi-WiFi-Monitor without probably messing with other concurrent ifplugd use-cases. But we check connection state only every 10 seconds via ping, for Ethernet plug/connection state could use So finally when I am (or someone else is) able to do the planned network setup rework, we can do some benchmarks. One argument for an own integration is that we can better combine it with WiFi auto-reconnections. Otherwise ifplugd action would need to stop and restart WiFi monitor (when active) on Ethernet plug/unplug. |
as far as I can see,
Inside For example the script I found on the web
|
Jep I see it is working fine and also RAM usage of the daemon is low. CPU usage alone would not be a killer argument. What I am more thinking about is that I aim to make our network setup much more compatible and flexible in combination with other/custom setups. Since EDIT: Ah, the daemon can be called like this:
But this requires an own udev rule and/or service file then as well, or we call it manually on boot 🤔. |
I would not say |
This issue also prevents HotSpot package from working properly. |
Yes, it makes sense to disable the WiFi monitor if the hostspot is enabled. We can do that automatically on WiFi hotspot install. |
Creating a bug report/issue
Required Information
DietPi version |
G_DIETPI_VERSION_CORE=6
G_DIETPI_VERSION_SUB=26
G_DIETPI_VERSION_RC=3
Distro version | buster
Kernel version |
Linux DietPi 4.19.75-v7l+ #1270 SMP Tue Sep 24 18:51:41 BST 2019 armv7l GNU/Linux
SBC device | RPI 4
Power supply used | CanaKit Raspberry Pi 4 Power Supply (USB-C)
SDcard used | Samsung 64GB 100MB/s (U3) MicroSDXC EVO Select Memory Card with Full-Size Adapter (MB-ME64GA/AM)
Additional Information (if applicable)
If you sent a "dietpi-bugreport", please paste the ID here: 4f353ae1-f948-4745-8bb3-00374244b90e
Steps to reproduce
Expected behaviour
Actual behaviour
Extra details
Unknown wpa_supplicant error in the logs for dietpi-wifi-monitor:
The text was updated successfully, but these errors were encountered: