Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

A Big Error #35

Open
ywz978020607 opened this issue Mar 15, 2023 · 2 comments
Open

A Big Error #35

ywz978020607 opened this issue Mar 15, 2023 · 2 comments

Comments

@ywz978020607
Copy link

Don't you test on esp8266?
"""
def do_connect(ssid, password):
wlan_sta.active(True)
if wlan_sta.isconnected():
return True* # not None!!!!!

@ywz978020607
Copy link
Author

最终整理版(可以scan或手动输入均可):History_mpy/Micropython_esp32_8266/mpy_01s_8266_32_手动配网 at master · ywz978020607/History_mpy

@ebolisa
Copy link

ebolisa commented Mar 15, 2023

I believe "None" is used to force the code to go into AP. I've been wrong in the past so...

import wifimgr

wlan = wifimgr.get_connection()

if wlan is None: # <=========

    print("Could not initialize the network connection.")
    while True:
        pass  # you shall not pass :D

# Main Code goes here, wlan is a working network.WLAN(STA_IF) instance.
print("ESP OK")

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants