SOLVED: Firmware upgrade using FTP. Not able to join lora network after successfull firmware upgrade.



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



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



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



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


Log in to reply
 

Pycom on Twitter