firmware update application - u-blox

44
Cellular Module Firmware Update Using EasyFlash, FOAT and Firmware Install command Application Note Abstract Description of how to update the firmware on u-blox cellular modules using EasyFlash, FOAT (over AT commands), and the Firmware Install command. www.u-blox.com UBX-13001845 - R17

Upload: truongdien

Post on 13-Feb-2017

324 views

Category:

Documents


9 download

TRANSCRIPT

Page 1: Firmware Update Application - U-blox

Cellular Module Firmware Update Using EasyFlash, FOAT and Firmware Install command Application Note

Abstract

Description of how to update the firmware on u-blox cellular modules using EasyFlash, FOAT (over AT commands), and the Firmware Install command.

www.u-blox.com

UBX-13001845 - R17

Page 2: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17

Page 2 of 44

Document Information

Title Cellular Module Firmware Update

Subtitle Using EasyFlash, FOAT and Firmware Install command

Document type Application Note

Document number UBX-13001845

Revision, date R17 03-Jan-2018

Disclosure restriction

This document applies to the following products:

Product name

LEON-G1

SARA-G3

SARA-U2

LISA-U2

TOBY-L2

MPCI-L2

TOBY-R2

LARA-R2

TOBY-L4

u-blox reserves all rights to this document and the information contained herein. Products, names, logos and designs described herein may in whole or in part be subject to intellectual property rights. Reproduction, use, modification or disclosure to third parties of this document or any part thereof without the express permission of u-blox is strictly prohibited.

The information contained herein is provided “as is” and u-blox assumes no liability for the use of the information. No warranty, either express or implied, is given, including but not limited, with respect to the accuracy, correctness, reliability and fitness for a particular

purpose of the information. This document may be revised by u-blox at any time. For most recent documents, please visit www.u-blox.com.

Copyright © 2018, u-blox AG

u-blox is a registered trademark of u-blox Holding AG in the EU and other countries.

Page 3: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Contents

Page 3 of 44

Contents

Contents .............................................................................................................................. 3

1 Introduction .................................................................................................................. 5

2 FW update .................................................................................................................... 6

3 EasyFlash ....................................................................................................................... 8

3.1 FW download over UART or UART AUX ................................................................................................ 8

3.2 FW download over USB ...................................................................................................................... 11

3.3 FW download over USB (TOBY-L2 / MPCI-L2 series only) .................................................................... 14

4 Firmware update Over AT commands (FOAT) .......................................................... 16

4.1 TOBY-L2 / MPCI-L2 series AT command syntax ................................................................................... 16

4.1.1 Defined values ............................................................................................................................. 16

4.1.2 Error result codes ........................................................................................................................ 18

4.2 LEON-G1 / SARA-G3 / LISA-U2 / SARA-U2 / TOBY-R2 / LARA-R2 series AT command syntax ............... 18

4.2.1 Defined values ............................................................................................................................. 21

4.2.2 Error result codes ........................................................................................................................ 22

4.2.3 FW update procedure on LISA-U2 series ...................................................................................... 23

5 Firmware install (+UFWINSTALL) ............................................................................... 24

5.1 Introduction ........................................................................................................................................ 24

5.2 LISA-U2 / SARA-U2 / LARA-R2 / TOBY-R2 AT command syntax ........................................................... 24

5.2.1 Defined values ............................................................................................................................. 25

5.3 TOBY-L2 / MPCI-L2 AT command syntax ............................................................................................ 26

5.3.1 Defined values ............................................................................................................................. 26

5.4 TOBY-L4 AT command syntax ............................................................................................................. 27

5.4.1 Defined values ............................................................................................................................. 27

5.5 Firmware Install specifications ............................................................................................................. 29

5.5.1 Generation of the “update file” .................................................................................................. 29

5.5.2 Recovery mechanism ................................................................................................................... 29

5.5.3 Installation performance .............................................................................................................. 29

5.5.4 Limitations ................................................................................................................................... 29

Appendix .......................................................................................................................... 30

A List of acronyms ......................................................................................................... 30

B Firmware Install error result codes ........................................................................... 31

B.1 LISA-U2 / SARA-U2 / LARA-R2 / TOBY-R2 / TOBY-L4 error result codes ............................................... 31

B.2 LISA-U2 final results codes .................................................................................................................. 31

B.3 LARA-R2 / TOBY-R2 / SARA-U2 final result codes ................................................................................ 32

B.4 TOBY-L2 / MPCI-L2 error result codes ................................................................................................. 32

B.5 TOBY-L4 final result codes .................................................................................................................. 33

Page 4: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Contents

Page 4 of 44

C FOTA demo application in m-center ......................................................................... 34

C.1 FOTA: firmware downloading procedure ............................................................................................ 35

C.2 FOTA: firmware upgrading procedure................................................................................................. 35

D FOAT/UFWUPD on a Linux system ............................................................................ 36

D.1 Minicom ............................................................................................................................................. 36

D.2 Sx command ....................................................................................................................................... 40

E Disabling the automatic notification of FW update ................................................ 42

Related documents .......................................................................................................... 43

Revision history ................................................................................................................ 43

Contact .............................................................................................................................. 44

Page 5: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Introduction

Page 5 of 44

1 Introduction This document briefly describes the firmware update mechanism for u-blox cellular modules.

The cellular firmware comprises three parts:

The module image

The module parameters

The module file system, which contains data that can be stored by the user (such as SMS/text messages)

To completely update the firmware, it is necessary to download at least the module image and parameters; the module file system is optional.

The three images are resident in dedicated areas of the flash memory.

It is possible to update the firmware to a newer version or to revert to an older one.

The LEON-G1 series firmware can be reverted to an older firmware version only by using the EasyFlash tool.

The modules supporting OMA-DM and ODIS may automatically notify an OMA-DM server in the event of a Firmware Update. See appendix E for more details.

EasyFlash FOAT FWINSTALL

UART UART AUX

USB UART UART AUX

USB SPI UART USB

TOBY-L2 series 1

2

2

MPCI-L2 series 2

TOBY-R2 series

LARA-R2 series

SARA-U2 series 3

3

LISA-U2 series

LISA-U200 FOTA /

LISA-U201 FOTA

SARA-G3 series

LEON-G1 series

TOBY-L4 series

"50" product versions

Table 1: Firmware update procedures and interfaces used on u-blox cellular modules

For the firmware update of TOBY-L4 "00" product versions, see TOBY-L4 Build System Application Note [3].

The +CGMR AT command allows the user to verify the module modem version:

Command Response Description

AT+CGMR 11.40

OK

11.40 is an example of a modem version.

1 Not supported by TOBY-L200-00S / TOBY-L210-00S

2 Not supported by MPCI-L2 "00" and "60" product versions and by TOBY-L2 "00", "50" and "60" product versions

3 Not supported by "00", "03", "53", "63", "73" product versions

Page 6: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 FW update

Page 6 of 44

2 FW update This section introduces the different methods available to update the firmware of the cellular module. For each method, it is shown what will change in the cellular module with respect to the previous FW version. Table 2 shows the different attributes that may be affected by a firmware update.

Attribute Description

Firmware Firmware of the module

NVM All parameters described in appendix B.2 of the u-blox AT command manual [1]

Profiles All parameters described in appendix B.1 of the u-blox AT command manual [1]

FS (File System) Place where the user can store his own files

Calibration data Data not belonging to above listed attributes

Table 2: Attributes involved in FW update

The following methods are available for the FW update:

EasyFlash tool: EasyFlash is a tool for the Windows OS to download the firmware from a PC through a module serial interface (USB or UART)

Firmware update over AT (FOAT) by means of the +UFWUPD AT command; the FOAT is a method to update the firmware by transferring the related file from an external device (e.g. application host processor) to the module through the AT interface

Firmware installation from a FS file. The firmware installation from a file is triggered by the +UFWINSTALL AT command and uses a file stored in the module’s file system (e.g. a file retrieved from a FOTA server). This procedure can be used as a final step for the FW update procedure

Table 3 lists the cellular series modules, and for each one, the three firmware update methods. Each method lists the attributes that are changed after the firmware update (i.e. reset to the factory-programmed values). If an attribute is not listed, it means that it is not changed after the update procedure.

For example, for LEON-G1 using the FOAT (+UFWUPD) method with <filetype>=0, it will not change the NVM, profiles and FS, while with <filetype>=1 it will not change the NVM and profiles, but will change the FS.

The “Firmware” attribute is not listed in Table 3, because it is updated in all the methods: EasyFlash, +UFWUPD [with <filetype> 0 and 2], +UFWINSTALL.

Product EasyFlash FOAT

(+UFWUPD) <filetype>=[0..2]

FOTA

(+UFWINSTALL)

LEON-G1 NVM, profiles, FS 0:

1: FS Not available

SARA-G3 NVM, profiles, FS 0: NVM, profiles

1: FS Not available

LISA-U1 NVM, profiles, FS

0: NVM, profiles

1: NVM, profiles, FS

2: NVM, profiles, FS

Not available

LISA-U2 NVM, profiles, FS

0: NVM, profiles

1: NVM, profiles, FS

2: NVM, profiles, FS

Not available

SARA-U2 NVM, profiles, FS

0: NVM, profiles

1: NVM, profiles, FS

2: NVM, profiles, FS

NVM, profiles

LISA-U200-82S / LISA-U200-83S / LISA-U201-83S

NVM, profiles, FS

0: NVM, profiles

1: NVM, profiles, FS

2: NVM, profiles, FS

NVM, profiles

MPCI-L2 NVM, profiles, FS NVM, profiles, FS NVM, profiles, FS

Page 7: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 FW update

Page 7 of 44

Product EasyFlash FOAT

(+UFWUPD) <filetype>=[0..2]

FOTA

(+UFWINSTALL)

TOBY-L2 NVM, profiles, FS NVM, profiles, FS NVM, profiles, FS

TOBY-R2 NVM, profiles, FS

0: NVM, profiles

1: NVM, profiles, FS

2: NVM, profiles, FS

NVM, profiles

LARA-R2 NVM, profiles, FS

0: NVM, profiles

1: NVM, profiles, FS

2: NVM, profiles, FS

NVM, profiles

TOBY-L4 "50" product version

NVM, profiles Not Available NVM, profiles

Table 3: Applicable products and attributes that will change when performing a FW update

Page 8: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 EasyFlash

Page 8 of 44

3 EasyFlash

See Table 1 for the list of modules and interfaces supporting EasyFlash.

A proper setup file, e.g. EasyFlash_<xx.yy.zz>.exe, is used to install the executable file and the needed components.

EasyFlash has been tested on these operating systems: Windows XP, Windows Vista (32/64 bit), Windows 7 (32/64 bit), Windows 8 (32/64 bit), Windows 8.1 (32/64 bit) (32/64 bit).

The EasyFlash tool requires a file in DOF format, which includes the firmware components (module image, module parameters, module file system) that are needed to perform a FW update.

The FW update using EasyFlash requires a PC or Notebook. The EasyFlash executable file and the .DOF file (containing the firmware version to update) must be stored in the same folder in the PC or Notebook. Only one .DOF file should be in the folder.

For LEON-G1 and SARA-G3 series modules, the .ROF file of the current firmware used by the module must be stored in the same folder where the EasyFlash executable file and the firmware version (in DOF file format) are located. The .ROF file is a downloadable file that makes it possible to revert to an older FW release. It is only required for reverting to older FW for LEON-G1 and SARA-G3, and is not required for other modules. Before reverting to a previous firmware version, store only one .ROF file and one .DOF file in the same folder together with the EasyFlash tool executable file.

Each cellular product family has a unique EasyFlash version (i.e. LEON-G1 EasyFlash cannot be used for LISA-U2 / SARA-G3 series modules and vice versa):

LEON-G1: EasyFlash_2G_v.2.3

SARA-G3, SARA-U2, LISA-U2, TOBY-R2, LARA-R2, TOBY-L44: EasyFlash_<06.yy.zz>

TOBY-L2, MPCI-L2: EasyFlash_<05.aa.bb>

where <aa.bb> and <yy.zz> indicate the tool version. Always use the latest available tool version.

3.1 FW download over UART or UART AUX

This section does not apply to TOBY-L4 series modules.

To update the module firmware using EasyFlash over UART or UART AUX interface, follow these steps:

1. Power on the module.

2. Connect the PC or notebook to the UART or UART AUX interface of the module by means of proper voltage translators (e.g. USB to UART converters) or by means of the proper configuration of the connected application processor in pass-through mode.

See the corresponding EVK user guide for the correct jumpers and slides configuration for the FW update.

3. Run the EasyFlash tool.

4 Do not use EasyFlash_06.02.00 and previous versions for the FW update on TOBY-L4 series

Page 9: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 EasyFlash

Page 9 of 44

4. Select the COM port where the module is connected and the baud rate (921600 bit/s is suggested if supported by the used external parts).

5. Click the EasyFlash “Start” button.

6. Keep the module RESET_N input low for a proper time period when performing a module reset.

Page 10: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 EasyFlash

Page 10 of 44

7. The download starts.

8. The firmware update is completed!

9. Close EasyFlash tool and reset the module.

Page 11: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 EasyFlash

Page 11 of 44

3.2 FW download over USB

This section does not apply to TOBY-L2 / MPCI-L2 / LEON-G1 / SARA-G3 series modules.

The firmware download using EasyFlash tool over the USB interface is similar to that for UART or UART AUX, following these steps:

Install the FlashUSB drivers before flashing over the USB interface. If the drivers are not installed, the download does not start.

1. Power on the module.

2. Connect the PC or the notebook to the USB interface of the module.

See the corresponding EVK user guide for the correct jumpers and slides configuration for the FW update.

3. Run the EasyFlash tool.

4. Click on the “USB port” button (the COM port and baud rate are not applicable when using USB).

Page 12: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 EasyFlash

Page 12 of 44

5. Click the EasyFlash “Start” button.

6. Keep the module RESET_N input low for a proper time period when performing a module reset.

7. The download starts.

Page 13: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 EasyFlash

Page 13 of 44

8. The firmware update is completed!

9. Close the EasyFlash tool and reset the module to start.

Page 14: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 EasyFlash

Page 14 of 44

3.3 FW download over USB (TOBY-L2 / MPCI-L2 series only)

The firmware download using EasyFlash tool over the USB interface is similar to that for UART or UART AUX.

Install the TOBY-L2 USB drivers before flashing over the USB interface. If the drivers are not installed, the download does not start.

To download the firmware with EasyFlash, follow these steps:

1. Power on the module. 2. Connect the PC or the notebook to the module USB interface. 3. Run the EasyFlash tool.

4. Click the EasyFlash “Start” button and wait for packet decompression (yellow progress bar).

5. Keep the module RESET_N input low for a proper time period when performing a module reset.

Page 15: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 EasyFlash

Page 15 of 44

6. The download starts.

7. The firmware update is completed!

8. Close the EasyFlash tool and reset the module to start.

Page 16: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Firmware update Over AT commands (FOAT)

Page 16 of 44

4 Firmware update Over AT commands (FOAT)

See Table 1 for the list of modules and interfaces supporting FOAT.

The firmware update can be carried out via the AT interface of the module (see the table reported in section 1) through the +UFWUPD AT command and Xmodem (or Xmodem-1k protocol) protocol. After having downloaded the "FOAT update" file delivered by u-blox, the Xmodem protocol will update the module.

The Xmodem protocol handles the errors (data corruption, data loss etc.) internally during the update phase.

When a firmware update is triggered, the host processor can choose either the Xmodem-1k protocol (1024 byte packets) or Xmodem protocol (128 byte packets).

The command syntax differs depending on the module series. See the corresponding section for the detailed description.

4.1 TOBY-L2 / MPCI-L2 series AT command syntax

On TOBY-L2 / MPCI-L2 series, the FW update over AT commands is performed by means of a BIN file officially released by u-blox. To start the process, the corresponding MD5 signature is needed.

Use the proper released file for Xmodem (128) and Xmodem-1k (1024) with the corresponding MD5 signature.

Type Syntax Response Example

Set AT+UFWUPD=<md5> +UFWUPD: ONGOING

CCC…

OK

UFWUPD REBOOT

AT+UFWUPD=a07a5534201b2e42dd2d

964920e57319

+UFWUPD: ONGOING

CCC…

OK

UFWUPD REBOOT

4.1.1 Defined values

Parameter Type Description

<md5> Number 32 hex number

The <md5> parameter is not mandatory for TOBY-L200-00S / TOBY-L200-50S / TOBY-L210-00S / TOBY-L210-50S / TOBY-L210-60S / TOBY-L280-00S / MPCI-L200-00S / MPCI-L210-00S / MPCI-L210-60S product versions.

The AT command can be issued over the USB or the UART (if supported) interface of the module.

On receiving the AT+UFWUPD command, the module:

Starts the Xmodem protocol and waits for data on the channel where the command has been sent.

Sends the waiting characters to the host terminal via the AT interface: up to ten “C” (0x43) characters and up to ten <NACK> (0x15) characters. Each character is sent with a 10 second timeout after the last one. The total timeout is 200 seconds. This is the time during which the host terminal must send TX data.

Page 17: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Firmware update Over AT commands (FOAT)

Page 17 of 44

If the data is sent while the “C” character is coming, the protocol uses the CRC method to detect transmission errors, otherwise the standard CHECKSUM method is used.

Then it is possible to download the new module image via the Xmodem protocol using a standard terminal program without flow control (e.g. with a PC environment HyperTerminal with these settings: frame format 8N1, HW flow control active, baud rate configurable, power saving disabled). Intra-character timeout is 1 second, (after receiving first valid data from the host).

The maximum number of allowed errors (timeout, bad data) is 10, after that Xmodem exit with this string:

ERROR1

On TOBY-L2 "00", "01", "50" and "60" product versions and MPCI-L2 "00" and "60" product versions if 10 errors are provided, the Xmodem exits with these strings:

"too many errors; giving up"

ERROR1

Once the update file has been downloaded, if the <md5> parameter is provided correctly (32 hex digits), then the MD5 check is performed.

If the <md5>parameter is provided incorrectly (less digits, more digits, or at least one non-hex digit), then the download will not be started, the module will exit from Firmware Update Mode, and the current firmware will be started. A proper error result code will be issued on the same channel where the command has been sent.

When a firmware update is triggered, the host processor can choose either the Xmodem-1k protocol (1024 byte packets) or Xmodem protocol (128 byte packets).

The module sends an <EOT> character (0x04) via the terminal for notifying the end of the download.

At the end of the download procedure, the module reboots and starts the update process, which will take about 1 minute. No messages are issued on the terminal during this phase.

When the module reboots, the USB will be detached, and attached again at the next boot in Firmware Update Mode (with the same USB CDC–ACM enumeration of operative mode). The USB port will be ready within 60 seconds after reboot. The user must connect again with the USB CDC–ACM port.

At the end of the update process the module reboots again with the new firmware installed and the NVM and profile parameters set to factory-programmed values.

The Xmodem protocol handles the errors (data corruption, data loss etc.) internally during the update phase.

In case of power loss during the update phase, at the next module wake-up a fault is detected and the module remains in Firmware Update Mode expecting the upload to restart from Xmodem handshake.

If the FW download ends with an ERROR1 condition, the module exits from Firmware Update Mode and returns to normal mode since the FW is still unchanged and usable (FW not corrupted by previous download process)

If the module does not receive any data from the host terminal after the tenth <NACK>, then the module will exit from Firmware Update Mode and return to normal mode. Since the FW is unchanged and still usable, ERROR1 is issued from the module to indicate: FW not corrupted by previous update process.

On the USB interface this performance is provided:

Speed: ~500 kB/s

Time to download update.zip: ~6 minutes

Time to perform the update: ~1 minute

Page 18: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Firmware update Over AT commands (FOAT)

Page 18 of 44

4.1.2 Error result codes

Response Description

ERROR1

too many errors; giving up

General error. The operation has been interrupted before starting to write in flash, the current FW is unchanged; the module exits Firmware Update Mode and starts

the current FW

bad block ones compl Block number error

unexpected block no, #num, expecting #num1 Unexpected block number

crc error, expected num, got num1 CRC error

checksum error, expected num, got num1 Checksum error

md5 not matching, update failed

ERROR1

Download has been done correctly but the MD5 calculated from the downloaded file does not match the one provided in the command.

The module exits Firmware Update Mode and starts the current FW.

short md5, update failed ERROR1

md5 provided in the command is shorter than expected.

Download is not started. The module exits Firmware Update Mode and starts the current FW.

long md5, update failed

ERROR1

md5 provided in the command is longer than expected.

Download is not started. The module exits Firmware Update Mode and starts the current FW.

md5 with no hex digits, update failed

ERROR1

md5 provided in the command has at least one non-hex digit.

Download is not started. The module exits Firmware Update Mode and starts the

current FW.

missing md5, update failed

ERROR1

md5 ins missing from provided AT command. The update is not started. The module exits Firmware Update Mode and starts the actual FW.

4.2 LEON-G1 / SARA-G3 / LISA-U2 / SARA-U2 / TOBY-R2 / LARA-R2 series AT command syntax

Depending on the firmware update type to perform, a file in .FLS or in .DFFS format is needed.

The file in .FLS format includes all the needed parts for the FW, NVM and profile update

The file in .DFFS format includes all the needed parts for the File System update

LEON-G1, SARA-G3, SARA-U2 (except for SARA-U201) and LISA-U2 series (except for LISA-U2x0-x1S and previous versions) allow updating the File System using only the file in DFFS format.

It is not possible to update the firmware using a peripheral where the multiplexer is enabled.

On receiving the AT+UFWUPD command, the module:

Resets, restarts and switches to Firmware Update Mode

Configures the serial port at the new baud rate (if any)

In case of FOAT over USB, the module will be detached after sending the command (because of the reset), and attached again at the next boot in Firmware Update Mode (with the same USB CDC–ACM enumeration of operative mode). USB port will be ready within 5 seconds after the command issued. The user must connect again with the USB CDC–ACM port.

Sends the IRC +UFWUPD: ONGOING command to the host terminal via the AT interface, followed by up to three “C” (0x43) characters and up to ten <NACK> (0x15) characters. The first three “C” characters are sent with a 3 second timeout after the last one, next <NACK> characters are sent with a 10 second timeout after the last one. The total timeout is 109 seconds. This is the timeout within which the host terminal must send TX data

Page 19: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Firmware update Over AT commands (FOAT)

Page 19 of 44

If data is sent while the “C” character is coming, the protocol uses the CRC method to detect transmission errors, otherwise the standard CHECKSUM method is used.

Then it is possible to download the new module image via the Xmodem protocol using a standard terminal program at the selected baud rate without flow control (e.g. HyperTerminal with these settings: frame format 8N1, HW flow control active, baud rate configurable, power saving disabled). At the end of the procedure, the final response is sent at the baud rate set for the FW update. When the FOAT procedure is completed, the baud rate is set to the current loaded profile of the new FW version.

Both IRC and any further final responses are sent at the new baud rate. Only a syntax error in the AT+UFWUPD command triggers an error result code at the original baud rate.

LEON-G1 series requires Xmodem packets to be sent within 50 ms.

SARA-G3 series requires Xmodem packets to be sent within 100 ms.

LISA-U2 and SARA-U2 series require flow control active on the UART interface. If the flow control is disabled, the RTS line must be held to the ON state.

Table 4 provides an example of the Firmware update Over AT commands procedure.

DTE Cellular module Description

AT+UFWUPD=0,460800 +UFWUPD: ONGOING Cellular module response sent at 460800 bit/s

CCC<NACK><NACK><NACK><NACK><NAC

K><NACK><NACK><NACK><NACK><NACK

>

Sent at 460800 bit/s: up to 10 <NACK>s

Code image using Xmodem-1k protocol sent (at 460800 bit/s) to the u-blox cellular module

OK Cellular module response sent at 460800 bit/s: the download is complete and

the reboot follows.

The module is updated to the new FW

versions and it is ready to receive further commands.

Table 4: Firmware Over AT commands procedure

Page 20: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Firmware update Over AT commands (FOAT)

Page 20 of 44

LEON-G1 modules send a <CAN> character (0x18) after 8 MB of data instead of waiting for the <EOT> character (0x04) from the sender. The <CAN> character can be interpreted as an ABORT from the module side.

LISA-U2 / SARA-U2 and SARA-G3 series modules send an <EOT> character (0x04) via the terminal for notifying the end of the download.

On LISA-U2 / SARA-U2 series, the <CAN> response is issued if it reaches the timeout after receiving the first character. Issue a new AT+UFWUPD command for a new FOAT session.

In case of power loss during the update, at the next module wake-up a fault is detected and the module remains in Firmware Update Mode, expecting the upload to restart from an Xmodem handshake.

If the FW download ends with an ERROR condition, the module remains in Firmware Update Mode, expecting the upload to restart from Xmodem handshake (all ERROR condition except ERROR1, described in section 4.2.2).

If the module does not receive any data from the host terminal after ten <NACK>s, then the module will exit from Firmware Update Mode and return to normal mode. Since the FW is unchanged and still usable, ERROR1 is issued from the module to indicate: FW not corrupted by previous update process.

If <filetype> is set to 2, make sure the file contains both the firmware and File System images.

Page 21: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Firmware update Over AT commands (FOAT)

Page 21 of 44

Type Syntax Response Example

Set AT+UFWUPD=<filetype>[,<speed>] +UFWUPD: ONGOING

(sent at new baud rate, if specified)

AT+UFWUPD=0

+UFWUPD: ONGOING

Test AT+UFWUPD=? +UFWUPD: (list of supported <filetype>s),(list of supported <speed>s)

OK

+UFWUPD: (0-2),(57600,115200,230400,460800,921600)

OK

IRC +UFWUPD: ONGOING

Table 5: AT+UFWUPD command syntax

4.2.1 Defined values

Parameter Type Description

<filetype> Number Download type

0: firmware image update

1: file system image update

2: firmware and file system image update

<speed> Number Baud rate in b/s

115200 (default value)

230400

460800

921600

3000000

3250000

6000000

6500000

Table 6: AT+UFWUPD parameter description

<filetype>=1 is not supported by SARA-G300 / SARA-G310 modules.

<filetype>=2 is supported only by LISA-U2 “00”, “01” and SARA-U201 product versions.

<speed>=3000000, 3250000, 6000000, 6500000 are not supported by LEON-G1 / SARA-G3 / LISA-U2 / SARA-U2 series modules.

Page 22: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Firmware update Over AT commands (FOAT)

Page 22 of 44

4.2.2 Error result codes

These icons indicate the products to which the error result codes apply:

: LEON-G1 series

: LISA-U2 series

: SARA-G3 series

: SARA-U2 series

: TOBY-R2 series

: LARA-R2 series

Response Product Description

ERROR1

The operation has been interrupted before starting to write in

flash. The current FW is unchanged and the module exits Firmware Update Mode and starts the current FW.

ERROR2

The operation has been interrupted during FW updating (after starting to write in flash). The current firmware is corrupted and the module remains in Firmware Update Mode.

ERROR3

The signature check fails.

ERROR4

The module has received an unexpected EOT because not all

the expected bytes have been received.

ERROR5

The boot does not support the selected baud rate.

ERROR6

Invalid AT command sent during boot.

FLS header decoding failed

An error occurs during decoding of file header.

Buffer Data Overrun

Data is sent too slowly.

Timeout

No data is coming. The +UFWUPD command must be re-sent (if the image has not been corrupted by previous update

procedures, otherwise update autonomously restarts).

Table 7: AT+UFWUPD error codes

ERROR2 is not sent in LISA-U2 / SARA-U2 when an EOT has interrupted the firmware update process.

LARA-R2 TOBY-R2 SARA-U2

SARA-G3 LISA-U2 LEON-G1

SARA-G3 LEON-G1

LARA-R2 TOBY-R2 SARA-U2

SARA-G3 LISA-U2 LEON-G1

LEON-G1

LEON-G1

SARA-G3 LEON-G1

LEON-G1

LARA-R2 TOBY-R2 SARA-U2

SARA-G3 LISA-U2 LEON-G1

LARA-R2 TOBY-R2 SARA-U2

SARA-G3 LISA-U2 LEON-G1

LARA-R2

TOBY-R2

SARA-U2

SARA-G3

LISA-U2

LEON-G1

Page 23: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Firmware update Over AT commands (FOAT)

Page 23 of 44

4.2.3 FW update procedure on LISA-U2 series

On LISA-U2x0-x1S version it is not possible to use <filetype>=2 to simultaneously download both the firmware image and the flash file system. Follow this procedure to update the firmware version from LISA-U2x0-x1S to LISA-U2x0-x2S versions:

DTE Cellular module Description

AT+UFWUPD=0 +UFWUPD: ONGOING Firmware image update

AT+UFWUPD=1 +UFWUPD: ONGOING Flash File System image update

After the firmware image update, the module boots and it will be available to the user after

the time needed for the file system formatting (maximum 2 minutes).

Follow this procedure to revert the firmware version from LISA-U2x0-x2S to LISA-U2x0-x1S:

DTE Cellular module Description

AT+UFWUPD=2 +UFWUPD: ONGOING Firmware and Flash File System image update

Page 24: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Firmware install (+UFWINSTALL)

Page 24 of 44

5 Firmware install (+UFWINSTALL)

5.1 Introduction

See Table 1 for the list of modules and interfaces supporting the firmware install feature.

The firmware installation procedure triggers the firmware update installation via AT command, starting from an update file stored in module file system.

The +UFWINSTALL command handles the firmware installation procedure. This command could be used as the final part of implementation of a FW update procedure after having stored the FW update package in the module file system.

The update file must be stored in the module file system before starting the firmware update installation procedure. Otherwise an error result code is issued. The procedure to store the update file in the module file system is up to the user via OTA/FTP, or using the +UDWNFILE AT command.

The firmware update can be triggered using the following interfaces:

UART with configurable baud rate (only one port is available)

USB with configurable USB instance

The “OK” final result code notifies that the module correctly received the FW update request and the update process will start immediately thereafter.

During the update process, the module cannot be used to make calls, even emergency calls. The update process is fault tolerant, even if the battery is suddenly removed.

At the end of a successful installation, the module boots up, NVM and profiles data are set to the factory-programmed values of the new firmware version, and the SIM is reset (the PIN will be required if enabled). See the u-blox AT commands manual [1] for the factory-programmed values.

Do not remove the power supply or reset the module during the installation procedure even if it is fault tolerant! The module will reboot automatically after the end of update procedure.

5.2 LISA-U2 / SARA-U2 / LARA-R2 / TOBY-R2 AT command syntax

Type Syntax Response Example

Set AT+UFWINSTALL=<filename>[,<Serial_Port_Number>[,<BaudRate>]]

OK AT+UFWINSTALL="update.upd",1,115200

OK

Test AT+UFWINSTALL=? +UFWINSTALL: "filename",(list of

supported <Serial_Port_Number>s),(list of supported <BaudRate>s)

OK

+UFWINSTALL: "filename",(0,1,4-

6),(19200,38400,57600,115200,230400,460800,921600)

OK

URC +UUFWINSTALL: <progress install>

Page 25: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Firmware install (+UFWINSTALL)

Page 25 of 44

5.2.1 Defined values

Parameter Type Description

<filename> String Update file previously downloaded in module file system. The update file can have different extension.

<Serial_Port_Number> Number Serial interface where the progress percentage and information text responses will

be sent:

0: no info will be shown

1: UART interface

4: USB1

5: USB2

6: USB3

If omitted, the command will take as default value for <Serial_Port_Number> the port where the command is issued.

<BaudRate> Number Available baud rates in b/s:

19200

38400

57600

115200

230400

460800

921600

3000000

3250000

6000000

6500000

When a USB interface is selected, the parameter has no effect in the FW install configuration.

If omitted, the command will take as default value for the parameter the baud rate of the port where the command is issued.

<progress_install> Integer Provides the installation progress from 0 to 100 and update result (see section B).

<speed>=3000000, 3250000, 6000000, 6500000 are not supported by LISA-U2 / SARA-U2 series modules.

Store the update file into the module file system before starting the install with +UFWINSTALL. Otherwise the "FFS file not found" error result code is issued. The procedure for FS storing is up to the user (via +UFTPC, or +UDWNFILE). When the new FW has been installed, the user can optionally delete the “filename” using the file system AT commands (for more details, see the u-blox AT command manual [1] +UDELFILE).

During the update operations, the +UUFWINSTALL URC displays the progress indication and the result operation on the interface chosen via the +UFWINSTALL command. When the FW update is completed, a URC will notify the final result of the operation. The last URC with a value greater than 100 indicates the update operation result (e.g. 128 means operation completed with success). For more details, see section B.

The progression of the installation is incremental, but the URC step can be different from 1.

Example with +UDWNFILE:

Command Response

AT+UDWNFILE="Update_FW_90_to_91.upd",867263 OK

AT+UFWINSTALL="Update_FW_90_to_91.upd",1,115200 OK

+UUFWINSTALL: 1

+UUFWINSTALL: 2

+UUFWINSTALL: 3

+UUFWINSTALL: 4

Page 26: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Firmware install (+UFWINSTALL)

Page 26 of 44

Command Response

+UUFWINSTALL: 99

+UUFWINSTALL: 100

+UUFWINSTALL: 128

AT+UDELFILE="Update_FW_90_to_91.upd" OK

Example with +UFTPC:

