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

    [SOLVED] LoPy Firmware Update Failed

    Scheduled Pinned Locked Moved Issues & Bugs
    lopyfirmware
    10 Posts 4 Posters 2.6k 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.
    • JVGDJ Offline
      JVGD
      last edited by livius

      Hi all,

      The problem

      • Firmware Update tool always failing to update firmware

      Information:

      • Board: LoPy
      • Expansion board v2.1A

      Reproduce:
      I downloaded the Unix version of the update tool in the official link, then I untared it with:

      $ tar zxvf pycom_firmware_update_1.1.6.b0.tar.gz 
      pyupgrade/README
      pyupgrade/bin/
      pyupgrade/bin/pypic.py
      pyupgrade/bin/updater.py
      pyupgrade/bin/esptool.py
      pyupgrade/fwupdater/
      pyupgrade/lopyupdate.py
      pyupgrade/spinner.gif
      pyupgrade/update
      
      $ cd pyupgrade/
      

      Once there I have 2 options to run the terminal embedded update program or the GUI. I try both with the following comands (according to the tool I wanted to try)

      $ ./update
      $ python2 lopyupdate.py
      

      Both of them throw the same error:
      "The upgrade failed, please check the connection and try the steps again"

      So I thought that the problem may be in the hardware setup. My set up is:
      Image

      So all the jumpers are connected and I also connected G23 with GND and hit Reset button before the upload. When I plug it, my linux system translates the connection to the serial port "/dev/ttyUSB0".

      To check that everything is working fine I issue:

      $ sudo minicom -D /dev/ttyUSB0 -b 115200
      Welcome to minicom 2.7.1
      
      OPCIONES: I18n 
      Compilado en Apr 20 2017, 07:07:53.
      Port /dev/ttyUSB0, 13:12:19
      
      Presione CTRL-A Z para obtener ayuda sobre teclas especiales
      
      ets Jun  8 2016 00:22:57
      
      rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
      waiting for download
      

      So that means that the hardware set up looks fine. So what is the problem?

      Hope you can help me,

      Regards,

      Javier

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        ssmith @JVGD
        last edited by

        @jvgd Your jumper is going to 5V. It is supposed to go the GND. Also never connect to the 5V pin. The LoPy IO's are not 5V tolerant.

        JVGDJ 2 Replies Last reply Reply Quote 1
        • JVGDJ Offline
          JVGD @ssmith
          last edited by

          Dear @ssmith,

          Not, the jumper is not connected to Vin, although the picture may be missleading because of the angle I took it. The pins 23 and GND are connected. May this picture be more enlightening.
          alt text

          PD: Why cant I reply to a post before 10 min after I posted?? Make no sense, I wanted to reply to you immediately since you were very kind answering me very quickly

          Regards,

          C 1 Reply Last reply Reply Quote 1
          • C Offline
            crumble @JVGD
            last edited by

            @jvgd said in LoPy Firmware Update Failed:

            PD: Why cant I reply to a post before 10 min after I posted?? Make no sense, I wanted to reply to you immediately since you were very kind answering me very quickly

            This shall help againt spammers. You have to earn 10 points to reduce the time between your posts. Look at the end of your post, you just earned 1 point ;)

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              ssmith @crumble
              last edited by ssmith

              @JVGD If you have a terminal program open it will fail because it can't talk to the board. You might also have to press the reset button before running the update.

              1 Reply Last reply Reply Quote 0
              • JVGDJ Offline
                JVGD @ssmith
                last edited by

                @ssmith, I am getting confused, I know the LoPy works at 3.3V, but I do not know what jumper you are meaning.

                Do you mean the wire I have placed between the 4th pin at the left (G23) and the 2nd pin at the rigth (GND)?

                You can see in the picture the metal connector hits the GND connector hole, so it should be connected, in principle, to the GND ground (unless I am missing something)

                Do you mean this one? Or one of the jumpers at the left in the board, if so which of the following ones?:

                • TX
                • TRS
                • RX
                • CTS
                • BAT
                • LED
                • CHG

                Thanks for your help,

                Regards,

                Javier

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  ssmith @JVGD
                  last edited by

                  @jvgd Your jumper is fine. I was just checking that you closed the terminal program before you run the update since it uses the uart. You can only have one connection to the LoPy at a time.

                  JVGDJ 1 Reply Last reply Reply Quote 0
                  • JVGDJ Offline
                    JVGD @ssmith
                    last edited by

                    @ssmith, as you mentioned I closed all the programs (including the terminal) that could be opening the serial port in order to leave free the connection for the updater tool to connect.

                    Sorry for the delay, I was at lunch

                    Regards,

                    1 Reply Last reply Reply Quote 0
                    • X Offline
                      Xykon administrators
                      last edited by

                      Please run sudo usermod -a -G dialout $USER and log out or restart the PC.

                      Do this on all accounts you want to use.

                      Christian Ehlers

                      JVGDJ 1 Reply Last reply Reply Quote 1
                      • JVGDJ Offline
                        JVGD @Xykon
                        last edited by

                        Thank you for your insight @xykon, I read your command and it came up to my mind. I wasn't using "sudo" and either I have a special group for handling serial connections in this computer.

                        So you gave me the solution, I didn't add a dialout group but I just used sudo to run the app.

                        Running one of the tools with sudo made the trick:

                        $ sudo ./update
                        

                        Thank you again for your help. I will mark this thread as solved (if I can).

                        Regards and have a great friday!

                        Javier

                        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