Can't flash Fipy LTE modem.



  • Hello,
    I try to flash the NBIOT firmware to my Fipy via uart, but it failed at every atempt.

    Firstly, I tryed to flash the lte diff update upgdiff_33080-to-39529.dup
    Commands on the fipy:

    import sqnsupgrade
    sqnsupgrade.uart(True)
    

    Commands on my pc:

    import sqnsupgrade
    sqnsupgrade.run('/dev/ttyUSB0', 'lte/upgdiff_33080-to-39529.dup', 'lte/updater.elf', debug=True)
    

    But it fail with a diff error after upload, trace:

    b'\r\nERRO'
    count=1
    b'\r\n\r\nOK'
    AT+SMUPGRADE? returned b'\n\r\nOK\r\n+SMUPGRADE: failure\r\n[diffUpgrade,226] Patch didn\'t apply: 7\r\n[do_caba_parse,264] Parsing of "DIFF" failed\r\n[do_caba_parse,342] Parsing failed\r\n[do_caba_parse,264] Parsing of "PACK" failed\r\n[do_caba_parse,342] Parsing failed\r\n[_do_fw_upgrade,635] Upgrade failed\r\n\r\nOK\r\n' [timeout: 0.10036373138427734]
    AT+SMSWBOOT? returned b'FFH\r\nOK\r\n'
    AT+SMUPGRADE? returned b'+SMUPGRADE: failure\r\n[diffUpgrade,226] Patch didn\'t apply: 7\r\n[do_caba_parse,264] Parsing of "DIFF" failed\r\n[do_caba_parse,342] Parsing failed\r\n[do_caba_parse,264] Parsing of "PACK" failed\r\n[do_caba_parse,342] Parsing failed\r\n[_do_fw_upgrade,635] Upgrade failed\r\n\r\nOK\r\n'
    This is my result: failure[diffUpgrade,226] Patch didn't apply
    Upgrade failed with result failure[diffUpgrade,226] Patch didn't apply!
    Please check your firmware file(s)
    

    Then I tried to flash directly the full nbiot firmware
    Commands on the fipy :

    import sqnsupgrade
    sqnsupgrade.uart(True)
    

    Commands on my pc:

    import sqnsupgrade
     sqnsupgrade.run('/dev/ttyUSB0', 'nb/NB1-40343.dup', 'nb/updater.elf')
    

    But it always freeze at 8%, it freeze for more than 10 minutes

    Finally, I tried to flash directly the full nbiot firmware
    Commands on the fipy :

    import sqnsupgrade
    sqnsupgrade.uart(True)
    

    Commands on my pc:

    import sqnsupgrade
    sqnsupgrade.run('/dev/ttyUSB0', 'lte/CATM1-39529.dup', 'lte/updater.elf')
    

    But it always freeze at 21%, except once it freeze at 100%, again it freeze for more than 10 minutes (and hours).

    Do you have any advice to investigate what is going on ?

    Thank for your help



  • So I think I found my problem
    As I said in another post the problem wasn't in the software, but hardware.

    I don't use a expansion board, I use a ttl converter like this one https://www.ebay.com/itm/5V-3-3V-FTDI-FT232RL-USB-to-TTL-Serial-Converter-Adapter-Module-Arduino-Mini-Hot/182736917146

    With this converter 3.3V is not enough to power on stably the board, so, I used it in 5V mode, but it seem that 5v for serial communication is ok for the python REPL, but have problem when flashing the modem or use the LTE modem.
    Finally, I changed my design by using another 5v power source, and use the ttl converter un 3v3 mode with common ground. And then it just works fine ;)



  • I can assume that could have sometime errors in uart transmission , but the fact that the update always fails at the same % make me think that is an error in the update process not the transmission.
    I think I have a sd module somewhere borrowed to a friend, will try to get it back and test with it.
    Buying the expention board without having the certitude that is the uart which failed, its not a good idea for my point of view.
    By the way, implement a http update could be feasible?



  • @mp There is currently no diff upgrade between LTE->NB-IOT however we are working on one currently. For now you'll need to do the "full" upgrade.

    The easiest way if your having UART upload issues would be an expansion board and and SD card if you have those to hand.
    I've seen issue's where any movement is enough to cause an issue with UART and transfer's failing. That said It does seem super odd and suspicious that your's all fail at the same point.



  • @robert-hh Indeed no space left

    But I try to use LTE flashupgdiff_33080-to-39529.dup, and its works. Now, at least my modem is unbricked.

    But I want the NBIOT firmware. Have I to flash the full firmware on the fipy, or there is a diff update to go from LTE to NBIOT ?

    Thank your for your help ;)

    Regards,
    Michel



  • @mp The size of the FiPy flash file system is about 4 MB. You can check the free space with uos.getfree("/flash")



  • Are you sure that fipy's flash can handle 7Mb firmware ?
    Because every time I try to upload file by ftp it failed at the same bit (at about 3.7MB), and in the datasheet is mentioned that the file system can handle max 4Mb file.
    Pymakr upload fail also. Thank you @Paul-Thornton for the config trics



  • @mp You can either use ftp. Or open pymakr's config and add .dup files to the uploaded file types.

    or theres a config that defaults to false along the lines of "upload_all_files" that can be set to true.

    Ctrl + Shift + G opens the config file in VSCode. Unsure about atom.



  • @mp Use ftp e.g. via FileZilla



  • Quite short, ~6cm dupont wires on a breadboard.
    But transmission failed every time at the same percentage.

    Is it possible to place the files on the flash partition? Pymakr only upload .py files and ampy does not works :s



  • How long is your UART cable. Ive seen issues with longer cables being to noisy to allow it to complete properly.

    If you have an expansion board handy Ive found its easier to use those and put the file's on an SD card and run sqnsupgrade directly on the device.


Log in to reply
 

Pycom on Twitter