LoPy died after update


  • Pybytes Beta

    I tried the new firmware update, but it failed.
    After that I tried the flash_debug.py option: which succeeded as shown below:

    0 write 0x0 2
    Connecting...
    value: 0x0
    length: 2
    write 0x60002008 0x00000000 0x00400000
    write 0x60002010 0x00000000 0x00000000
    write 0x60002000 0x08000000 0xffffffff
    write 0x60002008 0x00000000 0x00400000
    write 0x60002010 0x00000000 0x00000000
    write 0x60002000 0x08000000 0xffffffff
    write 0x60002008 0x00000000 0x00400000
    write 0x60002010 0x00000000 0x00000000
    write 0x60002000 0x08000000 0xffffffff
    write 0x60002008 0x00400000 0x00400000
    write 0x60002010 0x00000000 0x0000ffff
    write 0x60002000 0x04000000 0xffffffff
    write 0x60002008 0x00000000 0x00400000
    write 0x60002010 0x00000000 0x00000000
    write 0x60002000 0x08000000 0xffffffff
    get status: 0x0
    ESP DEV DISCONNECT...

    After that I tried the update again. It fails again.

    Now my LoPy is dead. The flash light doesn't flash anymore and going back a firmware version with the save boot option doesn't help either.

    What to do now?


  • Pybytes Beta

    @Xykon Thxs for you help on this.

    The given answer do 'python updater.py -f ../firmware/lopy_0.9.2.b2_868.bin -p /dev/ttyUSB0' (after it is set to 'Waiting for download') solved my issue.


  • administrators

    I'd suggest you email support@pycom.io to ask for an RMA. However I don't work for Pycom so I'm not sure about their official processes.



  • @Xykon said in LoPy died after update:

    When you press the reset button on the LoPy while GND is connected to G23 you should see the following in the serial terminal:

    rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
    waiting for download
    

    You mention having two LoPy. Do you use the same expansion board each time?

    Do you get the waiting for download message on the other LoPy when GND is connected to G23 and reset button is pressed?

    If you get this on one LoPy but not the other and they both use the same expansion board, USB cable etc. then it's most likely one of your LoPy is broken. The waiting for download message is from the ROM bootloader in the chip itself which you can't accidentally modify/erase.

    No output with the faulty one. Output with the good one. What can I do now?


  • administrators

    When you press the reset button on the LoPy while GND is connected to G23 you should see the following in the serial terminal:

    rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
    waiting for download
    

    You mention having two LoPy. Do you use the same expansion board each time?

    Do you get the waiting for download message on the other LoPy when GND is connected to G23 and reset button is pressed?

    If you get this on one LoPy but not the other and they both use the same expansion board, USB cable etc. then it's most likely one of your LoPy is broken. The waiting for download message is from the ROM bootloader in the chip itself which you can't accidentally modify/erase.



  • @Xykon Did G23-GND connection, serial/USB is working, other LoPi works, no output with PUTTY @115200


  • administrators

    @Baruch1966 said in LoPy died after update:

    Exception: Failed to connect to ESP32: Timed out waiting for packet header, on line 75

    This usually happens if your LoPy / WiPy 2 isn't in ROM bootloader mode.

    Please check that you have connected GND and G23 on the expansion board (P2 on the module itself).

    If it still doesn't work please check that your COM port is correct (check COM ports in device manager).

    What do you see in a serial terminal when you press the reset switch on the module when G23 / P2 is connected to GND?



  • Same here, only with Window 10 updater procede on friday.

    LoPi module dead! No blinky, no output on PUTTY after reset with G23 connected to GND.

    No juice with boot mode change, Dead, dead, dead.

    Manual updater procedure today (sunday)

    C:\Program Files (x86)\Pycom\Pycom Firmware Update\Upgrader>..\Python27\python.exe bin\updater.py --port COM4 --file firmware\lopy_0.9.2.b2_868.bin
    Namespace(file='firmware\lopy_0.9.2.b2_868.bin', port='COM4')
    Connecting...
    Exception: Failed to connect to ESP32: Timed out waiting for packet header, on line 75



  • Your are welcome. We'll sort this issue with the UI asap. Thanks for everyone's help.

    Cheers,
    Daniel


  • Pybytes Beta

    @daniel said in LoPy died after update:

    python updater.py -f ../firmware/lopy_0.9.2.b2_868.bin -p /dev/ttyUSB0

    This is the output:

    python updater.py -f ../firmware/lopy_0.9.2.b2_868.bin -p /dev/ttyUSB0
    Namespace(file='../firmware/lopy_0.9.2.b2_868.bin', port='/dev/ttyUSB0')
    Connecting...
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 115200
    Changed.
    Erasing flash...
    Compressed 4096 bytes to 2891...
    Wrote 4096 bytes (2891 compressed) at 0x00001000 in 0.3 seconds (effective 127.0 kbit/s)...
    Hash of data verified.
    Erasing flash...
    Compressed 256 bytes to 125...
    Wrote 256 bytes (125 compressed) at 0x00004000 in 0.0 seconds (effective 129.9 kbit/s)...
    Hash of data verified.
    Erasing flash...
    Compressed 639008 bytes to 385542...
    Wrote 639008 bytes (385542 compressed) at 0x00010000 in 33.9 seconds (effective 150.7 kbit/s)...
    Hash of data verified.

    Leaving...
    Verifying just-written flash...
    Verifying 0x1000 (4096) bytes @ 0x00001000 in flash against /home/gertjan/Downloads/pyupgrade/bin/../firmware/bootloader.bin...
    -- verify OK (digest matched)
    Verifying 0x100 (256) bytes @ 0x00004000 in flash against /home/gertjan/Downloads/pyupgrade/bin/../firmware/partitions.bin...
    -- verify OK (digest matched)
    Verifying 0x9c020 (639008) bytes @ 0x00010000 in flash against ../firmware/lopy_0.9.2.b2_868.bin...
    -- verify OK (digest matched)

    This worked! THXS for your splendid help!!!



  • @gertjanvanhethof Please see my reply from 2 minutes ago, with instructions to run the script manually.


  • Pybytes Beta

    @littlebat I tried (based on your advice), but still it failed to update.

    So I put the jumper wire in place, connected with minicom, did the reset, the message 'waiting for download..' was shown, closed the terminal and run the firmware update: failed.

    Other suggestions?

    Thxs for you help! (also thxs to all others!).



  • ets Jun 8 2016 00:22:57

    rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))

    OK that's good, it means the hardware is OK.

    In that mode, where P2 (G23) is connected to GND, and the LoPy has been reset, please close minicom, and download the latest firmware updater (pycom_update_0.9.2.b2a.tar.gz)

    which can be found here: https://www.pycom.io/support/supportdownloads/

    Extract the zip file, open a new terminal, enter the extracted directory (pyupgrade) and also enter the bin directory. Inside there, please run:

    python updater.py -f ../firmware/lopy_0.9.2.b2_868.bin -p /dev/ttyUSB0

    It will take a lot to complete, like 2 minutes as we have decreased the baudrate to 115200 since faster speeds were causing problems for some users. At the beginning, it will look like it has stalled, just wait around 30s and the process will continue until all the images are flashed.

    Please let me know. If it fails please copy the console output. Thanks.

    I'll be investigating why the UI version is not working on some linux distros....

    Cheers,
    Daniel



  • When it says waiting for download, close the terminal and run the updater.


  • Pybytes Beta

    @daniel

    The output is (when jumpers placed and reset is done):

    Port /dev/ttyUSB0, 11:47:39

    Press CTRL-A Z for help on special keys

    ets Jun 8 2016 00:22:57

    rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
    waiting for download


  • Pybytes Beta

    @daniel The output is as following:

    ets Jun 8 2016 00:22:57

    rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    flash read err, 1000
    Falling back to built-in command interpreter.
    OK

    minicom setting is:

    Serial Device: /dev/ttyUSB0
    Bps/Par/Bits: 115200 8N1



  • Also try connecting P2 (G23) to GND and reset the LoPy checking if there's any output on the serial terminal.

    Cheers,
    Daniel



  • Don't worry, we'll fix it. Let's first see if the ESP32 is responding. You won't see any blinking LED or WiFi SSID as the firmware update left the memory in a broken state, but it can still be recovered.

    Please try the following: Simply connect the LoPy to the computer via the expansion board, open a serial terminal (minicom or screen for instance), and then reset the LoPy. Do you see any output?

    If you do, then we can reflash the LoPy as the hardware is fine.

    Let me know and I'll help you bring your LoPy to life today.

    Cheers,
    Daniel


  • Pybytes Beta

    I tried everything you mentioned.
    My LoPy is not sending its wifi ssid, the led is not blinking and it's not possible to connect to it using USB/serial.
    I'am using Linux Mint.

    /dev/ttyUSB0 is available.

    The firmware upgrade still fails.

    What to do next? I need to get this fixed because I have to give a demo this week!



  • Hello,

    Did you try to power cycle the board? If after doing a power cycle it still seems to be "dead", please try with the new updater that flashes everything including the bootloader. This will remove the flash read-only issue for good and after that the OTA updates will work without issues.

    The new updater is here: https://www.pycom.io/support/supportdownloads/

    Is that the one you are using? On which OS?

    Cheers,
    Daniel


Log in to reply
 

Pycom on Twitter