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

    Unable to update GPy modem firmware

    Scheduled Pinned Locked Moved Issues & Bugs
    firmware updategpylte m1lte nb iot
    34 Posts 10 Posters 6.5k Views 13 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.
    • P Offline
      Paul Thornton
      last edited by

      Hi,

      We are currently looking into this and trying to reproduce it internally. One thing I should point out that the docs dont make clear yet (a rewrite is coming that should make things much clearer).

      Is that if there's a diff upgrade available from your current firmware to the latest you should use that and not the full firmware update.

      R 1 Reply Last reply Reply Quote 1
      • R Offline
        rskoniec @Paul Thornton
        last edited by rskoniec

        @paul-thornton Btw, could you comment my observation about updater.elf file size in thread https://forum.pycom.io/topic/3995/fipy-firmware-upgrade-failed-cat-m1/26

        What I've noticed is that updater.elf file in the previous CAT-M1/NB1 releases is the same and with a size of aprox. 300KB, but for the latest they are different for CAT-M1 (420KB) and NB1 (364KB).

        The machine is working as good as it's code.

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

          @rskoniec

          Hey sure, The difference in scripts is intended and not the cause of the issues. :)

          1 Reply Last reply Reply Quote 0
          • B Offline
            bqpd @rskoniec
            last edited by

            @rskoniec, @Paul-Thornton

            First of all thanks a lot for your reply and help!

            I tried to follow the steps @rskoniec suggested, sadly without any results. I try to share my output, maybe it helps @Paul-Thornton recreating the Error

            First of all i set pycom.lte_modem_en_on_boot(0) because it was initially set to true

            After a replug i tried your steps on 3 different versions of the fipy Firmware (FiPy 1.18.1.r1, FiPy 1.18.1.r4 and the new stable release FiPy 1.18.1.r7)
            All giving me similar results:

            When i create an LTE Object first, send some test commands and then lte.deinit() this object before attempting to upgrade the Sequans Firmware (using the differential upgrade sqnsupgrade.run('/sd/upgdiff_33080-to-39529.dup', '/sd/updater.elf')), the upgrade process doesn't even reach the AT Wakeup stage

            FiPy 1.18.1.r1

            >>> sqnsupgrade.run('/sd/CATM1-39529.dup', '/sd/updater.elf')
            <<< Welcome to the SQN3330 firmware updater >>>
            Attempting AT wakeup...
            Unable to upgrade bootrom.
            Unable to load updater from /sd/updater.elf
            

            FiPy 1.18.1.r4

            >>> sqnsupgrade.run('/sd/upgdiff_33080-to-39529.dup', '/sd/updater.elf')
            <<< Welcome to the SQN3330 firmware updater [1.2.0] >>>
            >>> FiPy with firmware version 1.18.1.r4
            Could not detect your modem!
            Please try to power off your device and restart in safeboot mode.
            

            FiPy 1.18.1.r7

            >>> sqnsupgrade.run('/sd/upgdiff_33080-to-39529.dup', '/sd/updater.elf')
            <<< Welcome to the SQN3330 firmware updater [1.2.1] >>>
            >>> FiPy with firmware version 1.18.1.r7
            Could not detect your modem!
            Please try to power off your device and restart in safeboot mode.
            

            If i replug the device and start the upgrade process without creating an lte = LTE() Object first OR if i create an LTE Object but dont lte.deinit() it, then i get the following results:

            FiPy 1.18.1.r1

            >>> sqnsupgrade.run('/sd/upgdiff_33080-to-39529.dup', '/sd/updater.elf')
            <<< Welcome to the SQN3330 firmware updater >>>
            Attempting AT wakeup...
            Starting STP (DO NOT DISCONNECT POWER!!!)
            Session opened: version 1, max transfer 8192 bytes
            Sending 54854 bytes: [########################################] 100%Sending 54854 bytes: [###########################             ]  67%
            Bootrom updated successfully, switching to upgrade mode
            Attempting AT auto-negotiation...
            

            the device is then getting stuck in AT auto-negotiation, failing after a few minutes

            ERROR sending AT command... no response? b''
            

            FiPy 1.18.1.r4

            >>> sqnsupgrade.run('/sd/upgdiff_33080-to-39529.dup', '/sd/updater.elf')
            <<< Welcome to the SQN3330 firmware updater [1.2.0] >>>
            >>> FiPy with firmware version 1.18.1.r4
            Attempting AT wakeup...
            Session opened: version 1, max transfer 8192 bytes
            Sending 55498 bytes: [########################################] 100%
            Received ERROR from AT+SMSWBOOT=0,1! Aborting!
            Unable to upgrade bootrom.
            Unable to load updater from /sd/updater.elf
            

            FiPy 1.18.1.r7

            >>> sqnsupgrade.run('/sd/upgdiff_33080-to-39529.dup', '/sd/updater.elf')
            <<< Welcome to the SQN3330 firmware updater [1.2.1] >>>
            >>> FiPy with firmware version 1.18.1.r7
            Attempting AT wakeup...
            Session opened: version 1, max transfer 8192 bytes
            Sending 54854 bytes: [########################################] 100%
            Received ERROR from AT+SMSWBOOT=0,0! Aborting!
            Unable to upgrade bootrom.
            Unable to load updater from /sd/updater.elf
            

            So basically Version FiPy 1.18.1.r7 and FiPy 1.18.1.r4 are giving me two different ERROR logs:
            Received ERROR from AT+SMSWBOOT=0,0! Aborting! and Received ERROR from AT+SMSWBOOT=0,1! Aborting!

            However the LTE Modem is still working and responding:

            >>> from network import LTE
            >>> lte = LTE()
            >>> lte.send_at_cmd('AT') # few AT commands to check if modem is alive and responsive
            '\r\nOK\r\n'
            >>> lte.send_at_cmd('ATI')
            '\r\nSEQUANS Communications\r\nVZM20Q\r\nUEUnknown\r\n\r\nOK\r\n'
            >>> lte.send_at_cmd('ATZ')
            '\r\nOK\r\n'
            

            During the whole process, i got an antenna attached and a SIM card inserted.

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

              @bqpd I've pointed the relevant engineer at this thread and can confirm they are looking into it. One thing they did mention I should clear up.

              If your doing a "diff upgrade" and using the diff files. You do NOT need to provide the path to a relevant updater.elf as a second param to the sqnsupgrade.run() call.

              B 1 Reply Last reply Reply Quote 2
              • B Offline
                bqpd @Paul Thornton
                last edited by

                @paul-thornton

                thanks for the quick response and info!

                The related code example in the documentation at https://docs.pycom.io/tutorials/lte/firmware.html is a bit misleading then, as you already stated.
                It says right on top in the red warning box:

                Important: When upgrading your modem for the first time, even if you have updated it in the past with the old firmware update method, you MUST use the "recovery" upgrade method described below. Otherwise you will risk breaking your module.
                Please also use the file upgdiff_33080-to-39529.dup (1.2M) from the archive.

                import sqnsupgrade
                sqnsupgrade.run('upgdiff_33080-to-39529.dup', 'updater.elf')
                

                Sadly for me, the update still wont work, even if i leave out the 'updater.elf' file parameter.
                I get the following output after about 10 minutes of processing:

                >>> os.listdir('/sd')
                ['NB1-40343.dup', 'updater.elf', 'upgdiff_33080-to-40343.dup', 'upgdiff_38729-to-40343.dup']
                >>> import sqnsupgrade
                >>> sqnsupgrade.run('/sd/upgdiff_33080-to-40343.dup')
                <<< Welcome to the SQN3330 firmware updater [1.2.1] >>>
                >>> FiPy with firmware version 1.18.1.r7
                Attempting AT wakeup...
                Session opened: version 1, max transfer 8192 bytes
                Sending 2280296 bytes: [                                        ]   0%SRSP header too small: 0
                Code download failed, aborting!
                >>> sqnsupgrade.info(True)
                <<< Welcome to the SQN3330 firmware updater [1.2.1] >>>
                >>> FiPy with firmware version 1.18.1.r7
                Trying to detect modem state [1/5]
                Your modem is in application mode. Here is the current version:
                SYSTEM VERSION
                ==============
                  FIRMWARE VERSION
                    Bootloader0* : 5.1.1.0 [33080]
                    Bootloader1  : NA
                    Bootloader2  : NA
                    NV Info      : 1.1,0,0
                    Software     : 5.1.1.0 [33080] by robot-soft at 2017-10-27 07:49:11
                    UE           : Unknown
                  COMPONENTS
                    ZSP0         : 1.0.98-12323
                    ZSP1         : 1.0.98-12295
                LTE autostart disabled. 
                

                I am seeing that this seems to be a known issue (https://github.com/pycom/pycom-libraries/issues/81)

                Maybe a little info about my system may help: i use Windows 7 using VisualStudio Code (alternatively i could try Linux Mint using Atom, but so far i had no reason to believe, that this is an OS related problem)
                The FiPy is powered over a PySense Board with updated Firmware and the FiPy is connected to my local WLAN network and i use this connection to interface and programm the board.
                I use a small 2GB Fat32 SD card from SanDisk. Seeing that the os.listdir('/sd') command worked well, i don't think that the SD card is an issue either. I also tested writing to and reading from the SD card, which was working absolutely fine.

                Thanks for any help so far!

                P C 2 Replies Last reply Reply Quote 0
                • P Offline
                  Paul Thornton @bqpd
                  last edited by

                  @bqpd Hi yes.

                  I Agree the docs around modem firmware updates are indeed misleading. a rewrite of them is high on my todo list.
                  thanks for trying it without the updater.elf.

                  1 Reply Last reply Reply Quote 0
                  • C Offline
                    combaindeft @bqpd
                    last edited by combaindeft

                    @bqpd @Paul-Thornton

                    Hi guys,

                    We bought a bunch of FiPy's ... and one one of them, had the same issue.

                    lte.reset()
                    lte.disconnect()
                    lte.dettach()
                    

                    Do the PyCom-thingie (detach Lipo batter, unplugg usb ... ergo HARD Reset, not soft or button ...)

                    pycom.lte_modem_en_on_boot(0)
                    

                    Last but not least, comes the little-bit-unsure ... as I trued 1st

                    sqnsupgrade.run('upgdiff_33080-to-40343.dup', 'updater.elf', debug=True)
                    

                    as it's a new board we are updating all the firmware on

                    but that didn't work, so I just ran

                    sqnsupgrade.run('NB1-40343.dup', debug=True)
                    

                    I'm going out on a limb, and guessing, that maybe in the factory when they test all the boards before shipping ... somehow ... maybe it happened that they forgot to "reset", "discennect" and "dettach" it from the LTE Base station ... and the modem thinks it's still in use ... ergo, the updater won't work ... as it modem is "enabled" ...

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

                      @combaindeft

                      sqnsupgrade.run('upgdiff_33080-to-40343.dup', 'updater.elf', debug=True)
                      

                      Diff's dont need the updater.elf param so its just

                      sqnsupgrade.run('upgdiff_33080-to-40343.dup', debug=True)
                      

                      The full upgrade does how ever need it:

                      sqnsupgrade.run('NB1-40343.dup', 'updater.elf', debug=True)
                      

                      Ill ask someone more qualified than me to look into this as the process @ktleh took should have worked.

                      >>> from machine import SD
                      >>> sd = SD()
                      >>> os.mount(sd, '/sd')
                      >>> os.listdir('/sd')
                      ['CATM1-38638.dup', 'updater.elf']
                      >>> import sqnsupgrade
                      >>> sqnsupgrade.run('/sd/CATM1-38638.dup', '/sd/updater.elf')
                      

                      should have run just fine.

                      C 1 Reply Last reply Reply Quote 0
                      • C Offline
                        combaindeft @Paul Thornton
                        last edited by

                        @paul-thornton

                        Hmmm, says the opposite on your docu - https://docs.pycom.io/tutorials/lte/firmware.html ...

                        Important: When upgrading your modem for the first time, even if you have updated it in the past with the old firmware update method, you MUST use the "recovery" upgrade method described below. Otherwise you will risk breaking your module.

                        Please also use the file upgdiff_33080-to-39529.dup (1.2M) from the archive.

                        import sqnsupgrade
                        sqnsupgrade.run('upgdiff_33080-to-39529.dup', 'updater.elf')
                        
                        

                        and then it says, you must run it a 2nd time ...

                        sqnsupgrade.run('NB1-40343.dup', debug=True)
                        

                        ... and this is the the 1st time you ever update the modem firmware ...

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

                          @combaindeft Yup. Documentation is wrong. Ill get it updated to clarify.

                          1 Reply Last reply Reply Quote 1
                          • F Offline
                            florianrdt
                            last edited by

                            Hi guys,
                            I tried to update the modem firmware of my GPy, but failed.

                            First I updated the firmware of the GPy with the Pycom Firmware Update Tool to version 1.18.1.r7.

                            Then I followed the instructions in the documentation for the update via UART Serial Interface. I downloaded the file CATM1-39529.zip and uploaded the file updater.elf via FileZilla into the Flash of the GPy. I got an error message that the connection was interrupted by a timeout, but it seemed as if the file was successfully transferred. The file sizes matched.

                            Then I started the update process on the Gpy

                            >>> import sqnsupgrade
                            >>> sqnsupgrade.uart(True,'/flash/updater.elf')
                            

                            After the message

                            Going into MIRROR mode... please close this terminal to resume the upgrade via UART
                            

                            I started the update process on my computer:

                             >>> import sqnsupgrade
                             >>> sqnsupgrade.run('COM9', 'CATM1-39529.dup')
                            <<< Welcome to the SQN3330 firmware updater >>>
                            Attempting AT wakeup...
                            

                            I got a timeout error after about 5 minutes.

                            After a hardreset of the GPy I restarted the update process on the GPy and got the following message:

                            >>> import sqnsupgrade
                            >>> sqnsupgrade.uart(True, '/flash/updater.elf')
                            <<< Welcome to the SQN3330 firmware updater [1.2.1] >>>
                            >>> GPy with firmware version 1.18.1.r7
                            Could not detect your modem!
                            Please try to power off your device and restart in safeboot mode.
                            
                            

                            Currently, the LTE module can no longer be reached.

                            >>> from network import LTE
                            >>> lte = LTE()
                            

                            The command hangs. SIM card is inserted.

                            In the forum I read already that the command

                            pycom.lte_modem_en_on_boot(0)
                            

                            could help, but still the modem cannot be addressed.

                            Can you help me?

                            B C 2 Replies Last reply Reply Quote 1
                            • B Offline
                              bqpd @florianrdt
                              last edited by

                              @florianrdt What does

                              import sqnsupgrade
                              sqnsupgrade.info()
                              

                              return to you?

                              F 1 Reply Last reply Reply Quote 0
                              • F Offline
                                florianrdt @bqpd
                                last edited by

                                @bqpd On the GPy it does

                                >>> import sqnsupgrade
                                >>> sqnsupgrade.info()
                                <<< Welcome to the SQN3330 firmware updater [1.2.1] >>>
                                >>> GPy with firmware version 1.18.1.r7
                                Cannot determine modem state!
                                

                                The command took some while.

                                B 1 Reply Last reply Reply Quote 0
                                • B Offline
                                  bqpd @florianrdt
                                  last edited by

                                  @florianrdt Hmm, I think the sqnupgrade.info() method also tries to create an instance of "LTE" and is also failing.
                                  Sorry I can't really help you. I hope your Sequans modem isn't bricked.
                                  Maybe the developer team has some better insights and can help you. As @Paul-Thornton said, they are looking into the whole modem firmware upgrade process in the near future.

                                  F 1 Reply Last reply Reply Quote 0
                                  • F Offline
                                    florianrdt @bqpd
                                    last edited by

                                    @bqpd ok, thanks anyway for your support!

                                    1 Reply Last reply Reply Quote 0
                                    • C Offline
                                      combaindeft @florianrdt
                                      last edited by

                                      @florianrdt

                                      did you try to reset the modem?

                                      lte.reset()
                                      lte.disconnect()
                                      lte.dettach()
                                      

                                      I had the same issues ... and it's because the modem has been turned / power off in "active" state ... and it remembers that as it saves it state to it's internal memory ...

                                      B F 2 Replies Last reply Reply Quote 1
                                      • B Offline
                                        bqpd @combaindeft
                                        last edited by

                                        @combaindeft Wait, so DID your upgrade of the sequans modem on the FiPy (where it failed in the first place) succeed AFTER you did:

                                        lte.reset()
                                        lte.disconnect()
                                        lte.dettach()
                                        

                                        or did i misunderstand you and it is still not working?
                                        Sadly i have no SIM-card at the moment so i can't test it myself for the next few days.
                                        Did it actually work in the end just doing sqnsupgrade.run('NB1-40343.dup', debug=True) even without using the update.elf file after you did the lte.reset()?

                                        @combaindeft said in Unable to update GPy modem firmware:

                                        We bought a bunch of FiPy's ... and one one of them, had the same issue.
                                        ...
                                        but that didn't work, so I just ran

                                        sqnsupgrade.run('NB1-40343.dup', debug=True)
                                        
                                        C 1 Reply Last reply Reply Quote 0
                                        • F Offline
                                          florianrdt @combaindeft
                                          last edited by

                                          @combaindeft I can't try this because I can't initialize the LTE object. The comand freeze.

                                          C 1 Reply Last reply Reply Quote 0
                                          • C Offline
                                            combaindeft @bqpd
                                            last edited by combaindeft

                                            @bqpd said in Unable to update GPy modem firmware:

                                            @combaindeft Wait, so DID your upgrade of the sequans modem on the FiPy (where it failed in the first place) succeed AFTER you did:

                                            lte.reset()
                                            lte.disconnect()
                                            lte.dettach()
                                            

                                            Affirmative! ...

                                            I couldn't get it to update the modem firmware ... and I read somewhere, that the update firmware function won't work if the modem is in "active mode" ... ergo I tired to Reset, disconnect and dettach it ... and followed by a reboot (I did a reboot, just to make sure...) ... I could update the firmware of the modem.

                                            or did i misunderstand you and it is still not working?

                                            No, It is working superfine now :-)

                                            Sadly i have no SIM-card at the moment so i can't test it myself for the next few days.
                                            Did it actually work in the end just doing sqnsupgrade.run('NB1-40343.dup', debug=True) even without using the update.elf file after you did the lte.reset()?

                                            @combaindeft said in Unable to update GPy modem firmware:

                                            We bought a bunch of FiPy's ... and one one of them, had the same issue.
                                            ...
                                            but that didn't work, so I just ran

                                            sqnsupgrade.run('NB1-40343.dup', debug=True)
                                            

                                            Step 1)

                                            lte.reset()
                                            lte.disconnect()
                                            lte.dettach()
                                            

                                            Step 2)
                                            reboot the device.

                                            Step 3a) identify if this is the ABSOLUTE 1ST TIME that you are updating the modem firmware

                                            sqnsupgrade.run('upgdiff_33080-to-40343.dup', 'updater.elf', debug=True)
                                            time.sleep(5)
                                            sqnsupgrade.run('NB1-40343.dup', debug=True)
                                            

                                            Step 3b) - if not 3a) ... That is, it this isn't the 1st time you are updating the modem's firmware

                                            sqnsupgrade.run('NB1-40343.dup', 'updater.elf', debug=True)
                                            time.sleep(5)
                                            sqnsupgrade.run('NB1-40343.dup', debug=True)
                                            

                                            Step 4) if 3a) and 3b) both fail ... by this point you might try this step too ...

                                            sqnsupgrade.run('NB1-40343.dup', debug=True)
                                            

                                            ... and yes ... since 3a) and 3b) failed me ... i did Step 4) as I didn't have anything to loose ...and it worked *yay-me*

                                            - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

                                            Lastly - a tiny explanation - as may be asking yourselves "Why do you run two firmware updates after each other?!?!?" - in Step 3a) & 3b) ....

                                            As explained in the "Modem Firmware Update" in the docs: https://docs.pycom.io/tutorials/lte/firmware.html

                                            "After you have updated your modem once using the recovery method, you can now flash your modem again using just the CATM1-38638.dup or NB1-37781.dup file without specifying the updater.elf file. However, should the upgrade fail, your modem may end up in recovery mode and you will need the updater.elf file again. The updater will check for this and prompt you if using the updater.elf file is necessary."

                                            B 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
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post

                                            Pycom on Twitter

                                            Pycom