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

    The 4s blue flash blues

    Scheduled Pinned Locked Moved GPy
    main.pygpydeepsleep
    8 Posts 3 Posters 753 Views 4 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 kjm

      I've got a gpy with a simple lte prgram loaded into flash as main.py (I've removed boot.py). It wakes up, attaches & connects on lte cat M1, uploads a few values, de-connects/attaches then goes to deepsleep for 6 mins. It's supposed to do this indefinitely. Unfortunately the longest I've ever got out of it is 14 hrs. I always find it doing the old 4s blue flash of a regular gpy after it's stopped working. If I cycle the power my program starts again.

      I'm a bit flummoxed on what to do next. Where is this mysterious program that does the 4s blue flash & how is the gpy running it when my main.py program is sitting in flash as the supposedly preferred option of programs to run?

      1 Reply Last reply Reply Quote 0
      • P Offline
        Paul Thornton
        last edited by

        the blue flash is the "heartbeat" and lives in firmware. It can be disabled by

        import pycom
        
        pycom.heartbeat(False)
        

        That said. It doesnt explain why your machine is returning to that state after 14 hours. Does your code begin running again after a reset? Or does it stay missing untill you re upload the code.

        Would you be able to post the code? If you prefer it to be private you can email it to me at paul@pycom.io and include a link to this thread :)

        K 1 Reply Last reply Reply Quote 0
        • K Offline
          kjm @Paul Thornton
          last edited by

          @paul-thornton main.py runs again after a reset Paul, code on the email with link

          P K 2 Replies Last reply Reply Quote 0
          • P Offline
            Paul Thornton @kjm
            last edited by

            @kjm Thanks I got it. Will follow up via email.

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

              @kjm Paul I moved the gpy back from the battery we're monitoring to the expansion board. I think I can see where it is getting back to the 4s blue flash cycle. When it wakes up from it's 6min deepsleep it prints

              ets Jun  8 2016 00:22:57
              
              rst:0x5 (DEEPSLEEP_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
              configsip: 0, SPIWP:0xee
              clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
              mode:DIO, clock div:1
              load:0x3fff8028,len:8
              load:0x3fff8030,len:1728
              load:0x4009fa00,len:0
              load:0x4009fa00,len:14584
              entry 0x400a059c
              

              It's while printing out this wake-from-deepsleep message that it gives a couple of brief blue flashes with an on time about the same as the default 4s blue flash. I think this is where it get's stuck in this mode & fails to finish loading my main.py

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

                @kjm Loaded my program into both boot.py & main.py Still ends up up in 4s blue flash mode eventually just takes longer, a day or two. Not being able to run the boot/main.py programs reliably after deepsleep is a show stopper for this device if I can't find a fix. Kicking myself now for not testing this thoroughly first before wasting all that time with the LTE.

                R 1 Reply Last reply Reply Quote 0
                • R Offline
                  reidfo @kjm
                  last edited by

                  @kjm is it getting stuck trying to attach to LTE possibly? If so, do you have the watchdog timer set? I have a few trouble spots in my code that sometimes get stuck as well, so I make sure that in those loops I do not call WDT.feed(), so the board will reset after a few minutes of being in the stuck state.

                  K 1 Reply Last reply Reply Quote 0
                  • K Offline
                    kjm @reidfo
                    last edited by

                    @reidfo No I've got everything in try/except loops so it can't crash. This is always when it wakes from deepsleep, instead of running boot or main .py it jumps into dreaded 4s blue flash mode. Grim!

                    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