-
Notifications
You must be signed in to change notification settings - Fork 7.5k
drivers: wifi: simplelink: add timeout for fast connect feature #12505
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
drivers: wifi: simplelink: add timeout for fast connect feature #12505
Conversation
Codecov Report
@@ Coverage Diff @@
## master #12505 +/- ##
=======================================
Coverage 53.78% 53.78%
=======================================
Files 242 242
Lines 27697 27697
Branches 6729 6729
=======================================
Hits 14896 14896
Misses 9997 9997
Partials 2804 2804 Continue to review full report at Codecov.
|
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.
LGTM
recheck |
@GAnthony I tried the http_get sample, and I am still seeing the error for some reason:
I added to samples/net/sockets/http_get/boards/cc3220sf_launchxl.conf. Is there anything else I need to do? |
@vanti, no need to update the .conf file, the default is 30 seconds. |
@GAnthony I am on commit
I can see The problem always happens on the first run after power cycling. I can see it enter main() before getting an IP address. I had also previously flashed the blinky example. -Vincent |
So, how does this patch work? Does it stop Zephyr boot process until the device is connected to AP, for up to 30s? If so, I'd say that delay is too big, and should be 5-10s by default. |
OK, after more testing, I now see an error sometimes: The -6152 error code is But, this comes after connection succeeds, so there must be some precondition not always being met before calling SimpleLink's sl_NetAppDnsGetHostByName() function. Note: with the new Logging subsystem delayed printing, printk's from main might be out of order with respect to Log prints, so debugging driver startup with logs/printk's is now more challenging. I'll need to see what could be the intermittent causes of this SimpleLink error code. |
Yes. A 5-10s default would be reasonable. Typically, the WiFi connection either succeeds within a few seconds, or not at all. |
The SimpleLink wifi driver enables the Fast Connect method of WiFi provisioning, which allows the network coprocessor to reconnect to a previously connected Access Point (AP) on startup. Previously, if Fast Connect failed to connect, any network socket applications would inevitably fail, as there would have been no wifi connection. This patch adds a configurable timeout for the Fast Connect feature, after which timeout, an error is logged informing the user to manually reconnect to an AP. Reconnection is typically accomplished by separately running the wifi sample shell program. Fixes: zephyrproject-rtos#11889 Signed-off-by: Gil Pitney <[email protected]>
11075de
to
987708c
Compare
Changes in this update:
@vanti, After connecting to the AP with the WiFi shell sample, |
recheck |
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.
Thanks.
The SimpleLink wifi driver enables the Fast Connect method of
WiFi provisioning, which allows the network coprocessor to
reconnect to a previously connected Access Point (AP) on
startup.
Previously, if Fast Connect failed to connect, any network
socket applications would inevitably fail, as there would have
been no wifi connection.
This patch adds a configurable timeout for the Fast Connect
feature, after which timeout, an error is logged informing
the user to manually reconnect to an AP.
Reconnection is typically accomplished by separately running the
wifi sample shell program.
Fixes: #11889
Signed-off-by: Gil Pitney [email protected]