FiPy firmware upgrade failed - Cat M1



  • Hello everyone.

    I'm new to the Pycom community, so I apologise in advance if some of my questions may seem stupid.

    I've just received a FiPy from which I'd like to use its CAT-M1 capabilities. I'm using it on top of a Pytrack module.
    When trying to do a "From network import LTE", it failed to find LTE but I think it's because I need to upgrade my FiPy firmware. I have tried to do so following the tutorials found here :
    https://core-electronics.com.au/tutorials/pycom-gpy-fipy-cellular-lte-firmware-update.html
    And here :
    https://docs.pycom.io/tutorials/lte/firmware

    But I cannot get past the step where it says :

    import sqnsupgrade
    sqnsupgrade.uart(True)
    

    As I get this message :

    >>> import sqnsupgrade
    >>> sqnsupgrade.uart(True)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    AttributeError: 'module' object has no attribute 'uart'
    

    Could anyone please help me figure out what's the issue here and how I can resolve it? Thanks.





  • @rskoniec Thanks for these detailed instructions. I've followed them and no longer get the Aborting error, however the process seems to fail:

    >>> sqnsupgrade.run('/sd/CATM1-38638.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%
    Bootrom updated successfully, switching to upgrade mode
    Attempting AT auto-negotiation...
    ERROR sending AT command... no response? b''
    AT auto-negotiation failed! Exiting.
    Unable to load updater from /sd/updater.elf
    

    Any suggestions?

    Thanks!



  • @arnaudp I've been attempting to update the modem from UART no SD card. Haven't been able to do it.



  • @dda Download 1.18.1.r1 from here https://software.pycom.io/downloads/FiPy-1.18.1.r1.tar.gz and downgrade using Pycom Firmware Upate tool with flash from local file option.



  • I am on the same page with version r4:

    >>> import os
    >>> from machine import SD
    >>> sd=SD()
    >>> os.mount(sd,'/sd')
    >>> os.listdir('/sd')
    ['upgdiff_38638-to-39529.dup', 'CATM1-39529.dup', 'upgdiff_33080-to-39529.dup', 'updater.elf']
    >>> import sqnsupgrade
    >>> sqnsupgrade.run('/sd/CATM1-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
    

    Please advise on how I may be able to downgrade to 1.18.1.r1, so I may be successful....per post below.



  • This post is deleted!


  • @Xykon When I was helping @ArnaudP to resolve the problem with FiPy modem f/w update (sqnsupgrade.run('/sd/CATM1-version.dup', '/sd/updater.elf')) from initial release, we went this path:

    • upgraded FiPy from 1.10.0.b1 to the latest stable 1.18.1.r4
    • on FiPy 1.18.1.r4 modem f/w upgrade to the newest CATM1-39529 failed
    • on FiPy 1.18.1.r4 modem f/w upgrade to previousCATM1-38638 failed
    • downgraded FiPy from 1.18.1.r4 to 1.18.1.r1
    • on FiPy 1.18.1.r1 modem f/w upgrade to CATM1-38638 successful
    • now I'm waiting for @ArnaudP feedback about modem f/w upgrade to CATM1-39529 on FiPy 1.18.1.r4
    • @ArnaudP has confirmed that after previous step, modem f/w upgrade to CATM1-39529 on FiPy 1.18.1.r4 was successful

    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). I've been told by @ArnaudP that he had already sent you a message.



  • @rskoniec Sure, thanks :)



  • @arnaudp I've started a forum chat with you. Can we continue there?



  • @rskoniec We haven't received our cat-M1 SIM card yet. Do you think I can try with a regular SIM ?
    In this video tutorial : https://core-electronics.com.au/tutorials/pycom-gpy-fipy-cellular-lte-firmware-update.html
    it seems he hasn't put a sim card in it. Weird. Or the video is a bit outdated maybe.



  • @arnaudp One more thing just came to my mind - do you have SIM card inserted in your FiPy? I don't know if this is an issue, but all of my FiPy modem f/w updates I've done with SIM card.



  • @rskoniec
    With some debug infos. We can see the files are listed with their right size :

    File /sd/updater.elf has size 429340
    File /sd/CATM1-39529.dup has size 6059510
    

    Here is the complete log :

    >>> sqnsupgrade.run('/sd/CATM1-39529.dup', '/sd/updater.elf', debug=True)
    <<< Welcome to the SQN3330 firmware updater [1.2.0] >>>
    >>> FiPy with firmware version 1.18.1.r4
    File /sd/updater.elf has size 429340
    File /sd/CATM1-39529.dup has size 6059510
    Modem state: 2
    Checking bootrom & application
    Checking line
    Checking line SYSTEM VERSION
    Checking line ==============
    Checking line   FIRMWARE VERSION
    Checking line     Bootloader0* : 5.1.1.0 [33080]
    old_br: True
    Checking line     Bootloader1  : NA
    Checking line     Bootloader2  : NA
    Checking line     NV Info      : 1.1,0,0
    Checking line     Software     : 5.1.1.0 [33080] by robot-soft at 2017-10-27 07:49:11
    old_sw: True
    Checking line     UE           : Unknown
    Checking line   COMPONENTS
    Checking line     ZSP0         : 1.0.98-12323
    Checking line     ZSP1         : 1.0.98-12295
    Checking line
    Checking line OK
    Checking line
    Returning: True
    mirror? False  recover? False  resume? False  direct? False  atneg_only? False bootrom? True load_fff? False
    Initial prepartion complete...
    Loading built-in recovery bootrom...
    Attempting AT wakeup...
    b'\r\nOK\r\n'
    Entering upgrade mode...
    AT+SMOD? returned 2
    AT+SMSWBOOT=3,1 returned: b'\r\nOK\r\n'
    Response after reset: b'\r\nERROR\r\n'
    Starting STP
    <<<=== DO NOT DISCONNECT POWER ===>>>
    Sending AT+SMSTPU="ON_THE_FLY"
    Starting STP code upload
    magic=0x74736166, op=0x80, sid=0x0, plen=0x0, tid=0x0, hcrc=0x0, pcrc=0x18
    Correct SRSP signature: 0x74736166
    Session opened: version 1, max transfer 8192 bytes
    Sending 55498 bytes: [########################################] 100%
    Bootrom updated successfully, switching to recovery mode
    AT+SMSWBOOT=0,1 returned b'\r\nERROR\r\n'
    Received ERROR from AT+SMSWBOOT=0,1! Aborting!
    Success1? False
    Unable to upgrade bootrom.
    Success2? False
    Unable to load updater from /sd/updater.elf
    


  • @rskoniec Yup, that's the file I have on my disk, just checked the size with a freshly dowloaded version. It seems that it's the sending that didn't work. And now it says it won't detect the modem (perhaps because of faulty upgrade). Ok not anymore
    But my files are the right ones on the disk :/



  • @arnaudp I think you've got incomplete file/files - 55498 bytes is too short (incomplete download from https://software.pycom.io/downloads/sequans2.html ?).

    CATM1-39529.dup is almost 6MB big
    updater.elf is over 400KB big



  • @rskoniec Ok ! So I have formatted it again and now it works !

    Now here's the new issue :

    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
    


  • @arnaudp So maybe you should try with 8/16 GB SD card. FYI, os.mkfs(sd) is formatting your SD card to the right filesystem for Pycom devices. So after that you should remove SD card from PyTrack, put into your PC, copy files and then insert back again to the PyTrack, reset by button your FiPy and from fresh REPL:

    from machine import SD
    sd = SD()
    os.mount(sd, '/sd')
    os.listdir('/sd')         # to check if the files exist on SD card
    
    import sqnsupgrade
    sqnsupgrade.run('/sd/CATM1-39529.dup', '/sd/updater.elf')         # for CAT-M1
    sqnsupgrade.run('/sd/NB1-40343.dup', '/sd/updater.elf')             # for CAT-NB1
    


  • @rskoniec Same issue :

    >>> os.mkfs(sd)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    OSError: the requested operation failed
    


  • @arnaudp Can you try:

    os.mkfs(sd)
    

    and then:

    os.mount(sd, '/sd')
    os.listdir('/sd') 
    


  • @rskoniec Nope, here's what I get :

    >>> from machine import SD
    >>> sd = SD()
    >>> os.mount(sd, '/sd')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    OSError: the requested operation failed
    

    I wonder if it could come from the card? I only have at hand a 128Gb card (maybe too high capacity) ?



Pycom on Twitter