Set the WiFi name and password, connect to WiFi, and print the connection result on the serial port
from m5stack import *
from m5stack_ui import *
from uiflow import *
import wifiCfg
wifiCfg.doConnect('M5-R&D', '**********')
print(wifiCfg.wlan_sta.isconnected()) wifiCfg.autoConnect(lcdShow=False) wifiCfg.autoConnect(lcdShow=True) wifiCfg.reconnect() wifiCfg.doConnect('', '') M5Label('label0', x=193, y=67, color=0x000, font=FONT_MONT_14, parent=None) str(getP2PData()) network.WLAN(network.STA_IF) wlan.config(essid='', password='', authmode=network.AUTH_OPEN) wlan.active(True) str(wlan.scan()) str(wlan.isconnected()) wlan.connect('your_SSID', 'your_PASSWORD') str(wlan.config('mac')) str(wlan.ifconfig()) str(wlan.status()) wlan.disconnect() str(1001) smartconfig.set_type(smartconfig.ESPTOUCH) smartconfig.start() smartconfig.stop() str(smartconfig.status()) str(smartconfig.get_ssid()) str(smartconfig.get_password()) str(smartconfig.get_phoneip()) str(smartconfig.get_phoneip())