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

    Error log to sd card

    Scheduled Pinned Locked Moved FiPy
    sdcardfipy
    9 Posts 4 Posters 1.5k 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.
    • D Offline
      Dariox
      last edited by

      I'm running a Fipy which is attaching to LTE CAT M1 and sending data over MQTT TLS every minute. Unfortunately the whole script stops working after approximately 1.5 day. To troubleshoot the issue, I would like to log errors to the sd card. Is this somehow possible?

      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @Dariox
        last edited by robert-hh

        @dariox Sure. Depends. For you own logs: Just mount the SD card, open a file in append mode and write to it.
        For the crash log: Connect it to a terminal on your PC and log the output to a file.
        And the usual question: which release of the firmware are you using? You'll get that with:

        import uos
        uos.uname()
        
        D S 2 Replies Last reply Reply Quote 0
        • D Offline
          Dariox @robert-hh
          last edited by

          @robert-hh So it's not possible to log this crash log to the SD card?
          I'm not running the latest FW currently, but will update.

          1 Reply Last reply Reply Quote 0
          • sebS Offline
            seb
            last edited by

            Look into https://docs.pycom.io/chapter/firmwareapi/micropython/sys.html#sysprintexceptionexc-filesysstdout

            if you want to print errors to files

            robert-hhR 1 Reply Last reply Reply Quote 0
            • robert-hhR Offline
              robert-hh @seb
              last edited by

              @seb Yes, but that is not the core dump after calling for THE GURU.

              sebS 1 Reply Last reply Reply Quote 0
              • sebS Offline
                seb @robert-hh
                last edited by

                @robert-hh

                Thats true, for core dumps all hope is lost without something externally logging because the fact that the core dump has happened means the esp32 has crashed so it cant be logging

                1 Reply Last reply Reply Quote 0
                • S Offline
                  svonbentzel @robert-hh
                  last edited by

                  @robert-hh said in Error log to sd card:

                  @dariox Sure. Depends. For you own logs: Just mount the SD card, open a file in append mode and write to it.
                  For the crash log: Connect it to a terminal on your PC and log the output to a file.
                  And the usual question: which release of the firmware are you using? You'll get that with:

                  import uos
                  uos.uname()
                  

                  Sorry for the old threat. but I have the same problem, and the specially problem is: some errors only if the Pycom board only connected over LiPo Battery. if the board connected over USB --> Errors never seen.

                  robert-hhR 1 Reply Last reply Reply Quote 0
                  • robert-hhR Offline
                    robert-hh @svonbentzel
                    last edited by robert-hh

                    @svonbentzel That looks like a power supply problem. Can you monitor the power supply for short voltage dropouts?

                    S 1 Reply Last reply Reply Quote 0
                    • S Offline
                      svonbentzel @robert-hh
                      last edited by

                      @robert-hh Hello, i have tested with a multiple LiPo batteries from 300 ma - 8000 mah. same issue. I monitor the voltage via a web service, but only all 3 minutes. I can't see any spikes. I think its a inferences problem with the i2c bus.
                      I think I have a EMV problem. but I want to log the output from the board to get a answer.

                      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