ESP32 'LAN' Network Interface 'status' code explanation? #17907
Replies: 5 comments 6 replies
-
Are there any network.LAN.STAT_* entries available to you? For WLAN (and yes, I know you're asking about the phy) on ESP32, I see:
which I can use like: sta_if = network.WLAN(network.STA_IF)
if sta_if.status() == network.STAT_GOT_IP:
print("Got IP!") Maybe there are similar defs for the LAN? |
Beta Was this translation helpful? Give feedback.
-
Should be exposed via dir('module') once imported right? That published the list of defined constants... but not the values for each. :) If they are defined in 'network' would think they are common to WLAN and LAN based connection right? After a successful connection via LAN, i.e. Ethernet based connection, I get 5. But print(network.STAT_GOT_IP) results in 1010. Connect? Where...
Of course I have a while loop watching for successful connect or not, redacted that code. |
Beta Was this translation helpful? Give feedback.
-
Oh... Just for reference...
|
Beta Was this translation helpful? Give feedback.
-
Google A.I. seems half confused... It completely ignored the LAN vs. WLAN qualification....
|
Beta Was this translation helpful? Give feedback.
-
Found it... I have not used "help('module name')" much... dir(module) always seemed to be sufficient. But reading through the MP sources, I rediscovered the help(module) feature. Gave some interesting results:
Likely given the nature of ESP32 modules 99% of the time WLAN nic abstraction is used... not LAN. It does raise the question... why common constants are not used when applicable. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
ESP32 'LAN' Network Interface 'status' code explanation? Specifically network.LAN().status(), and interface instance of, returns 5 after isconnected() returns 5, after .active(False) also returns 5. Was expecting something different? Searched the ESP32 network docs... no reference the values status() returns?
Beta Was this translation helpful? Give feedback.
All reactions