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

    Can't flash Fipy LTE modem.

    Scheduled Pinned Locked Moved Issues & Bugs
    fipymodem
    11 Posts 3 Posters 1.2k Views 3 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.
    • M Offline
      mp
      last edited by

      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

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

        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.

        1 Reply Last reply Reply Quote 0
        • M Offline
          mp
          last edited by

          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

          robert-hhR P 2 Replies Last reply Reply Quote 0
          • robert-hhR Offline
            robert-hh @mp
            last edited by

            @mp Use ftp e.g. via FileZilla

            1 Reply Last reply Reply Quote 0
            • P Offline
              Paul Thornton @mp
              last edited by

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

              1 Reply Last reply Reply Quote 1
              • M Offline
                mp
                last edited by

                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

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

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

                  1 Reply Last reply Reply Quote 1
                  • M Offline
                    mp
                    last edited by mp

                    @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

                    P 1 Reply Last reply Reply Quote 0
                    • P Offline
                      Paul Thornton @mp
                      last edited by

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

                      1 Reply Last reply Reply Quote 0
                      • M Offline
                        mp
                        last edited by

                        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?

                        1 Reply Last reply Reply Quote 0
                        • M Offline
                          mp
                          last edited by

                          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 ;)

                          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