Replies: 1 comment 2 replies
-
I think there is some argument to be made about keeping it a short list of return values. Also it is good to know whether the station got disconnected from the AP or did initiate the disconnect itself (or never attempted to connect) The access point does return quite a lot standard disconnect reasons, so why not include those? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In WiFiNINA Arduino has added a method
WiFi.reasonCode()
. It was not in the first WiFi library. The new WiFi libraries and the Renasas Core, C33 WiFi and WiFS3, both have it, but it only returns 0.The return values in the WiFiNINA library are values directly from the ESP32 IDF framework used for the firmware implementation and there is no enumeration or constants in the library..
The
reasonCode()
should explain whybegin
failed. The AP can not be found, the password is wrong, ..When the esp8266 core maintainers wanted to add more information about fail of
WiFi.begin
, they added a new value to wl_status_t. Only WL_WRONG_PASSWORD was missing. This enhanced WiFi.status() implementation with a useful information.I think
reasonCode()
should not be part of the standard Arduino WiFi API. I like the new status value for esp8266 more.What is your opinion on
WiFi.reasonCode()
?Beta Was this translation helpful? Give feedback.
All reactions