New LTE Firmware release v1.18.1.r3 & CAT-M1 firmware & modem updater


  • administrators

    Hello everyone,

    A new stable firmware is now available for the LTE modules (GPy, G01, FiPy). This update has a number of changes in the LTE stack and a new Sequans firmware updater that allows using "differential" upgrade packages that are significantly smaller than the full upgrade packages (see more details below).

    LTE class changes:

    • The module should no longer freeze when instantiating the LTE class multiple times or after a soft reset

    • New commands pppsuspend() and pppresume() allow pausing & resuming the LTE ppp connection to send AT commands (These commands are not available when using the firmware installed during production).

    • You can now specify the initial APN during attach() : lte.attach(apn="nb.inetd.gdsp")

    • dettach() has an option parameter lte.dettach(reset=True) that automatically resets the modem before switching off the radio. This may be helpful if the modem freezes after calling lte.dettach()

    • deinit() has two new parameters, lte.deinit(dettach=False) allows the modem to go into power saving mode (PSM, eDRX) without dettaching from the network. Edit: Additionally, deinit() also accepts lte.deinit(reset=True) if you call deinit() without calling dettach() first.

    • send_at_cmd() has an optional parameter lte.send_at_cmd('AT', delay=1000). The delay in milliseconds is the time the esp32 waits between sending the request to the modem and reading the response.

    sqnsupgrade class changes:

    • New info() command to check the modem state. (this command only works directly on the module). If the modem is in application mode, the current firmware version is displayed. This behaviour replaces the version() command which now is only available in uart() mode. Optional parameters are sqnsupgrade.info(verbose=False, debug=False)
      This command should definitively detect the modem after a power cycle as long as the boot.py and main.py are empty.

    • New optional command line option load_fff for the sqnsupgrade.run() command. This allows loading the new differential firmware upgrade packages into a special area of the modem. The upgrade is then applied automatically on the modem and the updater just needs to wait for the upgrade to finish. This option is enabled by default for all upgrade files that are 4MB or less in size.

    Sequans firmware packages:

    New firmware packages are now available at: http://software.pycom.io/downloads/sequans2.html

    Please note that existing packages have been updated to include additional files so even if you have downloaded a package previously please download it again.

    New CAT-M1 firmware 39529:

    New CAT-M1 firmware package 39529 is now available for download. The new firmware contains stability improvements and general bug fixes.

    To upgrade from the previous CAT-M1 firmware 38638 you can simply upload the upgdiff_38638-to-39529.dup file (452K) from the CATM1-39529.zip archive into the /flash directory on your module and run:

    import sqnsupgrade
    sqnsupgrade.run('upgdiff_38638-to-39529.dup')
    

    If you are updating the Sequans firmware on your module for the first time, please use instead the file upgdiff_33080-to-39529.dup (1.2M) from the same archive.

    Similar upgrade packages are available for the NB-IoT firmwares. We are currently waiting for Sequans to provide a new NB-IoT with working DNS. We're hoping the get the new version early next week.

    P.S. The sources for this release are currently available here: https://github.com/pycom/pycom-micropython-sigfox/tree/lte-xykon


    Log in to reply
     

  • administrators

    @philwilkinson said in New LTE Firmware release v1.18.1.r3 & CAT-M1 firmware & modem updater:

    I have just attempted to upgrade a new module to the modem firmware.
    But I get the error statement, I have no idea what it refers to.
    any ideas?

    Do you know the firmware version of the modem when you started the upgrade? Which MicroPython firmware did you use? And which firmware upgrade file / method did you use to upgrade the modem?



  • I have just attempted to upgrade a new module to the modem firmware.
    But I get the error statement, I have no idea what it refers to.
    any ideas?

    Resetting..................
    Your modem has been successfully updated.
    Here is the current firmware version:
    
    ERROR
    UE5.0.0.0d
    LR5.1.1.0-39529
    >>> 
    


  • More than 1 way to skin a cat! Renamed upgdiff_33080-to-39529.dup to upgdiff_33080-to-39529.py, uploaded it via the upload button in atom, used Filezilla to change the extension back to .dup in the gpy flash then upgraded the modem.

    Your modem has been successfully updated.
    Here is the current firmware version:
    
    UE5.0.0.0d
    LR5.1.1.0-39529
    


  • @kjm Status:
    Does this give anyone a clue as to why it always stops after 786432 bytes?

    Starting upload of C:\Users\Kris McLean\Google Drive (1)\My Documents\Pycom\CATM1-39529\upgdiff_33080-to-39529.dup
    Status: Retrieving directory listing of "/flash"...
    Command: TYPE I
    Response: 200
    Command: PASV
    Response: 227 (192,168,4,1,7,232)
    Command: LIST
    Response: 150
    Response: 226
    Command: PASV
    Response: 227 (192,168,4,1,7,232)
    Command: APPE upgdiff_33080-to-39529.dup
    Response: 502
    Error: Critical file transfer error



  • Everytime Filezilla tries to upload upgdiff_33080-to-39529.dup to the gpy it crashes once the file size gets to 786,432 The cert, lib & sys folders are all empty so I can't figure out why we're hitting a wall? New modem firmware is scary enough without trying the sd card route, I was really hoping to do it from the onboard flash.





  • @xykon I used Filezilla to upload the 33080-to-395289 diff file to /flash. Then i executed the import sqnsupgrade and .run. It says attempting AT Wakeup... then session opened: version 1 max transfer 8192 bytes. sending 1211459 bytes: then it just pauses. Not sure whats going on. I have the v1.18.1.r4 firmware on my device but never upgrade the Sqns firmware before.


  • administrators

    @panda said in New LTE Firmware release v1.18.1.r3 & CAT-M1 firmware & modem updater:

    the reverse order of posts is one thing non-intuitive for me

    You can change the "Sort by" at the bottom of the screen and the forum should remember that as long as you are logged in.

    0_1542074689924_Screenshot 2018-11-13 03.02.18.png



  • @xykon sorry I missed the r4 post. I find this forum hard to follow. Can't put my finger on it, but the reverse order of posts is one thing non-intuitive for me.

    I'll try r4 in the AM. Thanks.


  • administrators

    @danielm @panda

    As mentioned a fix for the init issue is already on GitHub and I will release this shortly. I'm also preparing the new NB-IoT firmware release for today.

    lte.isattached returns True even without calling lte.attach().

    Does this still happen with v1.18.1.r4? If it does, could you please check the two commands:

    print(lte.send_at_cmd('AT+CGATT?'))
    print(lte.send_at_cmd('AT+CEREG?'))

    According to Sequans, AT+CGATT? should be enough to detect if the modem is attached, however I found this is not always the case so I kept a mix of the "old" CEREG? and "new" CGATT method as the CEREG method doesn't always work correctly either.

    The problem is that any socket communication is almost impossible. Maybe there are some timing issues on the UART interface of Sequans modem? Could it behave differently with NB1-40343?

    Please check with the new firmware and let us know.

    I am seeing different behavior when connecting to CAT M1 with 1.18.1.r3 and 39529.

    I tested this with our Amarisoft LTE-M emulator but did not observe this issue so far.



  • @danielm said in New LTE Firmware release v1.18.1.r3 & CAT-M1 firmware & modem updater:

    @xykon I see the same thing with 1.18.1.r3. I can init the LTE class form the REPL, but not in a py script. The init just hangs.

    I traced it to activity before the init. For example the following works:

    def initLTE():
        lte = LTE()
    

    And the following hangs on the init

    import logger
    def initLTE():
       logger.info("bla bla bla bla")
       lte = LTE()
    

    I don't think the issue is specific to the logger class, but something in the logger causes the issue.

    Again, No issues with 1.18.1.r1



  • I am seeing different behavior when connecting to CAT M1 with 1.18.1.r3 and 39529.

    Previously the following would work fine:

    lte = LTE(carrier='verizon')
    lte.attach()

    ...

    lte.connect(cid=3)

    With the latest firmwares I get the following error:

    lte.connect(cid=3)
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    OSError: the requested operation failed

    I tried with other carrier and cid values and same result.

    If I remove the carrier on init and cid parameter I can connect successfully. Are there new rules about how to connect to various carriers?



  • @xykon
    With v1.18.1.r3 suggested way to initialize LTE from REPL worked:

    from network import LTE
    lte = LTE()
    

    However it did not work in our application.
    Then I noticed v1.18.1.r4 pushed to the GitHub. I built it and tested LTE initialization which works both ways without any issues and in our application as well.

    The problem is that any socket communication is almost impossible. Maybe there are some timing issues on the UART interface of Sequans modem? Could it behave differently with NB1-40343?

    Edit: lte.isattached returns True even without calling lte.attach(). Snychro state of the modem is OFF.

    Pycom MicroPython 1.18.1.r4 [dfa1176] on 2018-11-12; FiPy with ESP32
    Type "help()" for more information.
    >>> from network import LTE
    >>> lte = LTE()
    >>> lte.isattached()
    True
    >>> lte.send_at_cmd('AT!="showphy"', delay = 100)
    '\r\nDL SYNCHRO STATISTICS\r\n=====================\r\n    Synchro state                         : OFF\r\n    PPU SIB1 ACQ watchdog                 : 0\r\n    Frequency Hypothesis RF  (Hz)         : 0\r\n    RSRP (dBm)                            : 0.00\r\n    RSRQ  (dB)                            : 0.00\r\n    Channel estimation state (Cell-spec.) : LOW CINR\r\n    Channel estimation state (UE-spec.)   : LOW CINR\r\n    Channel estimation state (MBSFN)      : LOW CINR\r\n    Channel estimation CINR               : 0.00\r\n    Channel length                        : SHORT\r\n  AGC\r\n    AGC RX gain (dB)                      : 0.00\r\n    RX PSD BO (dBFs)                      : 0.00\r\n    RX PSD (dBm)                          : 0.00\r\n    Noise level RS (dBm)                  : 0.00\r\n    Digital gain (dB)                     : 0.00\r\n    CINR RS (dB)                          : 0.00\r\n  NARROWBANDS\r\n    Last DL NB                            : 0\r\n    Last UL NB                            : 0\r\n  AFC\r\n    Frequency offset RF  (Hz)             : 0\r\n    Frequency offset BB  (Hz)             : 0\r\n  PBCH\r\n    MIB received quantity                 : 0\r\n    MIB timeout quantity                  : 0\r\n\r\nOK\r\n'
    

    Synchro state remains to be OFF even after calling lte.attach()


  • administrators

    @danielm I'm not quite sure why but it also makes a difference how you initialise the LTE class.

    Could you please try this instead:

    from network import LTE
    lte = LTE()
    

  • administrators

    @danielm said in New LTE Firmware release v1.18.1.r3 & CAT-M1 firmware & modem updater:

    Is v1.18.1.r3 supposed to work with NB1-38729?
    I am testing on FiPy and calling network.LTE() throws OSError: the requested operation failed - not immediately but after some timeout.

    The sqnsupgrade scripts use the UART class to connect directly to the modem from MicroPython and sometimes it doesn't release the peripheral, which causes LTE.init() to hang (it's trying to send several commands to the modem but never gets a response). You can try to run del sqnsupgrade to force unload it otherwise a hard reset should fix it too.

    If this happens even without loading sqnsupgrade, I'm currently testing NB1-40343 which fixes the DNS issue and a few other things. I'm expecting to release this within the next 24 hours and so far have not observed any issues during LTE.init() that are not related to sqnsupgrade.



  • @xykon
    Is v1.18.1.r3 supposed to work with NB1-38729?
    I am testing on FiPy and calling network.LTE() throws OSError: the requested operation failed - not immediately but after some timeout.

    Pycom MicroPython 1.18.1.r3 [v1.8.6-849-3aac0f3] on 2018-11-08; FiPy with ESP32
    Type "help()" for more information.
    >>> import sqnsupgrade
    >>> sqnsupgrade.info()
    <<< Welcome to the SQN3330 firmware updater [1.2.0] >>>
    >>> FiPy with firmware version 1.18.1.r3
    Your modem is in application mode. Here is the current version:
    UE6.0.0.0
    LR6.0.0.0-38729
    >>> import network
    >>> lte = network.LTE()
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    OSError: the requested operation failed
    


  • @tlanier
    Got the update to work!

    Here's some things that might help other people getting started like me:

    • The Pycom Firmware Update program (V1.15.1) is used to update the GPy firmware to the stable version 1.18.1 r3. The Hi Speed must be selected or the update will time out.
      [https://pycom.io/downloads/]

    • The upgdiff_38638-to-39529.dup file is placed in the /flash directory, which is the same directory python code is placed. I originally placed the file in a folder I created called flash thinking my code was in the root folder. In fact my code was already in the /flash folder; if you have your project open in Visual Studio Code pointing to the flash folder, you may not notice this.

    • Even after changing global Pymakr.json to include .dup files (sync_file_types), Visual Studio Code will not upload the large file (times out). I had to use FTP instead.

    Connect using WIFI
    SSID: gpy-wlan-becc
    FTP to 192.168.4.1
    user: micro
    password: python
    FileZilla - must select passive + limit number of simultaneous connects to 1

    • Don't forget to erase the file after the update to free up space.


  • @xykon

    When I do an import sqnsupgrade I get an error ImportError: no module named 'sqnsupgrade'

    I'm running Pycom MicroPython 1.19.0.b4 on 2018-07-13 which was flashed using the latest download from [https://pycom.io/downloads/]

    How can I get the latest code on my GPy?

    Do I need to download the code from GitHub to upgrade?

    I've tried downloading and building the code from Ubuntu 18.04. I get an error on the last step when trying to flash the code to the GPy.

    $ sudo make BOARD=GPY flash

    make: *** No rule to make target '/components/esp32/ld/esp32.ld', needed by 'build/GPY/release/esp32_out.ld'

    I will describe in detail my steps to download and build if that is necessary.



  • Never mind. It was hidden formatting in my copy/paste. Typed out, it worked just fine.


Log in to reply
 

14 out of 28

Pycom on Twitter