-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
WiFi library - os crash on Giga R1 when WiFiClient global #753
Comments
This seems to be caused by the way the assignment operator of WiFiClient is implemented: ArduinoCore-mbed/libraries/SocketWrapper/src/MbedClient.h Lines 41 to 62 in fee275d
When doing |
@facchinm if I understand correctly the logic that this helper method implements, why don't we use shared_ptr instead? |
We are working on it, don't worry |
The root problem described is solved in #766, but there are more: status() is not returning WL_CONNECTED when it is connected. It's returning '1' which per wl_definitions.h is WL_NO_SSID_AVAIL. It did connect to a known SSID so this cannot be correct. |
@rickclemenzi client.status() doesn't return WL_ constants. it should return TCP states |
@JAndrassy Thanks and I hear you, but there is a significant disconnect here that needs clearing up. WiFi.status() per the online manual is clearly WL_... based, and WiFi.cpp from the mbed_giga library is WL_.. based as well (my address C:\Users\RC2\AppData\Local\Arduino15\packages\arduino\hardware\mbed_giga\4.0.10\libraries\WiFi). It seems there are two half separate library threads involved, but I don't see how the WiFi.cpp is not the one setting status in for WiFiClient. Sorry to be thick, but I don't see how all these facts fit together and would appreciate clarification. The documentation was 100% correct for my earlier ports to the Uno Wifi Rev 2. Looking again I see there are actually 2 status() definitions at the link you gave -- one your link and https://github.com/JAndrassy/Arduino-Networking-API/blob/main/ArduinoNetAPIDev.md#status |
@rickclemenzi this issue is about the WiFiClient and the PR you linked is about Client and Server. why would you mention WiFi.status here? |
As per the thread below, os crashes on Giga R1 when WiFiClient is declared as global.
https://forum.arduino.cc/t/call-to-server-available-fails-if-client-is-a-global-variable/1137604
The text was updated successfully, but these errors were encountered: