Soft reboot crashes



  • This is my boot.py

    # test
    import os
    
    from machine import UART
    uart = UART(0, 115200)
    os.dupterm(uart)
    print("Serial started")
    

    My main.py

    import setup_wifi
    print ("In main...011")
    

    And finally setup_wifi.py:

    import network
    import time
    
    # setup as a station
    try:
        wlan = network.WLAN(mode=network.WLAN.STA)
        print("Mode set to STA")
        wlan.connect(ssid="SKYFABCD", auth=(network.WLAN.WPA2, "XXXXXXXX"))
    
        while not wlan.isconnected():
    
            time.sleep_ms(50)
        wlan.ifconfig(config=("192.168.0.29", "255.255.255.0", "192.168.0.1",  "192.168.0.1"))
        print ("Booted in STA mode")
    except:
        print (str(e))
    

    When I do a CTRL-D for soft reboot it seems to hang on the line:

        wlan = network.WLAN(mode=network.WLAN.STA)
    

    The REPL looks like this (no >>> prompt) and ignores all keys:

    >>>
    PYB: soft reboot
    Serial started
    

    However pressing the reset switch it works fine.
    Getting the environment set up with PyCom is a painful process for sure. No doubt the developers have something in the pipeline that takes newbies off the starting line in a more elegant way.



  • @robert-hh

    (sysname='SiPy', nodename='SiPy', release='1.6.12.b1', version='v1.8.6-593-g8e4ed0fa on 2017-04-12', machine='SiPy with ESP32', sigfox='1.0.1')
    

    Looking good Robert, behaving OK now, will do more tests. I must experiment with not connecting to the LAN if it is already connected as this takes a few seconds. Thank you for your time and advice.

    • Paul


  • @robert-hh

    (sysname='SiPy', nodename='SiPy', release='1.6.12.b1', version='v1.8.6-593-g8e4ed0fa on 2017-04-12', machine='SiPy with ESP32', sigfox='1.0.1')
    

    Looking good Robert, behaving OK now, will do more tests. Thank you for you time and advice. - Paul



  • @pmulvey You better should update the firmware. There have been a lot of changes since then. Follow the update procedure https://docs.pycom.io/pycom_esp32/pycom_esp32/getstarted.html#firmware-upgrades



  • @robert-hh

    (sysname='SiPy', nodename='SiPy', release='1.0.0.b1', version='4fb4f54 on 2016-12-15', machine='SiPy with ESP32')
    


  • @pmulvey Which version of the firmware are you running. Please look at:

    import os
    os.uname()
    

Log in to reply
 

Pycom on Twitter