4118344_Image Switching M2M Developers Guide_r2
4118344_Image Switching M2M Developers Guide_r2
4118344
Rev 2
Image Switching M2M Developer’s Guide
Important Due to the nature of wireless communications, transmission and reception of data can
never be guaranteed. Data may be delayed, corrupted (i.e., have errors) or be totally
Notice lost. Although significant delays or losses of data are rare when wireless devices such
as the Sierra Wireless modem are used in a normal manner with a well-constructed
network, the Sierra Wireless modem should not be used in situations where failure to
transmit or receive data could result in damage of any kind to the user or any other
party, including but not limited to personal injury, death, or loss of property. Sierra
Wireless accepts no responsibility for damages of any kind resulting from delays or
errors in data transmitted or received using the Sierra Wireless modem, or for failure
of the Sierra Wireless modem to transmit or receive such data.
Safety and Do not operate the Sierra Wireless modem in areas where blasting is in progress,
where explosive atmospheres may be present, near medical equipment, near life
Hazards
support equipment, or any equipment which may be susceptible to any form of radio
interference. In such areas, the Sierra Wireless modem MUST BE POWERED OFF.
The Sierra Wireless modem can transmit signals that could interfere with this
equipment.
Do not operate the Sierra Wireless modem in any aircraft, whether the aircraft is on
the ground or in flight. In aircraft, the Sierra Wireless modem MUST BE POWERED
OFF. When operating, the Sierra Wireless modem can transmit signals that could
interfere with various onboard systems.
Note: Some airlines may permit the use of cellular phones while the aircraft is on the ground
and the door is open. Sierra Wireless modems may be used at this time.
The driver or operator of any vehicle should not operate the Sierra Wireless modem
while in control of a vehicle. Doing so will detract from the driver or operator's control
and operation of that vehicle. In some states and provinces, operating such
communications devices while in control of a vehicle is an offence.
Limitation of The information in this manual is subject to change without notice and does not
represent a commitment on the part of Sierra Wireless. SIERRA WIRELESS AND ITS
Liability
AFFILIATES SPECIFICALLY DISCLAIM LIABILITY FOR ANY AND ALL DIRECT,
INDIRECT, SPECIAL, GENERAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR
EXEMPLARY DAMAGES INCLUDING, BUT NOT LIMITED TO, LOSS OF PROFITS
OR REVENUE OR ANTICIPATED PROFITS OR REVENUE ARISING OUT OF THE
USE OR INABILITY TO USE ANY SIERRA WIRELESS PRODUCT, EVEN IF
SIERRA WIRELESS AND/OR ITS AFFILIATES HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES OR THEY ARE FORESEEABLE OR FOR
CLAIMS BY ANY THIRD PARTY.
Notwithstanding the foregoing, in no event shall Sierra Wireless and/or its affiliates
aggregate liability arising under or in connection with the Sierra Wireless product,
regardless of the number of events, occurrences, or claims giving rise to liability, be in
excess of the price paid by the purchaser for the Sierra Wireless product.
Patents This product may contain technology developed by or for Sierra Wireless Inc. This
product includes technology licensed from QUALCOMM®. This product is
manufactured or sold by Sierra Wireless Inc. or its affiliates under one or more
patents licensed from InterDigital Group and MMP Portfolio Licensing.
Trademarks Sierra Wireless®, AirPrime®, AirLink®, AirVantage® and the Sierra Wireless logo are
registered trademarks of Sierra Wireless, Inc.
Windows® and Windows Vista® are registered trademarks of Microsoft Corporation.
QUALCOMM® is a registered trademark of QUALCOMM Incorporated. Used under
license.
Other trademarks are the property of their respective owners.
Contact
Information
Sales information and technical Web: sierrawireless.com/company/contact-us/
support, including warranty and returns Global toll-free number: 1-877-687-7795
6:00 am to 6:00 pm PST
Revision
History
AT Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
!IMAGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
!IMPREF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Module remains in low power (offline) mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Module starts in boot and hold mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
New firmware file not stored after download . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Preferences are not persistent over image switches . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
MC73XX MC7304/MC7305/MC7330/MC7354/MC7354B/MC7355
MC74XX MC7430/MC7455
EM73XX EM7330/EM7355
EM74XX EM7430/EM7455
WP75XX WP7502/WP7504
WP8458 WP8548
Images consist of pairs of files that are used to configure the module for use with
specific carriers. The module is capable of storing a number of these files on the
device. The files that make a pair are:
• Firmware—These files are stored in a compressed format on the module.
File type: .cwe
• Carrier configuration (‘PRI’—Product Release Information)—Each of these files
contains custom settings for a specific carrier, and is linked internally to a specific
firmware file.
File type: .nvu
When necessary, updated firmware and/or carrier PRI files are released by Sierra
Wireless to be loaded on the module.
Note: Occasionally, OEM PRI updates will be provided to update a module’s settings. These
files also use the “.nvu” extension but are not to be confused with carrier PRIs.
Image Storage—Host-side
The host device can store additional image files (firmware and carrier PRI files) for
download to the modem when needed. The number of files that can be stored on the
host is limited only by the drive space (hard drive, flash drive) available.
Each carrier’s firmware images (including a default OEM image) should be stored in
subdirectories of a user-defined storage directory. A typical location for the storage
directory is: /home/<username>/SDK
./0 Vodafone
./1 Verizon
./2 AT&T
./3 Sprint
./4 T-Mobile
./6 Generic
./7 Telefonica
./9 Orange
./10 Telstra
./12 Bell
./13 Telus
./14 Rogers
./15 Docomo
./16 Swisscom
./17 Aeris
./OEM Temporary storage for one-time file used to update OEM settings.
a. Table subject to change as additional carriers are added.
Image Storage—Module-side
Sierra Wireless modules can store multiple image files (firmware and carrier PRI files)
to support image switching:
• Firmware files are stored in firmware ‘slots’ in a compressed format. The currently
running firmware is an uncompressed copy of one of the stored files.
• Carrier PRI files are stored as regular files in the module’s file system.
(Note: Although some AT commands may mention PRI slots in their responses,
slots are not actually used.)
The active image running on a module at any time is a combination of:
• a stored carrier PRI file
• an uncompressed copy of a firmware file identified by the carrier PRI.
The number of files of each type that can be stored is module-dependent, as
summarized in Table 1-5.
Note: To confirm the number of files that can be stored on your specific device, use the
AT!IMAGE command (see !IMAGE on page 18), which lists the “Max FW images” and “Max
PRI Images”.)
EM73XX 1 50
EM74XX 4 50
MC73XX 1 50
MC74XX 4 50
WP75XX 2 50
WP8548 2 50
Warning: Image switching is intended for occasional use. Because firmware files are stored
in compressed format on the module, frequent image switching (involving different firmware
files) will stress the device’s flash memory.
(Host calls:
SLQSSwiGetAllCarrierImages)
Modem-side (firmware-related)
Download required? Yes
Does
preferred image = No Load preferred image Loaded successfully? No
current image?
Finish booting
555.555_555 Orange
Host downloads an image to the module for existing carrier New LRU slot: (1) 11.11.11.11
(AT&T).
- PRI replaces existing file in module’s file system
- firmware stored in least recently used slot (3).
- PRI for carrier Sprint is now orphaned (the firmware
Active Firmware (decompressed):55.55.55.55
that it used in slot 3 has been image Carrier PRI: 555.555_555 (Orange)
replaced)
Note: If a firmware file is used by more than one carrier PRI, only one instance of the file needs
to be on the module—the PRI files link to the same firmware file. If the host downloads a
duplicate firmware file to a specific slot on the device, the module will mark the slot as orphaned
and the firmware will be removed during Automatic Slot Assignment By Module on page 11.
Note: If rarely-used files are removed from the module causing PRIs to be orphaned, and then
have to be reloaded, the host has to get them again before they can be downloaded. (See
Figure 1-2 on page 12 for an explanation of orphaned files.)
Linux QMI SDK commands and AT commands can be used for on-module image
management.
Note: For current command availability and details, refer to the API Reference Guide included
with the SDK and the AT Reference Guide for your module (available at
source.sierrawireless.com). Specific commands and/or command details may vary depending
on firmware and SDK version.
DeleteStoredImage
Purpose: Delete a firmware file from the module by specifying its unique ID and
build ID.
Signature: ULONG DeleteStoredImage(
ULONG imageInfoSize,
BYTE *pImageInfo );
GetImagesPreference
Purpose: List the pair of files (firmware and Carrier PRI) that comprise the ‘preferred
image’, which will be used on the next module reboot, if available.
Signature: ULONG GetImagesPreference(
ULONG *pImageListSize,
struct PrefImageList *pImageList );
GetStoredImages
Purpose: List the firmware files and carrier PRI files that are stored on the module,
showing their file types, unique IDs, and build IDs.
Signature: ULONG GetStoredImages(
ULONG *pImageListSize,
BYTE *pImageList );
SLQSDownloadFirmwareToSlot
Purpose: Download a firmware file from the host device to a specific slot on the
module. Note that if any carrier PRI files were linked to the firmware originally in the
slot, then the original firmware will have to be downloaded again if any of those PRI
files are activated later.
Signature: ULONG SLQSDownloadFirmwareToSlot(
CHAR *pPath,
BYTE slot_index,
BYTE force_download );
SLQSGetFirmwareInfo
Purpose: List the components (firmware file and carrier PRI) of the active image.
(Note: This command is used if not in Gobi Image Management Mode; otherwise, use
SLQSSwiGetFirmwareCurr on page 17.)
Signature: SLQSGetFirmwareCurr(
CurrentImgList *pCurrentImgList );
SLQSSwiGetAllCarrierImages
Purpose: List all available firmware and carrier PRI files that are stored on the module
or host.
Note: On the host device, carrier PRI files should be stored with their matching firmware files in
uniquely named sub-folders.(See Image Storage—Host-side on page 8 for details.)
SLQSSwiGetFirmwareCurr
Purpose: List the components (firmware file and carrier PRI) of the active image.
(Note: This command is used if in Gobi Image Management Mode; otherwise, use
SLQSGetFirmwareInfo on page 17.)
Signature: SLQSSwiGetFirmwareCurr(
CurrentImgList *pCurrentImgList );
UpgradeFirmware2k
Purpose: Indicate the image that is to be used (the ‘preferred image’), reboot the
module, download the preferred image files (firmware and/or carrier PRI) if needed,
and complete the image switch by making the preferred image active.
Signature: ULONG UpgradeFirmware2k(
CHAR *path );
SLQSSetSIMBasedImageSwitching
Purpose: Enable SIM-based image switching.
Signature: ULONG SLQSSetSIMBasedImageSwitching(void);
AT Commands
Several AT commands providing image switching functionality are supported by the
module:
• !IMAGE on page 18
• !IMPREF on page 19
For recommended uses (and comparable Linux APIs), see Table 1-6 on page 13.
!IMAGE
Purpose: List the images that are currently stored on the module, or delete PRI and/
or firmware files from the module.
Syntax (parameters listed at end):
Query: AT!IMAGE?[<op>[,<type>]]
Purpose: List all image files, all firmware or PRI files, or the maximum number of
firmware slots.
Response (Example shown is for AT!IMAGE? with no parameters):
at!image?
TYPE SLOT STATUS LRU FAILURES UNIQUE_ID BUILD_ID
FW 1 GOOD 25 00 ?_? 01.08.02.00_?
FW 2 GOOD 22 01 ?_ 01.09.00.00_?
FW 3 GOOD 24 00 ?_? 00.00.00.00_?
FW 4 GOOD 23 00 ?_? 01.09.03.00_?
Max FW images: 4
Active FW image is at slot 1
OK
Assignment: AT!IMAGE?[<op>[,<type>[,<slot>[,<build_id>,<unique_id>]]]
Purpose: Delete PRI and/or firmware files from the module.
Response:
OK
Examples:
AT!IMAGE=0 Deletes all stored image files (firmware and PRIs)
AT!IMAGE=0,0 Delete all stored firmware files
AT!IMAGE=0,0,2 Delete the firmware in slot 2
AT!IMAGE=0,1,, “01.00.01.00_SWISSCOM”,”000.001_000”
Delete a specific PRI using it’s build ID and unique ID.
Parameters:
<op> (Operation):
· 0—Delete (Only for Assignment format)
· 1—List files (Only for Query format)
· 2—Display number of firmware slots supported
<type> (Image type):
· 0—FW (Firmware)
· 1—PRI (Carrier PRI)
<slot> (Firmware image slot ID. Ignore this field for PRI files.)
· 0–FF—Maximum value is SKU-dependent
<build_id> (Build ID)
· ASCII string enclosed by double quotes
<unique_id> (Unique ID)
· ASCII string enclosed by double quotes
!IMPREF
Purpose: Initiate an image switch either by choosing a preferred carrier or by enabling
SIM-based image switching, or list the preferred and current firmware versions and
carrier configurations.
Note: When setting the preferred carrier using this command, the command will fail if the
required firmware for the carrier is not already present on the device. Use the AT!IMAGE?
command to see a list of available carrier configurations and firmware.
[<mismatch information>]
OK
Assignment: AT!IMPREF=<preference>
Purpose: Choose the preferred carrier, or enable SIM-based image selection. The
module will search for a matching carrier PRI and the required firmware for that
PRI. If both are found, the new image preference is set.
Response:
OK
Parameters:
<preference> (Carrier name, or “AUTO-SIM”):
· ASCII string within double quotes
· Use “AUTO-SIM” to enable SIM-based image selection. Disable it by
selecting an actual carrier.
<mismatch information> (Type of mismatch between current and preferred image
settings):
· ASCII string
· “fw version mismatch”
· “carrier name mismatch”
· <config name mismatch”
Term Definition
active image The carrier PRI and firmware file that are currently running on the
module.
AT AT command
image switching Process where a module that is running one image (firmware plus
PRI) is restarted to run a different image.
orphaned A slot containing a file (firmware or PRI) that does not link to a
corresponding stored file (PRI or firmware).
preferred image The carrier PRI and firmware file that should be used when the
module reboots.