Application NoteFirmware WebUpdate for AVL devices

Part Number APP-0017
Revision A October 2019

Intellectual Property© 2019 Lantronix, Inc. All rights reserved. No part of the contents of this publication may betransmitted or reproduced in any form or by any means without the written permission ofLantronix.
Lantronix is a registered trademark of Lantronix, Inc. in the United States and othercountries.
Patented: www.lantronix.com/legal/patents/; additional patents pending.
All trademarks and trade names are the property of their respective holders.

Contacts
Lantronix, Inc.
7535 Irvine Center Drive, Suite 100
Irvine, CA 92618, USA
Toll Free: 800-526-8766
Phone:
949-453-3990
Fax:
949-453-3995
Technical Support
Online: www.lantronix.com/support
Sales Offices
For a current list of our domestic and international sales offices, go to the Lantronix web siteat www.lantronix.com/about/contact

Disclaimer
All information contained herein is provided “AS IS.” Lantronix undertakes no obligation to
update the information in this publication. Lantronix does not make, and specificallydisclaims, all warranties of any kind (express, implied or otherwise) regarding title, noninfringement, fitness, quality, accuracy, completeness, usefulness, suitability or
performance of the information provided herein. Lantronix shall have no liability whatsoever
to any user for any damages, losses and causes of action (whether in contract or in tort orotherwise) in connection with the user’s access or usage of any of the information orcontent contained herein. The information and specifications contained in this document
are subject to change without notice.

Firmware WebUpdate for AVL devices

2

Revision History
DateRev.

Comments

August 2012

1.0.0

Initial version.

October 2014

1.0.1

Updated chapter 2.2 – Upgrading an AVL device with firmware
version 2.10.0_rc8 and later.

October 2019

AInitial Lantronix document. Added Lantronix document partnumber, logo, contact information, and links.

For the latest revision of this product document, please check our online documentation atwww.lantronix.com/support/documentation.

Firmware WebUpdate for AVL devices

3

Table of Contents

1
1.1
1.2
1.3

2
2.1
2.2

3
3.1
3.2

INTRODUCTION................................................................... 5FEATURES OF FIRMWARE WEBUPDATE........................................................... 5
WAYS OF COMMUNICATION ............................................................................ 5
UPDATE FILE TYPES ...................................................................................... 6

ACTIVATION ........................................................................ 7
FIRMWARE VERSIONS AVL_2.9.0 .................................................................... 7
FIRMWARE VERSION AVL_2.10.0_RC8 AND LATER ........................................... 7

UPDATE PROCEDURE........................................................ 8
STARTING UPDATE MODE ............................................................................... 8
STOPPING WEBUPDATE ................................................................................. 8Firmware WebUpdate for AVL devices4

1 INTRODUCTION
Firmware WebUpdate is an advanced method to perform a remote firmware upgrade overthe air (without the requirement of a direct serial connection). Firmware WebUpdates areautomatically performed using TCP connections (no serial line option or CSD versions areplanned). The WebUpdate itself can be initiated via any available textual user interface (i.e.
serial, TCP, CSD, SMS).

1.1 Features of Firmware WebUpdate•••••••

Full automatic firmware upgrade
No (external) server applications required
Requires read access via HTTP to the firmware update file on your Web Server
Update automatically starts after device resets / shuts down/starts up
Size restriction for the firmware (max. 1,5MB uncompressed binary)Compressed firmware data can be used, reducing traffic cost/update time
Runs completely in background - device can be used meanwhile
During the update process, the device can still be used for other Tasks (i.e. executing
alarms, sending system messages etc..)

1.2 Ways of communication
Basically any type of communication can be used to initiate a WebUpdate which is able toexecute a PFAL command. The PFAL command itself consists of:• The address of the web server (URL/domain name of the server)• The port number over which the communication runs (usually port 80)• The file name (the specific file name of the firmware to upgrade to)
Restrictions:- The address of the Web Server and the port number should not exceed 100 characters (i.e.
www.mydomain.com/firmwares,80).
- The file name of the firmware may not be renamed freely - the original file name is required.

Firmware WebUpdate for AVL devices

5

1.3 Update File Types
Two types of files can be used to update the firmware.
1.3.1

Compressed firmware

