Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Soft reboot crashes

    Scheduled Pinned Locked Moved SiPy
    soft reset
    6 Posts 2 Posters 2.0k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P Offline
      pmulvey
      last edited by pmulvey

      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-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @pmulvey
        last edited by

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

        import os
        os.uname()
        
        P 2 Replies Last reply Reply Quote 0
        • P Offline
          pmulvey @robert-hh
          last edited by

          @robert-hh

          (sysname='SiPy', nodename='SiPy', release='1.0.0.b1', version='4fb4f54 on 2016-12-15', machine='SiPy with ESP32')
          
          robert-hhR 1 Reply Last reply Reply Quote 0
          • robert-hhR Offline
            robert-hh @pmulvey
            last edited by

            @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

            P 1 Reply Last reply Reply Quote 0
            • P Offline
              pmulvey @robert-hh
              last edited by

              @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

              1 Reply Last reply Reply Quote 0
              • P Offline
                pmulvey @robert-hh
                last edited by

                @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
                1 Reply Last reply Reply Quote 0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                • 1 / 1
                • First post
                  Last post

                Pycom on Twitter

                Pycom