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

    No atom wifi reconnect after deepsleep

    Scheduled Pinned Locked Moved Support & Troubleshooting
    atom wifideepsleep
    2 Posts 2 Posters 176 Views 2 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.
    • K Offline
      kjm
      last edited by

      I've got a gpy connected to Atom via wifi through a router. After deepsleep the gpy reconnects to the network but Atom does not reconnect automatically like it does over a wired usb connection. So then I have to click the Atom disconnect then reconnect buttons. That makes the run button vanish. So then I have to click Packages/Pymakr/Run current file to get the run button back. It's all very tedious!

      Has anyone found a way to get Atom to reconnect automatically over wifi like it does over usb?

      P 1 Reply Last reply Reply Quote 0
      • P Offline
        PeterB @kjm
        last edited by

        @kjm This is indeed a major issue in debugging when using deepsleep.
        As soon as the system goes to sleep the USB connection and WiFi connection are gone.
        You then have to reconnect manuually first. As you describe, Atom is then also a major issue as the butons disappear and it thinks it is not fully connected while it is.
        This makes checking the functionality of a program using sleep very difficult. The only solution I found is using blinking LEDs of several colors to communicate with me the debugger. I am also busy with a logger which writes the state of the program to a file for later inspection.

        def blink(color, counts, intensity=0x1f, speed=0.5):
            colors = {
                "red": 0xFF0000,
                "green": 0x00FF00,
                "blue": 0x0000FF,
                "yellow": 0xFFFF00
            }
        
            pycom.rgbled(0x000000)
            for i in range(counts):
                col = colors.get(color, 0xFFFFFF)
                col = int(col * intensity / 255.0)
                pycom.rgbled(col)
                time.sleep(speed)
                pycom.rgbled(0)  # off
                time.sleep(speed)
        
        
        def blink_long(color):
            pycom.rgbled(color)
            time.sleep(4)
            pycom.rgbled(0)
        
        1 Reply Last reply Reply Quote 1

        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