-
-
Notifications
You must be signed in to change notification settings - Fork 506
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-Config | WiFi connection fails, when eth + wlan are enabled #2103
Comments
@frankdugan3 Hui took a while to even find this service in the code, as I never use WiFi with DietPi 😄.
As we do not source DietPi-Globals, we cannot use Also currently it looks quite spammy, producing output on every tick. I would just create output, if connection was actually lost and after successful reconnection. So but the errors should no break the script. Also your status output shows it is active and running. Other topic when checking the code:
https://github.com/Fourdee/DietPi/blob/testing/dietpi/dietpi-config#L2434
But besides that I do not find a reason WiFi should break and have no DietPi with WiFi device here to test. I hope Fourdee finds time to check. |
@MichaIng Not sure where it breaks, but in the end something in the re-connection script ends up dropping the connection. |
@frankdugan3 But if Can you please do the following:
|
OK, here's the full log from the time of login until getting a successful connection. It's long, so I'll comment up here. I'm using DHCP. The reason my previous log shows connection is because I had it running for a long time before I checked the logs, and it apparently connected eventually. When I have autoreconnect off, the WiFi connects immediately both on changing the settings via The more I dig, the behavior is very strange. It becomes a very long connection process with a lot of false starts and stops when the reconnect script is starting the WiFi connection. It also times out WiFi during boot. Also, if I manually run If I wait long enough, it does seem to randomly connect successfully. The issue is that it's so flaky it randomly drops the connection, and then randomly picks it back up after many false starts.
|
Yep, needs globals loaded in.
This appears to be working as intended? If no ping result, the service will drop and restart the WiFi adapter. Looks more like a slow DHCP + possible signal strength issue. Also, whats the signal strength (dietpi-config)? I'll setup my C2 with same adapter and run tests. |
@Fourdee The signal should be pretty strong given that it's 3 ft away from the AP. I haven't had issues with slow DHCP with any other devices, and there's only a few things connecting to the AP. The same image is also being testing in a completely different location with a different brand of AP with another C2 and WiFi module (same model), and it's behaving exactly the same way. An older image with an older version of DietPi does not have this issue on the same hardware and network. I'm starting to think this is coming down to a WiFi driver issue. @Fourdee are you using the same WiFi adapter as me (Edimax EW-7811Un)? |
Yep, testing now.
|
Notes:
🈯️ Confirmed, Actually, the above is due to connecting on a hotspot, where the gateway scraped from active (eth0) is not available for ping on wlan. |
So the issue appears to be, when both
Causing the re-connection script to constantly reconnect. Also fails to ping the gateway of wlan0, when on different subnetworks:
|
|
+ WiFi monitor now pre-installed to rootfs - DietPi-Config | WiFi-Monitor: Resolved an issue with syntax, and, incorrectly pinging the default gateway, instead of whats assigned to the wlan interface: https://github.com/Fourdee/DietPi/issues/2103
@Fourdee They are on the same networks. By disabled, do you mean configuration or just pull the plug? It definitely has the issue when eth is unplugged. |
Thanks. Interesting, what happens if you run these commands (please paste results):
|
@Fourdee Seems like if I disable eth, it has no problem disconnecting/reconnecting with The following was run with eth disabled and auto-reconnect enabled, and after a reboot:
|
Many thanks for testing 👍 So basically, running both Ok, so we need to rule out if this is a hardware specific issue. I'll run the same tests on RPi, see if we can replicate. If the issue is limited to C2, we can confirm its a hardware/kernel limitation, outside of our control. If the issue is device wide, we'll try to find a fix :) |
Ok RPi tests: Same network:STATIC
Different networks (hotspot)DHCP
So it appears routing is limited, when 2 adapters are connecting. Only |
So issue appears device wide. Seems solution is to setup a routing table: However, I do not know enough about it, to implement it at this time. The current solution, is to ensure only 1 hardware network device is enabled. EG: once WiFi is setup, disable the ethernet device via |
OK, thanks for digging deep into it! |
@frankdugan3 @Fourdee
As long as we cannot provide a real fix, perhaps then we should workaround:
Possibly related: https://dietpi.com/phpbb/viewtopic.php?f=11&t=5116#p15007 |
+ DietPi-Config | Assure that obtained Ethernet and WiFi gateways are indeed the gateways for the adapter and only apply it to config when one was found for this adapter. This assures that no doubled or wrong default routes are created, e.g. if an adapter is used for LAN access only. This might even solve #2103 as long as both interfaces are on different subnets with static IPs.
@MichaIng I've been using the DietPI with eth only in a particular subnet, but since I use vlans, I would take advantage of the wlan in the pi4 to connect to a different vlan and use that interface to a set of services, but I've been experiencing issues whule connecting (actually, I was never able to connect to wifi at all). Not sure if it's because I'm already using eth but the errors I am seeing are these:
Thank you. |
@miguelpruivo pls stick to your forum post https://dietpi.com/forum/t/cant-connect-to-wifi-with-pi4/18775/3 |
Creating a bug report/issue:
Required Information:
Linux DietPi 3.16.57+ #1 SMP PREEMPT Sun Aug 19 15:27:56 CEST 2018 aarch64 GNU/Linux
Additional Information (if applicable):
Steps to reproduce:
Expected behaviour:
Actual behaviour:
Extra details:
systemctl status dietpi-wifi-monitor
reports the following:The text was updated successfully, but these errors were encountered: