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

    Pymark sync project failed

    Scheduled Pinned Locked Moved Pymakr
    17 Posts 5 Posters 7.0k Views 5 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.
    • J Offline
      Jan
      last edited by

      has this problem been solved already? I am still not able to upload other files to the system, only the main. and root.py

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

        @Jan yes the sha256 problem was solved in one of the releases last month, but I've not heard your problem before. If you create a new python file in your Pymakr project, named something else than main or root, and then press sync, it should also place this file on the board. Did you check if the file was there using FTP?

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

          @Ralph
          The files get created, but are not copied over. I have the same issue with the ftp client (winscp).
          I'm running windows 10
          os.uname() gives: release='0.9.6.b1', version='v1.8.6-40-gd10463e on 2016-11-25' (I managed to upgrade from 0.9.0.0)
          pymakr version = 1.0.0.b7

          A 1 Reply Last reply Reply Quote 0
          • A Offline
            abilio @Jan
            last edited by

            @Jan, you mention you upgraded from 0.9.0 to 0.9.6. The fact you mention it also fails using FTP gives us a hint. To confirm it, can you please explain what method did you use to upgrade your firmware?

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

              Getting it upgraded was a pain in the *** It didn't work with the shield, so I used an arduino programmer to connect the device. Then, I followed this procedure: https://forum.pycom.io/topic/166/how-to-really-solve-the-firmware-update-failures It was the only one that worked for me.

              A 1 Reply Last reply Reply Quote 0
              • A Offline
                abilio @Jan
                last edited by

                @Jan, we suspect your board suffers from a write protected memory. This is caused by a bug in the ESP32 code provided by Espressif that was available by the time your board was manufactured.

                There is a way to fix it, and that's why we're shipping the firmware upgrades with a tool. I must advice you to try upgrading using the tool. The procedure you mention is old, unofficial and hence, unsupported. I will try to help you make the official one work for you.

                You mention a shield, I don't know if it means a Pycom Expansion board. If that's the case, please check that all the jumpers on the corner are present (we've heard of cases of missing jumpers). If you don't have an expansion board is ok, any serial adapter will work.

                Can you please provide more information on the upgrade issue itself. What things did you try that didn't work, what kind of operating system are you running the upgrade into, is it a virtualized environment?

                Regards,
                Abilio

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

                  It's indeed the pycom expansion board. The entire row has jumpers, except for TX and RTS

                  The upgrade tool runs from a windows 10 machine, not virtualized.

                  I first tried the pyCom firmware update tool from the downloads section
                  That kept reporting that it failed.
                  Next, I saw a bunch of forum posts that were talking about running the upgrade tool from the command line, which also didn't work.
                  Tried the communication channels: AP mode was basically the only thing that worked as expected.
                  Finally, I found this article: https://forum.pycom.io/topic/166/how-to-really-solve-the-firmware-update-failures which at first also didn't work. So then I started looking at the hardware/serial communication and tried with a basic arduino programmer + some wires. Then started again with the 'how-to-solve-the-firmware' procedure, which worked.
                  All communication channels began working (serial, wifi, AP), except for ftp (didn't try lora yet).

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

                    @Jan Try it again with the TX jumper on the expansion board. Without it the update will fail. Sometimes this jumper gets loose in the package, so it might still be in there. Otherwise take the BAT jumper and put it on TX.

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

                      That jumper indeed got stuck in the bag. I found it at the bottom. Now the upgrade tool works, but I'm still getting the same problems in pymakr for syncing the project. Also can't ftp anymore to the device (target machine actively refused the connection).

                      G 1 Reply Last reply Reply Quote 0
                      • G Offline
                        gertjanvanhethof Pybytes Beta @Jan
                        last edited by

                        @Jan Did you tried to boot in soft-boot mode?
                        Then you should be able to connect to it by WiFi.
                        FTP should work also from then.
                        Succes1

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

                          I can connect to it by wifi. I can issue the commands. It also did a soft-reboot (done from within pymakr using ctrl+D).
                          It just wont sync the project. I figured out why the ftp didn't work: after trying a sync with pymakr, the connection appears to be locked. After a device reboot, it's possible again to connect with ftp. The file system still appears locked though: I can't add or remove any files. It contains a couple of files with 0 byte length. (leftovers from project sync attempts).

                          A G 2 Replies Last reply Reply Quote 0
                          • A Offline
                            abilio @Jan
                            last edited by

                            @Jan, can you try reformatting the internal storage?

                            import os
                            os.mkfs('/flash')
                            

                            Please post back your results :)

                            1 Reply Last reply Reply Quote 0
                            • G Offline
                              gertjanvanhethof Pybytes Beta @Jan
                              last edited by

                              @Jan What kind of code is run by LoPy. So blocking connectivity.
                              With soft-boot I mean using the wires so boot.py and main.py are skipped. Read the manual how to do this.
                              After a real soft-boot you should be able to connect with FTP.
                              Also open Pymakr (or telnet) and check if serial connection is working.
                              Do a soft reset (using the reset button) and check the serial output.

                              Pymakr project sync doesn't work because code signature check doesn't work yet (as stated in this threat earlier).

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

                                I've reformatted the flash drive. Now it appears as if boot.py is no longer executed (the flash operation removed my version, but I was able to put it back with ftp). It keeps going back to ap mode.
                                When I connect to the device through wifi (192.168.4.1), then I can now synchronize the project from pymakr. I can also ftp to the device (and see logging through the com port).
                                When I paste the code of boot.py into main.py and run that, it also connects to the wifi network in STA mode.
                                When the device is in STA mode connected to the wifi, I can still sync the project from pymakr and ftp, but when I remove the 'boot.py' code from main.py and reboot the device, it goes back to AP mode.

                                This is the code I'm using in boot.py:

                                known_nets = [('xxx', 'yyy')] # change this line to match your WiFi settings
                                #, ('office_ssid', 'office_password')
                                
                                import machine
                                import os
                                
                                uart = machine.UART(0, 115200) # disable these two lines if you don't want serial access
                                os.dupterm(uart)
                                
                                if machine.reset_cause() != machine.SOFT_RESET: # needed to avoid losing connection after a soft reboot
                                    from network import WLAN
                                    wl = WLAN()
                                
                                    # save the default ssid and auth
                                    original_ssid = wl.ssid()
                                    original_auth = wl.auth()
                                
                                    wl.mode(WLAN.STA)
                                
                                    available_nets = wl.scan()
                                    nets = frozenset([e.ssid for e in available_nets])
                                
                                    known_nets_names = frozenset([e[0] for e in known_nets])
                                    net_to_use = list(nets & known_nets_names)
                                
                                    try:
                                        net_to_use = net_to_use[0]
                                        pwd = dict(known_nets)[net_to_use]
                                        sec = [e.sec for e in available_nets if e.ssid == net_to_use][0]
                                        wl.connect(net_to_use, (sec, pwd), timeout=10000)
                                        while not wlan.isconnected():
                                            machine.idle() # save power while waiting
                                    except:
                                        wl.init(mode=WLAN.AP, ssid=original_ssid, auth=original_auth, channel=6, antenna=WLAN.INT_ANT)
                                

                                I had a similar problem at the very beginning, but it was resolved after the first firmware upgrade succeeded. Now, the firmware upgrade can still be done successfully, but the device does not want to connect to my wifi from boot.py.

                                1 Reply Last reply Reply Quote 0
                                • P Offline
                                  pclavier
                                  last edited by

                                  I found a partial solution to this problem.

                                  The console always showed me:
                                  "Syncing the project with the LoPy. Please wait...
                                  Syncing failed!"
                                  when I tried to load the Python scripts ino the LoPy.

                                  The solution I found was using a FTP to load the files.
                                  Section 2.4 from this page shows you how to configure the FTP settings to be able to do so:
                                  https://docs.pycom.io/pycom_esp32/pycom_esp32/toolsandfeatures.html
                                  I used FileZila client and worked perfectly.
                                  Make sure you connect to the LoPy WiFi to load the files with the FTP.
                                  "Connect your computer to the WiFi network named after your board (e.g. lopy-wlan-xxxx, wipy-wlan-xxxx). The password is www.pycom.io"

                                  I could not make it work through the Pymakr but at least in this way I was able to load everything into the LoPy with no problems.

                                  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