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
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
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.
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.
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.
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):
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
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.
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:
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
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
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.
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.
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
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:
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.
<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
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
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):
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
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).
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:
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
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
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.
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
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’).
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.
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
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.
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
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