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

    How to solve the firmware update failures

    Scheduled Pinned Locked Moved Announcements & News
    63 Posts 15 Posters 47.1k Views 16 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.
    • L Offline
      LoneTech @daniel
      last edited by

      @daniel I think that bug causes full on readonly mode (I could be wrong). The data present in flash indicates that it did write, but didn't erase properly. On the second board, I did try esptool erase then OTA update; while it marked the image as updated, it caused a memory access error on boot. So I used esptool to write the firmware, and after that it booted the new revision. So it would seem, for the secondary flash position to update correctly on these particular boards, I need to get both the OTA done and write it with esptool. I haven't analyzed the bugfix you refer to to see if it would solve this, but I am certainly willing to try; I have backups of my boards now and could recover. Right now I'm happy I got them to boot the most recent release. :)

      1 Reply Last reply Reply Quote 1
      • O Offline
        oneeyed @Xykon
        last edited by

        @Xykon said in How to solve the firmware update failures:

        esptool.py --chip esp32 --port COM24 --baud 115200 write_flash 0x210000 lopy_0.9.1.b1_868.bin -fs 4MB -z

        Indeed it allowed be to program the firmware as well, when no other methods could. Thanks.

        B 1 Reply Last reply Reply Quote 1
        • D Offline
          daniel
          last edited by

          @daniel I think that bug causes full on readonly mode (I could be wrong). The data present in flash indicates that it did write, but didn't erase properly.

          The bug causes random bits in the flash status register to be written with wrong values, which can lead to different behaviors, the most common is the entire flash to be write protected, but it also can write protect only some sections of the flash memory.

          1 Reply Last reply Reply Quote 1
          • B Offline
            Bashir @oneeyed
            last edited by

            @oneeyed said in How to solve the firmware update failures:

            @Xykon said in How to solve the firmware update failures:

            esptool.py --chip esp32 --port COM24 --baud 115200 write_flash 0x210000 lopy_0.9.1.b1_868.bin -fs 4MB -z

            Indeed it allowed be to program the firmware as well, when no other methods could. Thanks.

            Hi, I can confirm this method worked for me also. I flashed the default address and recovery areas.

            Thank you

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

              @Bashir said in How to solve the firmware update failures:

              Thank you

              Glad I could help.

              Would you mind up-voting my post above? This helps getting rid of certain restrictions on this forum.

              Christian Ehlers

              1 Reply Last reply Reply Quote 2
              • L Offline
                livius
                last edited by

                Hi,

                i have problem with update my Wipy2.0.
                I have unlocked successfully - all looks like on screen @Batilan

                But i still ca not update my board. When i copy appimg.bin to /flash/sys and restart my WiPy
                it does not start. If i turn on self mode it start with oldest firmware.

                Two questions here:

                1. how to upgrade to most recent version?
                2. how to permanently revert this update? I see no way to revert firmware to any previous version PERMANENTLY. I can revert it temporary but not permanently.

                I try update WiPy2.0 only because it crash on simple blink heart led in the loop. And i think first upgrade and test again.

                think about people first, then computers

                1 Reply Last reply Reply Quote 0
                • L Offline
                  livius
                  last edited by

                  Hi,

                  i have problem with update my Wipy2.0.
                  I have unlocked successfully - all looks like on screen @Batilan

                  But i still ca not update my board. When i copy appimg.bin to /flash/sys and restart my WiPy
                  it does not start. If i turn on self mode it start with oldest firmware.

                  Two questions here:

                  1. how to upgrade to most recent version?
                  2. how to permanently revert this update? I see no way to revert firmware to any previous version PERMANENTLY. I can revert it temporary but not permanently.

                  I try update WiPy2.0 only because it crash on simple blink heart led in the loop. And i think first upgrade and test again.

                  think about people first, then computers

                  J 1 Reply Last reply Reply Quote 0
                  • R Offline
                    Ralph
                    last edited by

                    Hi, @livius

                    First, try using the update tool (go to Firmware Updates) to update your WiPy2.0 and see if it solves your problem. This tool wil automatically update to the latest version.

                    If you still have the crash at startup after doing this, please provide the code you are using that is making it crash, and we can help you fix it.

                    L 1 Reply Last reply Reply Quote 0
                    • J Offline
                      jgmdavies @livius
                      last edited by

                      @livius Did you try the Pycom updater, or where did you get the file appimg.bin?

                      Jim

                      L 1 Reply Last reply Reply Quote 0
                      • L Offline
                        livius @jgmdavies
                        last edited by

                        @jgmdavies
                        I have downloaded updated app and go to folder and rename file for wipy to appimg.bin
                        then i put it by ftp

                        think about people first, then computers

                        J 2 Replies Last reply Reply Quote 0
                        • J Offline
                          jgmdavies @livius
                          last edited by

                          @livius Thanks!

                          1 Reply Last reply Reply Quote 0
                          • J Offline
                            jgmdavies @livius
                            last edited by

                            @livius Thanks, I hadn't realised that is an option. For anyone else using Windows, you can probably find the .bin files at:

                            C:\Program Files (x86)\Pycom\Pycom Firmware Update\Upgrader

                            1 Reply Last reply Reply Quote 0
                            • L Offline
                              livius @Ralph
                              last edited by

                              @Ralph
                              I have tried it
                              It can conect and send data to wipy
                              but it can not connect after rebot and say that update failed
                              It store image to Wipy because wipy can not start normally only in "self" mode and it revert temporarly to old version.

                              After that problems i have tried to put the same appimg.bin self by ftp with same result. It store bin file and of course it dissapear
                              but wipy can not start - only in self mode

                              think about people first, then computers

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

                                I don't have a WiPy2 but if someone can upload the 4MB flash dump I can take a look to confirm the memory regions for the firmware images. I'd be surprised if they are any different from the LoPy though.

                                Christian Ehlers

                                B 1 Reply Last reply Reply Quote 0
                                • B Offline
                                  Bashir @Xykon
                                  last edited by

                                  @Xykon said in How to solve the firmware update failures:

                                  I don't have a WiPy2 but if someone can upload the 4MB flash dump I can take a look to confirm the memory regions for the firmware images. I'd be surprised if they are any different from the LoPy though.

                                  Don't use the ftp method, if you look at Xykon post below you will have a solution. I tried everything and the only thing the worked was (on a windows OS):-

                                  1. Install python 2.7 and pyserial
                                  2. Run the tool to unlock the flash area via command prompt (See official instructions)
                                  3. Install the standalone update tool (next, next finish)
                                  4. Copy the appropriate bin file for your device from C:\Program Files (x86)\Pycom\Pycom Firmware update\Upgrader to the location of the tools folder e.g. C:\flash_debug_tool
                                  5. Open CMD in the directory you have the tools in e.g. "C:\flash_debug_tool" or cd to it and run the below
                                    esptool.py --chip esp32 --port COM3 --baud 115200 write_flash 0x210000 lopy_0.9.1.b1_868.bin -fs 4MB -z

                                  Change the com3 to your comport number
                                  Change the lopy_0.9.1.b1_868.bin to your bin file name (lopy_0.9.1.b1_868.bin, lopy_0.9.1.b1_915.bin or wipy_0.9.1.b1.bin)

                                  this will install the latest firmware onto the default boot partition.

                                  thank you

                                  1 Reply Last reply Reply Quote 2
                                  • L Offline
                                    livius
                                    last edited by

                                    i try
                                    esptool.py --chip esp32 --port COM3 --baud 115200 write_flash 0x210000 wipy_0.9.1.b1.bin -fs 4MB -z
                                    and got error:

                                    C:\Python27\flash_debug_tool>esptool.py --chip esp32 --port COM3 --baud 115200 w
                                    rite_flash 0x210000 wipy_0.9.1.b1.bin -fs 4MB -z
                                    usage: esptool [-h] [--port PORT] [--baud BAUD]
                                    {load_ram,dump_mem,read_mem,write_mem,write_flash,run,image_info,
                                    make_image,elf2image,read_mac,chip_id,flash_id,read_flash,verify_flash,erase_fla
                                    sh,version}
                                    ...
                                    esptool: error: argument operation: invalid choice: 'esp32' (choose from 'load_r
                                    am', 'dump_mem', 'read_mem', 'write_mem', 'write_flash', 'run', 'image_info', 'm
                                    ake_image', 'elf2image', 'read_mac', 'chip_id', 'flash_id', 'read_flash', 'verif
                                    y_flash', 'erase_flash', 'version')

                                    think about people first, then computers

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

                                      error: argument operation: invalid choice: 'esp32'

                                      Are you sure you copied the command correctly? Maybe try typing it manually on the command line?

                                      Christian Ehlers

                                      1 Reply Last reply Reply Quote 0
                                      • L Offline
                                        livius
                                        last edited by

                                        i try type it but the same error
                                        in previous post you have copy from cmd.exe window - without any modification - maybe i miss something?

                                        think about people first, then computers

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

                                          What happens when you run "esptool.py version" and "esptool.py --chip esp32". Can you please post exact output of both commands?

                                          Christian Ehlers

                                          1 Reply Last reply Reply Quote 0
                                          • L Offline
                                            livius
                                            last edited by

                                            I see that i have python 2.7.11
                                            with python 2.7.12 now all looks good :)

                                            Will be good to see in steeps that we need python 2.7.12

                                            esptool.py v2.0-dev
                                            Connecting...
                                            Uploading stub...
                                            Running stub...
                                            Stub running...
                                            Attaching SPI flash...
                                            Configuring flash size...
                                            Erasing flash...
                                            Unc size 615696 comp size 362758 comp blocks 355
                                            Wrote 362758 bytes at 0x00210000 in 32.6 seconds (89.1 kbit/s)...
                                            Hash of data verified.

                                            Leaving...

                                            think about people first, then computers

                                            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
                                            • 2
                                            • 3
                                            • 4
                                            • 1 / 4
                                            • First post
                                              Last post

                                            Pycom on Twitter

                                            Pycom