← index #3427PR #4404
Likely Duplicate · high · value 4.031
QUERY · ISSUE

SmartConfig ESP8266 and ESP32

openby zaforicopened 2017-11-08updated 2024-10-31
enhancementport-esp8266port-esp32

Add smartconfig capability to micropython for esp8266 and esp32

Add the following to modesp.c
{ MP_ROM_QSTR(MP_QSTR_smartconfig), MP_ROM_PTR(&mp_module_esp_smartconfig) },

Create smartconfig python wrapper. An old example is at https://github.com/mianos/micropython/blob/master/esp8266/mod_esp_smartconfig.c

CANDIDATE · PULL REQUEST

add esp32 smartconfig

closedby Lupinoopened 2019-01-09updated 2024-02-06
port-esp32

#3427

import smartconfig
import network
wlan = network.WLAN(network.STA_IF)
if not wlan.active():
    wlan.active(True)

smartconfig.set_type(smartconfig.ESPTOUCH)
smartconfig.start()
while smartconfig.status() != smartconfig.SC_STATUS_LINK_OVER:
    pass
smartconfig.stop()

print(smartconfig.get_ssid())
print(smartconfig.get_password())
print(smartconfig.get_phoneip())

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied