GPy Modem (NB1) Firmware Update



  • 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



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



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


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



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



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



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


Log in to reply
 

Pycom on Twitter