[SOLVED] LoPy Firmware Update Failed



  • 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



  • 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


  • administrators

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

    Do this on all accounts you want to use.



  • @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,



  • @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.



  • @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



  • @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.



  • @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 ;)



  • 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,



  • @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.


Log in to reply
 

Pycom on Twitter