-
Notifications
You must be signed in to change notification settings - Fork 107
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
Non blocking WiFi.begin() & Client.connect() #273
Comments
@JAndrassy thank you very much for your quick response. I did come across #252 but was not sure if that was the solution. Regarding Thank you. |
what can your sketch do without WiFi connected to AP? as first remove the useless wait time in WiFiClient.connect. this
it jus wastes 10 seconds if the connection ended with timeout in firmware |
It reads the value of input pin A3 and controls 2 pins(output). When pin A3 is LOW, it will activate a timer to switch outputs LOW. This portion of the code should be able to execute even without WiFi. |
you can do 3 things with WiFi.begin:
maybe you can control the pins with MCU events/timers/interrupts so that they are independent from |
Thank you for the suggestions. Wifi scan before connecting seem to be a good workaround. Regarding Thank you. |
the firmware too? |
By firmware, do you mean server_drv.h? I have modified the 4 files listed in #252. Did I miss something? |
there are changes in the nina-fw for the NINA Esp32 module as linked in the description of the PR |
Just to confirm, is it Client connect timeout support #89? |
yes that is the PR for the firmware |
I am a little lost now. Where are firmware files located? Could you please guide me how to carry out this procedure. Thank you. |
in the repository with the PR of course https://github.com/arduino/nina-fw/blob/master/README.md |
I have the same issue (WiFi.begin()) being a blocking function. I have made some slight modification to WiFiNINA locally:
This should make it possible to (re-)connect in a non-blocking way. Would it be possible to have this available in a public release? |
@sebdehne did you read the comments above? |
Hi all,
Below is the code operating on an Arduino RP2040 Nano Connect. I am facing an issue with WiFi/MQTT reconnection portion of my code. When WiFi and MQTT are connected, the code functions as expected. In the event that one is missing, it obstruct
void loop()
.I am guessing
WiFi.begin()
andClient.connect()
are both blocking. Is there any workaround I can apply?Thank you.
The text was updated successfully, but these errors were encountered: