-
-
Notifications
You must be signed in to change notification settings - Fork 249
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
[no ci] Overlay: correct wireless interface files #1013
Conversation
i don't have a ready solution yet, but the way wifi acts now is very annoying. so i am all for changes as long as they make the interface to appear sooner and connect faster :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with points 1 and 3.
If it is verified, I agree with point 2 as well
Also we need to disable or remove the eth0 interface if there is no cable connection on the device, so that it does not hang unconnected and does not get fallback ip and does not conflict with WiFi. Point 4.
Thank you. |
In commit #998, I made WiFi connections work better and faster. Here were the main changes: wpa_supplicant Timing: Most Linux systems start wpa_supplicant before trying to connect. Starting it after, like in openipc, slows things down. In #998, I fixed this. I am not aware of another linux distribution or embedded linux system that places it in post-up. wpa_supplicant can absolutely be started before the wireless interface is fully "up" or activated: Doing so can indeed speed up the authentication process, especially in environments where faster network connection establishment is desired. By starting wpa_supplicant early, it can begin its tasks (like scanning for networks, setting up credentials, etc.) while other system or network-related processes are also initializing. Once the interface is up, if wpa_supplicant has already been running, it's in a ready state to authenticate immediately, rather than having to start up and then authenticate. In many systems, especially embedded systems or IoT devices as we handle, reducing the time it takes to establish a network connection after boot or wake can be critical. Starting wpa_supplicant early contributes to minimizing this delay. Timeout Change: We set the timeout to 15 seconds. It gives udhcpc enough time to work properly, making sure devices connect without issues. The dhcp lease is aquired before udhcpc moves into the background, saving time. Testing Results: Before my changes, connecting to WiFi on ALL my openipc devices took around 30 seconds, longer than any IoT device I have operated. With #998, it takes about 5 seconds. I checked and tested this on different WiFi modules, including RTL8189FS, RTL8189ES, and ATM603x, all using the Ingenic T20/31 platforms. I have no objection to reverting point #1. This could be customized per device on boot by the user or distribution. @victorxda, did my changes cause real issues for you on your devices, or are they just observations of the scripts? I'd hate to revert such a time saving effort. |
I made some boottime tests with the previous and current firmware to check for the actual time difference.
The pre-up vs. post-up makes indeed a difference, so we are keeping this change. The main culprit seems to be the discover packets, which sometimes stacks up to the complete 15 queries:
I don't see a timeout change, but there two options that come into question: |
|
Commit #998 introduces some problems:
wlan0 should not be enabled by default, it is not needed for ethernet only devices and requires a driver in almost all cases (that is what the wlandev interface is intended for).
post-up is the preferred choice for wpa_supplicant, so we can be sure the interface is initialized.-t 15
increases the discover counter to 15, removing it sets it to the default value of 3.