You are here

EHSx Linux Firmware update. glinswup

Tutorial, July 3, 2014 - 3:18pm, 6846 views

The present document describes how to compile and use the provided FW upgrade source code algorimt under Linux using a binary file *.USF.

Please, consider the same conditions described in AN16 related to USB/serial port configuration  and supported modules.

Consider also: (refered in AN16)

“General Requirements and Precautions” chapter 1.3 .

“Connecting the Module” chapter 2.1 .

The source code to be compiled in linux is provided in a .zip file called glinswup_xxx.zip. Request the source .zip file , the USF file and Jar/Jad filesto Gemalto M2M TS/AE in your region

 Please, consider the same conditions described in AN16 related to USB/serial port configuration and supported modules.

 Note for customized EHSx applications: Before starting the download restore the Cinterion standard USB Descriptors (delivery default of all AT^SCFG "Serial/USB/DDD" parameters.

1                  Prepare the Linux System

Prepare your Linux system to include the gcc compiler, or just test that it is already installed. The installation depends of your Linux distribution.

 Example for Ubuntu : 

apt install build-essential

apt install build-essential

2                  Copy and compile the sources

Copy the provided file glinswup.zip, the usf file and the .jar and .jad file to a folder in your file system

Unzip the provided zip file with the source code

In this example:

unzip ehs6_glinswup.zip

Copy and Unzip

the source code will de unziped in a new directory called "src"

Move to this new created directory "src"

cd src

Copy the usf, jad and jar provided files.

cp ../*.usf .

cp ../*.ja* .

Copy usf,jad and jar

compile the source code. Remember to use "sudo" is you are not working with the root user

Example:

sudo make

Sudo make

Now the sources are compiled and ready to use. the program to start the process in this examples is compiled like glinswup_EHS5

Before to start with the process you need to consider the following points:

1- Execute the program with the flag -h to obtain the help to use the program. 

sudo ./glinswup_EHS5

Usage: glinswup_EHS5 [OPTIONS]...

Execute firmware update on Cinterion EHS5 wireless module.

All arguments for long options have the same meaning as for short arguments.

  -a, --noautostart                    After a firmware update the autostart of the AT-MIDlet

                                                    is disabled. Per it will be enabled again. If this

                                                    parameter is set it is kept disabled.

  -b, --baudrate=value            The baudrate to be used for the update. The default

                                                   value if this parameter is omitted is 115200. If the

                                                   update is executed on the USB interface this parameter is ignored

  -f, --fwfile=value                   The firmware file to be loaded into the module. This

                                                   parameter can be omitted if a firmware update is not required

  -h, --help                                Display this help and exit.

  -j, --jrcfile=value                   The jad file of the JRC-MIDlet to be sent to the

                                                   module. This parameter can be omitted if a JRC-MIDlet

                                                   update is not required. If this parameter is given the

                                                   corresponding jar file of the JRC-MIDlet must exist in

                                                   the same directory with the same file name as the

                                                   given jad file.

  -n, --no_firmware                 Use this parameter if the firmware should be flashed

                                                   into a module without working firmware. By default it

                                                   is assumed that there is a working firmware in the module.

  -p, --port=value                    The device name of the tty port to be used for the update.

  -v, --verbose                         Enable additional trace output.

  -w, --password=value         The userware password if set.

2- Read the "Readme.txt" file. In some distribution the Linux modem manager tries to query the capabilities of new enumerated USB modem devices by automatically sending specific AT commands directly after USB enumeration. This procedure interfere with the firmware update process. To advoid the automatic modem detection mechanism the Cinterion module must be blacklisted by a specific rule at least for the firmware update process. This can be achieved by coying the provided rules file "99-mm-cinterion-swup-blacklist.rules" into the standard rules folder (usually "/etc/udev/rules.d") before the update process is started.

To activate the new rule the udev service needs to be restarted with :

sudo service udev restart

To enable the automatic modem detection for the Cinterion module again the rules file can be deleted after the update is finished.

3-Check the permitions of your user for the /dev/ttyACM's ports

ls -la /dev/ttyACM*

If the user user has not the rigth permition use:

sudo chmod 666 /dev/ttyACM*

2                  Firmware update

Run the compiled program glinswup_EHS5 with the correct paramerters for USB/Serial , usf file and/or jad file.

Remeber that you can trigger the update for the Firmware and also for Firmware plus JRC.

Example over USB using :

Port "/dev/ttyACM0"

File name "file.usf"

Verbose mode active

JRC also update, file "JRC-1.50.11.jad" .Please take in consideration that the .jar and .jad file name changes in each FW version. Please adecuate the file name according a the FW provided

1-Please, power on the module before to start the process

2- Remeber that during the "Erasing flash memory" to do not swicht off the module. Wait until the process is finished.

3- Use sudo if your user has not the rigth permitions.

4- the JRC's jar and jad file have to be located in the same folder that the compiled program

Example:

Please take in consideration that the .jar and .jad file name changes in each FW version. Please adecuate the file name according a the FW provided. in these example the files are named JRC-1.50.11.jad and JRC-1.50.11.jar

sudo ./glinswup_EHS5 -p /dev/ttyACM0 -f file.usf -v -j JRC-1.50.11.jad

Updating Firmware and JRC-MIDlet on USB port /dev/ttyACM0

Disabling userware autostart...

Urc 

^SYSSTART

 not received: 

Try baudrate 115200

AT-Cmd: AT

Response: 

OK

AT-Cmd: AT&F

Response: 

OK

AT-Cmd: ATE1V1

Response: 

OK

AT-Cmd: ATI

Response: 

Cinterion

EHS6

REVISION 02.000

OK

AT-Cmd: AT^SCFG="Userware/Autostart","","0"

Response: 

^SCFG: "Userware/Autostart","0"

OK

Initializing firmware update...

Try baudrate 115200

AT-Cmd: AT

Response: 

OK

AT-Cmd: AT&F

Response: 

OK

AT-Cmd: ATE1V1

Response: 

OK

AT-Cmd: AT^SFDL

Response: 

OK

Waiting for reenumerated USB port...

Erasing flash memory (this can take a couple of minutes without visible progress)...

Firmware transfer in progress...

M                                                                             0%

….                                                     

M#####################                                                       29%

….                        

M###################################################                         69%

….

M########################################################################## 100%

Updating flash file system (this can take a couple of minutes without visible progress)...

Urc 

^SYSLOADING

 not received: 

Update succeeded, restoring module state...

Firmware update succeeded

Erasing old data...

Try baudrate 115200

AT-Cmd: AT

Response: 

OK

AT-Cmd: AT&F

Response: 

OK

AT-Cmd: ATE1V1

Response: 

OK

AT-Cmd: ATI

Response: 

Cinterion

EHS6

REVISION 02.000

OK

AT-Cmd: ATI 51

Response: 

Bootloader filename     : XMM6260_BOOTLOADER_VERSION_1000_0006

Bootloader version name : 1000.0006_M1S1

Version                 : 0x3e80006

Version inverted        : 0xfc17fff9

OK

AT-Cmd: AT^SBNW="NV",2

Response: 

OK

Urc 

^SYSLOADING

 not received: 

Warning: Failed to wait for module restart!

Initializing JRC-MIDlet update...

Try baudrate 115200

AT-Cmd: AT

Response: 

OK

AT-Cmd: AT&F

Response: 

OK

AT-Cmd: ATE1V1

Response: 

OK

Removing existing JRC-MIDlet...

AT-Cmd: AT^SJAM=4

Response: 

^SJAM: "a:/JRC-1.50.11.jad","Java Remote Control MIDlet Suite","Cinterion","1.50.11",1,669201,0

OK

AT-Cmd: AT^SJAM=2,"a:/JRC-1.50.11.jad",""

Response: 

OK

AT-Cmd: AT^SJAM=3,"a:/JRC-1.50.11.jad",""

Response: 

OK

JRC-MIDlet transfer in progress...

AT-Cmd: AT^SJDL=1,1870,"JRC-1.50.11.jad"

Response: 

CONNECT

M                                                                             0%

M                                                                             0%

M                                                                             0%

M                                                                             0%

Response: 

JDL CRC32 0x1c71afea

OK

AT-Cmd: AT^SJDL=1,664380,"JRC-1.50.11.jar"

Response: 

CONNECT

M                                                                             0%

….

M##################################                                          46%

….

M########################################################################## 100%

Response: 

JDL CRC32 0x680c73dc

OK

Installing JRC-MIDlet...

AT-Cmd: AT^SJAM=0,"a:/JRC-1.50.11.jad",""

Response: 

OK

Starting JRC-MIDlet...

AT-Cmd: AT^SJAM=1,"a:/JRC-1.50.11.jad",""

Response: 

OK

Urc received: 

^SYSSTART

Deleting temporary MIDlet files...

AT-Cmd: AT^SJDL=2,0,"JRC-1.50.11.jad"

Response: 

OK

AT-Cmd: AT^SJDL=2,0,"JRC-1.50.11.jar"

Response: 

OK

Update succeeded, restoring module state...

JRC-MIDlet update succeeded

Reenabling userware autostart...

Try baudrate 115200

AT-Cmd: AT

Response: 

OK

AT-Cmd: AT&F

Response: 

OK

AT-Cmd: ATE1V1

Response: 

OK

AT-Cmd: AT^SCFG="Userware/Autostart","","1"

Response: 

^SCFG: "Userware/Autostart","1"

OK

Module update successfully finished

Trasto's picture
Trasto

Hi,

A similar procedure is avaialble for PH8 and Linux?
Any source code released?

Regards

Trasto

Alopez's picture
Alopez

Hi,

We are working in the glinswup article for PXX8 series.

will be ready soon

Regards

ALopez

Somewhere over the rainbow!!! Looking for the Oz Land!!!

Alopez's picture
Alopez

Hi,

you can find the tutorial to upgrade PH8, PHS8, PVS8 and PXS8 in the following link.

https://developer.gemalto.com/tutorial/ph8phs8-pvs8-pxs8-fw-upgrade-linu...

Regards

Alopez

Somewhere over the rainbow!!! Looking for the Oz Land!!!

donghyun's picture
donghyun

Hi, Alopez

Thanks for your great posting!!

Where can I get the glinswup_EHS5 source because I need this to crosscomple into our product?

Regards

Donghyun

Alopez's picture
Alopez

Hi,

you can request the glinwsup sources for Linux to your local Gemalto M2M office.

Regards

ALopez

 

Somewhere over the rainbow!!! Looking for the Oz Land!!!

Alopez

Contributors

Profile Picture
Juergen
Profile Picture
KRS