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

    Wipy 3 irregularly crashes after deepsleep

    Scheduled Pinned Locked Moved Issues & Bugs
    wipydeepsleepcrash
    3 Posts 2 Posters 727 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.
    • M Offline
      MoeweX
      last edited by

      Hi,

      I have been evaluating the deepsleep capabilities of my Wipy 3 quite intensively during the last days. I noticed that it always crashes after a random amount of deepsleep cycles upon which a hard reset is required.
      When it crashed, it has not connected to my WIFI (as specified in boot.py) and also did not setup its own WIFI, so I cannot access the REPL. However, it consumes power as it is warm. I am not sure whether the board crashes while going to deepsleep or while waking up from it.

      Am I doing something wrong or is this a firmware/hardware issue? Find below a boot.py and main.py that I can use to reproduce the problem, it usually occurs during the first hour.

      # boot.py -- run on boot-up
      import machine
      import pycom
      import time
      
      def connectToWlan():
          from network import WLAN
          wlan = WLAN(mode=WLAN.STA)
          nets = wlan.scan()
          for net in nets:
              if net.ssid == '<SSID>':
                  print('Network found!')
                  wlan.connect(net.ssid, auth=(net.sec, '<AUTH>'), timeout=5000)
                  while not wlan.isconnected():
                      pycom.rgbled(0x7f0000) # red
                      machine.idle() # save power while waiting
                  print('WLAN connection succeeded!')
                  wlan.ifconfig(config=('192.168.0.14', '255.255.255.0', '192.168.0.1', '192.168.0.1'))
                  print(wlan.ifconfig())
                  break
      
      # Code to be run on boot-up
      pycom.heartbeat(False)
      connectToWlan()
      pycom.rgbled(0x007f00) # green
      time.sleep(1) # wait shortly
      
      # main.py -- runs after boot.py
      import time
      import pycom
      
      ###########################################################################
      # Constants
      DEEPSLEEP_TIME = 2 # seconds
      
      ###########################################################################
      print("Going to deepsleep in 10 seconds")
      for i in range(10):
          pycom.rgbled(0) # off
          time.sleep(0.5)
          pycom.rgbled(0xffa500) # orange
          time.sleep(0.5)
      
      print("Going to deepsleep")
      time.sleep(1) # better wait a little
      machine.deepsleep(DEEPSLEEP_TIME * 1000)  # must be milliseconds
      

      Personally, I think the Wipy crashes after the wake up and before boot.py is run, but I am not sure how to proof that without staring at the Wipy for an hour.

      T 1 Reply Last reply Reply Quote 1
      • T Offline
        Tankfull @MoeweX
        last edited by

        @moewex I have been having the same issue. My deep sleep time is 60 minutes. The WiPy will function fine for 1 - 2 weeks, then it hits this stall out mode where it does not connect to wifi and heats up. Not sure where the issue is on this one.

        1 Reply Last reply Reply Quote 0
        • M Offline
          MoeweX
          last edited by

          As of last week, I cannot reproduce the error anymore... . If I encounter the issue again, I will write here again.

          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