Prerequisite: an FTP connection is already established (see the AT commands examples application note [2] for more details.

Command Response

AT+UFTPC=4,"Update_FW_90_to_91.upd","Update_FW_90_to_91.upd" OK

AT+UFWINSTALL="Update_FW_90_to_91.upd",1,115200 OK

+UUFWINSTALL: 1

+UUFWINSTALL: 2

+UUFWINSTALL: 3

+UUFWINSTALL: 4

+UUFWINSTALL: 99

+UUFWINSTALL: 100

+UUFWINSTALL: 128

AT+UDELFILE="Update_FW_90_to_91.upd" OK

5.3 TOBY-L2 / MPCI-L2 AT command syntax

Type Syntax Response Example

Set AT+UFWINSTALL=<md5> OK

UFWINSTALL REBOOT

AT+UFWINSTALL=a07a553420

1b2e42dd2d964920e57319

OK

UFWINSTALL REBOOT

Test AT+UFWINSTALL=? OK

5.3.1 Defined values

Parameter Type Description

<md5> Number 32 hexadecimal number

After the command is issued, the module reboots and starts the installation process, which will take about 1 minute. No result codes are issued on the terminal during this phase. At the end of the update process, the module reboots again with the new firmware installed, NVM parameters and the file system restored to the factory-programmed values.

If the <md5> parameter is correctly provided (32 hex digits), then a check is done with the update file stored in the module.

If the <md5> parameter is provided incorrectly (less digits, more digits, or at least one non-hex digit), then the install process will not be started, the module will exit from Firmware Install Mode, and the current firmware will

Page 27: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Firmware install (+UFWINSTALL)

Page 27 of 44

continue to run. An appropriate error result code will be issued on the same interface where the command has been sent.

In case of power loss during the installation phase, at the next module wake-up a fault is detected and the module remains in Firmware Install Mode until the end of the procedure (installation terminated).

Store the update file into the module cache folder before starting the install with +UFWINSTALL. Otherwise the "update file not found" error result code is issued. The procedure for storing is up to the user by means of +UFTPC AT command. The +UFTPC command for FOTA erases the cache content before storing new update file.

Example with +UFTPC:

Prerequisite: an FTP connection is already established (see the AT commands examples application note [2] for more details.

Command Response

AT+UFTPC=100,"Update.zip" OK

+UUFTPCR: 100,1,a07a5534201b2e42dd2d964920e57319

AT+UFWINSTALL=a07a5534201b2e42dd2d964920e57319 OK

UFWINSTALL REBOOT

5.4 TOBY-L4 AT command syntax

Type Syntax Response Example

Set AT+UFWINSTALL OK AT+UFWINSTALL

OK

+UUFWINSTALL: REBOOT

AT: READY

+UUFWINSTALL: 128

Test AT+UFWINSTALL=? OK

URC +UUFWINSTALL: <status_install>

5.4.1 Defined values

Parameter Type Description

<status_install> Number/String Provides the installation start message ("REBOOT" string) and the update result code (see the section B)

Store the update file into the module before starting the FW installation with the +UFWINSTALL AT command. The procedure for storing is up to the user by means of the +UDWNFILE AT command.

TOBY-L4 modules have a dedicated communications port (referenced as "EXT") for dealing with user-provided files. The +UDWNFILE and +UDELFILE AT commands support the "FOTA_EXT" tag to distinguish the update package sent to this dedicated port. Send in binary mode the files to this port (i.e. not using Xmodem or other similar protocols). To achieve this, properly configure the flags or settings of the serial communication tools (e.g. Teraterm for Windows) in order to send files using only "raw binary" mode (see Figure 1, for example):

Page 28: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Firmware install (+UFWINSTALL)

Page 28 of 44

Figure 1: Teraterm send file dialog example

In a Linux environment, after issuing the AT+UDWNFILE command, it is possible to send binary files to a serial device using these commands, assuming that "/dev/ttyACM3" is the EXT serial port and

"ota−update.zip" is the update package file:

stty –F /dev/ttyACM3 raw -echo (to set the port in raw non echo mode)

cat ota-update.zip > /dev/ttyACM3 (to download the firmware to the module)

Remove a possible update file, due to a previously failed firmware install procedure, using the +UDELFILE AT command, before sending a new update file. Since the +UDWNFILE AT command supports also sending an update file in blocks, it is highly recommended to do this. If there are no update files stored, the +UDELFILE returns an error result code. After a correct completion of a firmware update procedure, the update file is automatically deleted.

After the command is issued, the module reboots and starts the FW installation process which will take up to 3-4 minutes long. During the update process, the module reboots multiple times. No intermediate result codes are issued on the terminal during this phase. The update package file is stored in a dedicated area of the module flash, so the update process can also be delayed and triggered after a reboot.

The +UFWINSTALL AT command checks only for the presence of the update file. Consistency checks are done during the update procedure. If the checks fail, the update file is left in the module file system and a proper URC with the error result code is issued after the final reboot (see section B). In case of a power loss during the installation phase, at the next module boot a fault is detected and the module remains in Firmware Install Mode until the end of the procedure (installation terminated).

At the end of the FW update process, the module reboots again with the new firmware installed; NVM, profiles and the file system are restored to the factory-programmed values. The final +UUFWINSTALL URC shows the firmware update result code (error or success).

Example with +UDWNFILE: update file is 43,442,631 bytes and split in chunks of 20,000,000 bytes

Command Response (AT interface) Response (EXT port)

AT+UDELFILE="","FOTA_EXT" OK

AT+UDWNFILE="",20000000,"FOTA_EXT" >

<send first chunk of 20000000 bytes to EXT PORT> OK

AT+UDWNFILE="",20000000,"FOTA_EXT" >

<send second chunk of 20000000 bytes to EXT PORT> OK

AT+UDWNFILE="",3442631,"FOTA_EXT" >

Page 29: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Firmware install (+UFWINSTALL)

Page 29 of 44

Command Response (AT interface) Response (EXT port)

<send last chunk of 3442631 bytes to EXT PORT> OK

AT+UFWINSTALL OK

+UUFWINSTALL: REBOOT

AT: READY

+UUFWINSTALL: 128

5.5 Firmware Install specifications

5.5.1 Generation of the “update file”

The “Update file” contains the binary differences between the source and target firmware region which is updatable, e.g. all the constant sources.

The update file contains the binary data to allow the user to update the FW module.

u-blox delivers the “update file” for customers.

On the TOBY-L4 series, the update file always contains a complete update to the target version.

5.5.2 Recovery mechanism

In case of a firmware update failure (for instance possibly due to power loss or cable detach), the FW installation procedure starts again. In the event of a FW install failure but where the update process has still not written anything in the flash memory, the update procedure stops and runs the old firmware.

5.5.3 Installation performance

The installation time depends on the update file size and the section changed in the SW memory map between two SW versions.

The time to update the firmware can vary and in the worst case is less than 10 minutes.

5.5.4 Limitations

Update procedure cannot update the module file system. All the user settings (NVM, profiles) are restored to the factory-programmed values. Calibration data are retained.

The file system is restored to the factory-programmed value (see Table 3).

Page 30: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Appendix

Page 30 of 44

Appendix

A List of acronyms Abbreviation / Term Explanation / Definition

API Application Programming Interface

AT AT Command Interpreter Software Subsystem, or attention

CRC Cyclic Redundancy Check

DOF Download One File

DTE Data Terminal Equipment

EOT End of Transmission

FFS Flash File System

FOAT Firmware Over AT commands

FOTA Firmware Over The Air

FTP File Transfer Protocol

FW Firmware

IMEI International Mobile Equipment Identity

IP Internet Protocol

IRC Intermediate Result Code

NVM Non Volatile Memory

ODIS OMA-DM IMEI Sync

OMA-DM Open Mobile Alliance – Download Management

PC Personal Computer

PDP Packet Data Protocol

PIN Personal Identification Number

RAM Random Access Memory

RTS Request To Send

SIM Subscriber Identification Module

SMS Short Message Service

SW Software

UA Update Agent

UART Universal Asynchronous Receiver-Transmitter

UPI Update Installer

URC Unsolicited Result Code

URL Uniform Resource Locator

USB Universal Serial Bus

Page 31: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Appendix

Page 31 of 44

B Firmware Install error result codes

B.1 LISA-U2 / SARA-U2 / LARA-R2 / TOBY-R2 / TOBY-L4 error result codes The +UFWINSTALL command returns an error result code when there is a syntax error or a problem during the installation procedure.

Error result codes generated due to a syntax error:

Verbose description Numeric code Description

+CME ERROR: not supported 4 One of the following cases has occurred:

wrong serial port number

wrong baud rate

number of parameters not allowed

file name too long

+CME ERROR: FFS file not found 1624 The update file is not stored in the FS or the file name is wrong

B.2 LISA-U2 final results codes Error result codes during the install procedure resulting from the +UFWINSTALL command during the installation procedure:

Numeric code Description

128 General Success Code

129 General Failure Code

130 Error in a run parameter

131 Expected length error

132 Structural error

133 Signature error

134 Given RAM is not enough

135 Does not behave as RAM

136 Memory allocation failure

137 Flash writing failure

138 Flash erasing failure

139 Flash reading failure

140 One API function is not declared

141 Backup buffer(s) not sector aligned

142 Start address is not sector aligned

143 File does not exist

144 RO or no access rights

145 File does not exist

146 No access rights

147 Cannot resize file

148 Cannot read specified size

149 Cannot close file handle

150 Failed creating symbolic link

151 Failed creating directory

152 Bad operation number for update

153 Unsupported compression

Page 32: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Appendix

Page 32 of 44

Numeric code Description

154 Can not apply reverse update for update not generated as reverse update

155 Number of backup buffers given to UPI does not match number in update file

156 Sector size mismatch between UPI and update file

157 UPI was not compiled to support reverse update

158 UPI was not compiled to support IFS on compressed images

159 UPI was not compiled to support IFS

160 Source mismatch in scout only operation

161 There is not enough RAM to run with operation=2 (Dry update)

162 Update file too long - corrupted

163 Mismatch between deletes sig and update deletes buffers signature

164 Number of fragments in section is not 1

165 Over all number of backup sects too big

166 Update file is corrupt: signature mismatch between update header signature and calculated signature

167 File signature does not match signature

168 Signature for the target buffer does not match the one stored in the update file

169 Too many dirty buffers

170 UPI version mismatch between UPI and update file

171 Scout version mismatch between UPI and update file

172 Partition name is different in update and in UPI data

173 There is not enough flash to update or install the files

174 There is not enough backup space on device

175 UPI does not support RW file system update

176 UPI does not support image update

177 Deployment Package header is invalid

178 Deployment Package signature is invalid

179 Deployment Package version is not supported

180 Requested ordinal does not exist in Deployment Package

181 Requested component was not found in Deployment Package

B.3 LARA-R2 / TOBY-R2 / SARA-U2 final result codes Here below are listed the allowed final result codes that can be issued at the finalization of the install procedure by means of the +UFWINSTALL command:

128: FW update successfully performed

165: wrong delta file in use

In case a different error result code is provided, please contact u-blox Technical Support offices for support

B.4 TOBY-L2 / MPCI-L2 error result codes This table lists the allowed error result codes applicable to TOBY-L2 / MPCI-L2:

Response Description

md5 not matching, update failed

ERROR3

The MD5 calculated from the stored file is not matching the one provided in the command. The module exits Firmware Install Mode and starts the actual FW

short md5, update failed

ERROR1

The MD5 provided in the command has been detected as being too short. The install is not started. The module exits Firmware Install Mode and starts the actual FW

Page 33: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Appendix

Page 33 of 44

Response Description

long md5, update failed

ERROR1

The MD5 provided in the command has been detected as being too long. The install is not started. The module exits Firmware Install Mode and starts the actual FW

missing md5, update failed

ERROR1

The MD5 is missing from provided the AT command. The install is not started. The module exits Firmware Install Mode and starts the actual FW

md5 with no hex digits, update failed

ERROR1

The MD5 provided in the command has been detected with at least one non-hex digits. The

install is not started. The module exits Firmware Install Mode and starts the actual FW

update file not found

ERROR1

The update file is not found in the specific folder. The install is not started. The module exits

Firmware Install Mode and starts the actual FW

B.5 TOBY-L4 final result codes Here below are listed the allowed final result codes that can be issued at the finalization of the install procedure by means of the +UFWINSTALL command:

128: FW update successfully performed

132: update package invalid or corrupted

In case a different error result code is provided, please contact u-blox Technical Support offices for support

Page 34: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Appendix

Page 34 of 44

C FOTA demo application in m-center FOTA (Firmware Over The Air) is a method used for updating the software on connected electronic devices such as mobile phones and tablet computers.

The FOTA demo application is implemented in m-center. The purpose of this application is to demonstrate the use of the Firmware Installation feature (+UFWINSTALL).

FOTA can be started both via SMS and manually via the m-center dedicated menu.

For more details, see the m-center Help.

To use the FOTA demo application on m-center, a PDP context shall already be active.

Example of SMS text:

<FOTA_tag>: <ftp_address>,<username>,<password>,<path>,<update_filename>

FOTADWN:

195.34.89.147:21,u949p4,*****,/data/FOTA,Update_MSY_FW_22.92_to_22.91.ENG0100.upd

Log showing the events and the operations performed and the errors that occurred during FOTA

procedures

Progress bar indicating the FW upgrade status

FTP data received via SMS or edited locally

<tags> used by m-center to recognize “FOTA” SMS

Tel number sending the “FOTA” SMS

Buttons for manually triggering the download and update operation

Page 35: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Appendix

Page 35 of 44

C.1 FOTA: firmware downloading procedure m-center (application) u-blox cellular module User

SMS for FTP download (1)SMS notification

AT cmd: read SMS

SMS content

AT FTP cmds: login, file retrieve

FTP: login, retrieve FW file

Fw .file

URC: FW file retrieve

check presence of retrieved file

AT cmd: send download ack. SMS (2)SMS: download ack.

FTP server

(1) SMS containing FTP parameters (IP address, path, filename, username, password...) (2) SMS containing the name of retrieved file

check SMS

C.2 FOTA: firmware upgrading procedure u-blox cellular modulem-center (application) User

SMS for FW update (1)SMS notification

AT command: read SMS

SMS content

check SMS

AT cmd: start FW update

AT cmd: send upgrade ack. SMS (2)SMS: upgrade ack.

(1) SMS containing the name of the FW file (downloaded in FS), this SMS can be omitted if a “FOTAALL" SMS has been used(2) SMS containing the FW version

reset

FW update process

reboot

AT command: read FW version

FW version

AT cmd: check FW update result

FW update result

FW upgrade progress indicationdisplay FW upgrade

progress & errors

Page 36: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Appendix

Page 36 of 44

D FOAT/UFWUPD on a Linux system It is also possible to perform FOAT on a Linux based operating system.

The following solution has been tested:

minicom

sx command

D.1 Minicom 1. Open the minicom application.

Page 37: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Appendix

Page 37 of 44

2. Configure the Xmodem protocol to 1k. Open the minicom control panel: press ‘CTRL+A’ then ‘Z’. Open the menu ‘Configure minicom’ (shortcut press ‘O’).

3. Open the menu ‘File Transfer protocols’.

Page 38: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Appendix

Page 38 of 44

4. Configure the Xmodem protocol to Xmodem-1k. Add the option ‘-k’ to Xmodem program if not present.

5. Start the FOAT update via the AT command +UFWUPD.

Page 39: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Appendix

Page 39 of 44

6. When it is displayed the information: +UFWUPD: ONGOING CC Now it is possible to start the transfer of the update file: open the ‘Send files’ menu, the shortcut is ‘CTRL+A’, then ‘Z’ and ‘S’. Select the file to upload.

7. Now the update procedure shall be started.

Page 40: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Appendix

Page 40 of 44

D.2 Sx command Firstly check if “Sx” is available in the available Linux distribution, otherwise install it. It is possible to check

by typing the command “Sx” in a terminal window:

Use the screen command to manage the Linux terminal; in this case assume that ACM0 is the modem port: o Open a terminal o Type: screen /dev/ttyACM0 921600

Page 41: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Appendix

Page 41 of 44

o Now it is possible to send AT commands to the module. Issue +UFWUPD and wait for “CCC”. o Press "CTRL+A" followed by “:”. Now it is possible to issue a Linux command. o Type: “exec !! sx yourfile.zip” and in yourfile.zip specify the full path of the file. This command line will

start the Xmodem-1k. o The FOAT should have started now.

Page 42: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Appendix

Page 42 of 44

E Disabling the automatic notification of FW update

Due to AT&T ODIS requirements, some modules (see Table 8) will automatically attempt to notify the OMA-DM server when the firmware is updated.

Product OMA-DM automatic notification

LEON-G1

SARA-G3

LISA-U1

LISA-U2

SARA-U2

MPCI-L2

TOBY-L2

TOBY-R2 Yes

LARA-R202 Yes

LARA-R203 Yes

LARA-R204

LARA-R211

TOBY-L4006 Yes

Table 8: OMA-DM automatic notification on u-blox cellular modules

Page 43: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Related documents

Page 43 of 44

Related documents [1] u-blox AT Commands Manual, Docu No UBX-13002752

[2] u-blox AT Commands Examples Application Note, Docu No UBX-13001820

[3] u-blox TOBY-L4 series uCPU Build System Application Note, Docu No UBX-17001102

Revision history

Revision Date Name Status / Comments

- 12-Apr-2011 lpah Removed the applicability of the document to LUCY added LISA-U1/H1

sEasyFlashEasyFlashEasyFlashFW download over USB

1 20-Jun-2011 fali Added description to revert firmware using EasyFlash tool

2 29-Jul-2011 lpah Removed LISA-H1 series

Chapter 3.1: improved description for FW download with EasyFlash

3 09-Jan-2012 dbar, lpah Extended to include LISA-U2 series. FOAT procedure supported by LISA-U1 / LISA-U2 series (except for LISA-U1x0-00 versions)

Updated chapter 4 - FOAT procedure

4 22-Jun-2012 lpah Improve FOAT procedure description

5 02-Aug-2012 dbar New EasyFlash tool version

Added table to indicate the Firmware update procedures allowed on u-blox wireless

modulesTable 1: Firmware update procedures and interfaces used on u-blox cellular modules 1

6 15-Oct-2012 lpah Extended to include LISA-U260 / LISA-U270 productsTable 1: Firmware update procedures and interfaces used on u-blox cellular modules

7 29-Mar-2013 spun Extension to include SARA-G3 series

Last revision with docu number WLS-CS-11001 1

A 25-Sep-2013 lpah Added more details on FOAT procedure on LISA-U2 modules

R10 14-Oct-2013 mvoc Added section 5. Firmware install (+UFWINSTALL) and FWINSTALL Error Messages Appendix

R11 26-Sep-2014 mvoc Extended the document to TOBY-L2 and SARA-U2 series

R12 19-Oct-2015 mvoc Extended the document with +UFWINSTALL command on TOBY-L2 series

R13 04-Apr-2016 mvoc Extended document applicability to LISA-U201-83S and MPCI-L2

R14 04-Aug-2016 mvoc Added description of methods for FW update to chapter 2; updated EasyFlash revision; extended the document applicability to SARA-U201

R15 04-Jul-2017 mtom / mvoc "Disclosure restriction" replaces "Document status" on page 2 and document footer

Extended document applicability to TOBY-R2 / LARA-R2

How to disable the Automatic Notification after the Firmware Update

Table 1 Added TOBY-R2 / LARA-R2 and SARA-U2 UART supported for +UFWINSTALL

Table 3 updated with TOBY-R2 / LARA-R2

+UFWINSTALL Error code for TOBY-R2 / LARA-R2 added

R16 22-Sep-2017 mvoc Extended the applicability of FW install to SARA-U2 series

R17 03-Jan-2018 gtoc Extended the document applicability to TOBY-L4 series

Page 44: Firmware Update Application - U-blox

Cellular Module Firmware Update - Application Note

UBX-13001845 - R17 Contact

Page 44 of 44

Contact For complete contact information, visit us at www.u-blox.com

u-blox Offices

North, Central and South America

u-blox America, Inc.

Phone: +1 703 483 3180 E-mail: [email protected]

Regional Office West Coast:

Phone: +1 408 573 3640 E-mail: [email protected]

Technical Support:

Phone: +1 703 483 3185 E-mail: [email protected]

Headquarters

Europe, Middle East, Africa

u-blox AG

Phone: +41 44 722 74 44 E-mail: [email protected] Support: [email protected]

Asia, Australia, Pacific

u-blox Singapore Pte. Ltd.

Phone: +65 6734 3811 E-mail: [email protected] Support: [email protected]

Regional Office Australia:

Phone: +61 2 8448 2016 E-mail: [email protected] Support: [email protected]

Regional Office China (Beijing):

Phone: +86 10 68 133 545 E-mail: [email protected] Support: [email protected]

Regional Office China (Chongqing):

Phone: +86 23 6815 1588 E-mail: [email protected] Support: [email protected]

Regional Office China (Shanghai):

Phone: +86 21 6090 4832 E-mail: [email protected] Support: [email protected]

Regional Office China (Shenzhen):

Phone: +86 755 8627 1083 E-mail: [email protected] Support: [email protected]

Regional Office India:

Phone: +91 80 4050 9200 E-mail: [email protected] Support: [email protected]

Regional Office Japan (Osaka):

Phone: +81 6 6941 3660 E-mail: [email protected] Support: [email protected]

Regional Office Japan (Tokyo):

Phone: +81 3 5775 3850 E-mail: [email protected] Support: [email protected]

Regional Office Korea:

Phone: +82 2 542 0861 E-mail: [email protected] Support: [email protected]

Regional Office Taiwan:

Phone: +886 2 2657 1090 E-mail: [email protected] Support: [email protected]