Compressed (gzip) binary firmware can be used to update the device firmware. The nameusually ends with .ZIP. Note that the name of the firmware file may not be changed, it
must be uploaded "AS IS" on your Web Server.
Advantage:➢ Less data to transfer as it is compressed (this saves usually up to 50%).
- Less costs for data transmission.
➢ Remote update procedure is faster.
Example Naming Scheme: "avl_2.9.1_rc11-fw.c12_2391-.zip"
1.3.2

Uncompressed firmware

Uncompressed binary firmware.
The file can be easily retrieved by simply uncompressing (extracting) the file from the ZIP
archive mentioned above. It is contained within the compressed firmware mentioned
above. Note that the file name of the uncompressed firmware file may not be changed,
copy and paste "AS IS" on your Web Server.
Example naming scheme: "avl2.9.1_rc11-fw.r,F824.bin"

Firmware WebUpdate for AVL devices6

2 ACTIVATION
2.1 Firmware versions avl_2.9.0
The firmware WebUpdate feature is under test within 2.9.0 release versions. In order toactivate WebUpdate functionality, a configuration setting is required.
You may choose one of 2 settings listed below.
Note: A device reset is required to activate the configuration setting.
2.1.1 Semi automatic mode (only for firmware revision 2.9.0)$PFAL,Cnf.Set,DEVICE.TCP.WEBUPDATE=1- WebUpdate will never start a GPRS connection itself.
- only an existing GPRS connection will be used for downloading update files.
2.1.2 Full automatic mode (only for firmware revision 2.9.0)$PFAL,Cnf.Set,DEVICE.TCP.WEBUPDATE=2- WebUpdate will automatically start GPRS connections whenever required.
- until the firmware update has been completed, GPRS sessions are started anytime. Thiscannot be prevented by using alarms.
- GPRS sessions are closed automatically just if firmware update succeeds (by resetting thedevice). If the download fails (i.e. server not available, DNS entry invalid, crc data errorsetc), the GPRS connection remains active (until GPRS timeout).
Disadvantages / risks:- In case of a server failure (or a non accessible file which might easely result from a mistyped
file name), the device performs download attempts forever, keeping the connection open, causing a huge amount of traffic.
- This mode is NOT recommended for regular use.
- User control is required for stopping malfunctional downloads manually.

2.2 Firmware version avl_2.10.0_rc8 and later
Since firmware version "avl_2.10.0_rc8" the WebUpdate became standard, it does notneed to be activated anymore. If the device is running with firmware 2.10.0_rc8 and you
want to upgrade the device to a higher firmware version, no DEVICE.TCP.WEBUPDATE
configuration setting is required anymore. However, the WebUpdate needs a GPRS
connectivity. Finally send the PFAL command to the device and wait until the Webupdate
completes:$PFAL,SYS.WebUpdate.Start,"www.mydomain.com/firmware_file_name.zip",80
to check the state of the firmware update, execute the command:$PFAL,SYS.WebUpdate.StateThe device reports the sate in %.

Firmware WebUpdate for AVL devices

73 UPDATE PROCEDURE
This chapter describes the steps in details how to perform a (remote) web firmware
update.

3.1 Starting Update mode
The firmware WebUpdate itself can be started regardless and completely independent of
the current GPRS status. Start up information is stored permanently which assures
resuming WebUpdates automatically anytime - even after device reset and device
shutdown / power off.
A started WebUpdate is activated immediately as soon as a GPRS connection is established.
Command syntax: $PFAL,SYS.WebUpdate.Start,"<file_url>"{,<port>}<file_url>
Enclosed in quotation marks, it specifies the URL + file name (mayinclude subdirectories separated with /)i.e. www.mywebsite.com/avl_2.9.0_rc11-fw.c12_2391-.zip{<port>}Optional port number (default port is 80). Communication port for
HTTP protocol (usually 80)

Example:$PFAL,SYS.WebUpdate.Start,"www.lantronix.com/download/firmware/avl_2.9.0_rc11fw.c12_0C26-.zip",80
Notes:- It is not recommended to use another remote update when running a WebUpdate.

3.2 Stopping WebUpdate
Using this command, an ongoing WebUpdate can be stopped anytime. Note that alreadydownloaded data will be erased and is not available for other WebUpdates.
Command: $PFAL,SYS.WebUpdate.Stop

Firmware WebUpdate for AVL devices

8