LoPY WIFI connections keeps reconnecting



  • Hi,

    this boot.py code works on the WiPy but results in a reconnect loop on LoPy.

    import machine
    from network import WLAN

    wlan = WLAN(mode=WLAN.STA)
    wlan.connect("myssid", auth=(WLAN.WPA2, 'password'), timeout=5000)
    print("Connecting to WLAN")
    while not wlan.isconnected():
    print(".", end="")
    machine.idle()
    print('WLAN connected')

    On LoPy the following is printed repeatedly to the console:

    state: 0 -> 2 (b0)
    reconnect

    Can you help please?

    Thanks,
    HC


  • administrators

    That should work on the LoPy too... What software version are you running so that I can try to reproduce it? (os.uname())

    Cheers,
    Daniel


Log in to reply
 

Pycom on Twitter

Looks like your connection to Pycom Forum was lost, please wait while we try to reconnect.