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

    GPy Modem (NB1) Firmware Update

    Scheduled Pinned Locked Moved GPy
    7 Posts 3 Posters 101 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.
    • N Offline
      nadvorvo
      last edited by

      Hi everyone,
      I am following tutorial:
      https://docs.pycom.io/tutorials/lte/firmware/

      I have used this FAT file system on SD:
      Format your SD card as with the FAT file system and then copy the files onto the card using your computer
      358db5b1-9803-47fa-b0ea-c6fc12081032-image.png

      >>> from machine import SD
      >>> sd = SD()
      >>> os.mount(sd, '/sd')
      >>> os.listdir('/sd')
      ['n\x03', '\x12\x13\x02"P#\x04@."']
      >>> import sqnsupgrade
      >>> sqnsupgrade.run('/sd/NB1-41019.dup', '/sd/updater.elf')
      <<< Welcome to the SQN3330 firmware updater [1.2.6] >>>
      >>> GPy with firmware version 1.20.2.r3
      Exception when checking file /sd/updater.elf... wrong file name?
      [Errno 2] ENOENT
      False
      

      It seems files can not be read from sd.

      >>> import sys
      >>> sys.version
      '3.4.0'
      >>> sys.platform
      'GPy'
      

      Thank you in advance for your assistance.
      Regards, Vojtech

      robert-hhR 1 Reply Last reply Reply Quote 0
      • K Offline
        kjm
        last edited by

        Have you checked the 3 pins used to drive the sd card (P8:DAT0, P23:SCLK and P4:CMD) are otherwise unused on your board? Also I don't see the fs=os.mkfat(sd) cmd anywhere?

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

          @nadvorvo The SD card must have single FAT partition. New SD cards sometimes have a different partition structure. If you cannot see the files with uos.listdir(), then the firmware update will not work.

          1 Reply Last reply Reply Quote 0
          • N Offline
            nadvorvo
            last edited by

            @robert-hh @kjm Thanks a lot for writing back.

            RE: pins used to drive the sd card .... I am using expansion board V3.1 (no other devices connected, only GPy and ExpansionBoard)

            RE: I don't see the fs=os.mkfat(sd) cmd ... I made a new test. Still not working.

            >>> from machine import SD
            >>> sd = SD()
            >>> fs = os.mkfat(sd)
            >>> os.mount(sd, '/sd')
            >>> os.listdir('/sd')
            ['n\x03', '\x12\x13\x02"P#\x04@."']
            

            RE: SD card must have single FAT partition
            I have single FAT partition
            ![0_1591249832354_FAT.JPG](Uploading 100%)

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

              @nadvorvo If you have the option, try a different SD card of moderate size, like 8 or 16 BGByte. Remove all partitions using a partition manager and create a new one.

              1 Reply Last reply Reply Quote 0
              • N Offline
                nadvorvo
                last edited by

                @robert-hh @kjm Thanks a lot for writing back.
                The problem was really in SD, I have taken another one (16GB Kingstone) and file listing is fine.

                >>> from machine import SD
                >>> sd = SD()
                >>> fs = os.mkfat(sd)
                >>> os.mount(sd, '/sd')
                >>> os.listdir('/sd')
                ['System Volume Information', 'updater.elf', 'NB1-41019.dup']
                

                Upgrade procedure started, but there is another problem (Code download failed[1], aborting!)

                >>> import sqnsupgrade
                >>> sqnsupgrade.run('/sd/NB1-41019.dup', '/sd/updater.elf')
                <<< Welcome to the SQN3330 firmware updater [1.2.6] >>>
                >>> GPy with firmware version 1.20.2.r3
                /sd/updater.elf is not required. Resumining normal upgrade.
                Firmware file is too big to load via FFF method. Using ON_THE_FLY
                Attempting AT wakeup...
                Session opened: version 1, max transfer 8192 bytes
                Sending 5835531 bytes: [                                        ]   1%Wrong SRSP signature: 0x0D0A4552
                SRSP header too small: 9
                Code download failed[1], aborting!
                True
                >>>
                

                I am trying another SD (32GB Scandisk Extreme) ... succeeded

                >>> sqnsupgrade.run('/sd/NB1-41019.dup', '/sd/updater.elf')
                <<< Welcome to the SQN3330 firmware updater [1.2.6] >>>
                >>> GPy with firmware version 1.20.2.r3
                Attempting AT auto-negotiation...
                Session opened: version 1, max transfer 2048 bytes
                Sending 371307 bytes: [########################################] 100%
                Waiting for updater to load...
                Attempting AT wakeup...
                Session opened: version 1, max transfer 8192 bytes
                Sending 5835531 bytes: [########################################] 100%
                Waiting for modem to finish the update...
                <<<=== DO NOT DISCONNECT POWER ===>>>
                Resetting....................................
                Your modem has been successfully updated.
                Here is the current firmware version:
                
                UE6.0.0.0
                LR6.0.0.0-41019
                
                IMEI: 354347095120116
                True
                
                robert-hhR 1 Reply Last reply Reply Quote 0
                • robert-hhR Offline
                  robert-hh @nadvorvo
                  last edited by

                  @nadvorvo Good that it worked. The SD card support of these littel boards is a little bit picky. If you have a SD card that works well, keep it for that purpose. I personally have good experience with Sandisk cards.
                  I do not believe the the fail on the first attempt was related to the SD card. The error message originates from the modem firmware.

                  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