Replies: 2 comments 1 reply
-
The Nodemcu devices are more a design specification than a specific board. various vendors sell devices under that name, and they all are Generic ESP32 devices. From what I can tell, the Generic ESP32 firmware is the right one.
Does that mean that the |
Beta Was this translation helpful? Give feedback.
1 reply
-
Please try the following script: import time
import network
import config
print(f'AP active: {network.WLAN(network.AP_IF).active(False)}')
wlan = network.WLAN(network.STA_IF)
print(f'STA active: {wlan.active(True)}')
wlan.disconnect()
ssid= config.wifi_ssid
pwd = config.wifi_password
cnt = 0
s = 1
if ssid in [w[0].decode() for w in wlan.scan()]:
wlan.connect(ssid, pwd)
while not wlan.isconnected():
print(f'status: {wlan.status()}')
cnt+=1
if cnt>10:
print(f'give up after {cnt*s} seconds')
break
time.sleep(s)
else:
print('connected!')
print(wlan.ifconfig())
else:
print(f'SSID:{ssid} not found') With a wrong password you will get something like:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Checks
I agree to follow the MicroPython Code of Conduct to ensure a safe and respectful space for everyone.
I've searched for existing issues matching this bug, and didn't find any.
Port, board and/or hardware
NodeMCU-32S
MicroPython version
ESP32_GENERIC-20240222-v1.22.2.bin
Reproduction
Expected behaviour
Expected to print out the
wifi.ifconfig()
, but it is empty, and no new device appear in router log.Observed behaviour
While the same code running well on NodeMCU-32 v1.2 the NodeMCU-32S it's not connecting. Can't figure out how to generate useful logs, because there is no any indication of any errors on console.
Additional Information
Full code here: eapo/eSP32-MicroPython: To control WS281X using DMX signals
Beta Was this translation helpful? Give feedback.
All reactions