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: Firmware upgrade using FTP. Not able to join lora network after successfull firmware upgrade.

    Scheduled Pinned Locked Moved Firmware
    lopy
    5 Posts 2 Posters 715 Views 2 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.
    • A Offline
      Asb
      last edited by Asb

      Hi

      I've been trying to do a firmware upgrade/downgrade via FTP, and ran into a problem. The reason I want to do a FTP upgrade is because the LoPy will be installed inside a box, so to avoid having to open the box and access the device, I'd like to try out FTP upgrade.
      I have obtained firmware files from here: LoPy firmware, I downloaded 1.18.1.r1.tar.gz and 1.16.0.b1.tar.gz

      My current working firmware on my LoPy is 1.18.1.r1 which I installed using the Pycom Firmware Update program.
      Step 1: I downgraded my firmware to 1.16.0.b1 by placing the appimg.bin previously downloaded and placed it in /flash/sys, after successfull upload I reset the board. I verify that the firmware is upgraded by running "get firmware version" in Atom with pymakr plugin and got 1.16.0.b1.

      Step 2: Upgraded the firmware to 1.18.1.r1 using the same method as in Step 1, and verified running "get firmware version" and got 1.18.1.r1.

      Problem: When I try to run my program, it gets stuck here:

      while not self.lora.has_joined():
          time.sleep(2.5)
          print('Not yet joined...')
      

      However, if I try to upgrade my firmware again to 1.18.1.r1 using the Pycom Firmware Update program, now I'm connected via USB and placed a jumper cable between GND and G23. After successfull firmware update, my program works and my device joins the lora network.

      Any idea whats wrong, am I doing the FTP upgrade wrong? Do you still need to place the jumper cable between G23 and GND when upgrading via FTP?

      Thanks.

      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @Asb
        last edited by

        @asb For FTP update you do not need the jumper cable. But if you mix FTP update and USB update, you might not get what you expect. There are two partitions for the firmware image. The active partition alternates if you use ftp update. The USB update always uses the first partition.
        There used to be a bug, that the USB update does not set the flag, about which partition is teh active one. So it might happen, that if the second partition is active, and you upload a new firmware via USB, this firmware will not be used, but still the previous one.
        I did not check recently whther this bug is still present. As a countermeasure, you can do a full flash erase when doing an USB update. Then everything is fine again.

        A 1 Reply Last reply Reply Quote 0
        • A Offline
          Asb @robert-hh
          last edited by

          @robert-hh Thanks, I'm not sure if I understand, or maybe I formulated myself poorly in my initial question.

          Everything works after doing an USB update, I do not need to do a full flash erease or anything else.

          Its after I do a FTP upgrade (uploading apping.bin to /flash/sys) the program on the lopy stops working (or I should say, not work as expected). Could the problem be that I power the lopy via USB, but try to update firmware via ftp? Would this cause any problems?

          Thanks

          robert-hhR 1 Reply Last reply Reply Quote 0
          • robert-hhR Offline
            robert-hh @Asb
            last edited by

            @asb No powering by USB and doing the fpt update is not a problem. I did not try ftp update recently. I can do so tonight. Maybe sometging broke.

            A 1 Reply Last reply Reply Quote -1
            • A Offline
              Asb @robert-hh
              last edited by

              @robert-hh Hi again, I got it working. I did a silly mistake...
              Frist I downloaded the firmware from here (LoPy): https://software.pycom.io/downloads/LoPy.html
              But of course I should have downloaded from here (LoPy4): https://software.pycom.io/downloads/LoPy4.html

              Sorry for wasting your time, @robert-hh

              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