Gemalto is now part of the Thales Group, find out more.

You are here

PH8,PHS8, PVS8, PXS8 FW upgrade with Linux . glinswup

Tutorial, August 25, 2014 - 1:04pm, 7520 views

Pxx8 -> PH8, PHS8, PVS8, PXS8

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.

Please, consider the same conditions described in AN16 related to USB/serial port configuration (AT^SDPORT) and supported modules.
Note for customized Pxx8 applications: Before starting the download restore the Cinterion standard USB Descriptors (delivery default of all AT^SCFG "Serial/USB/DDD" parameters.

Please, Request the source .zip file and the USF file to Gemalto M2M TS/AE in your region

1 Prepare the Linux System

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

Example for Ubuntu : 

apt install build-essential

glinswup build essential

2 Copy and compile the sources

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

Unzip the provided zip file with the source code

Example:

unzip glinswup.zip

The source code will be unzipped in a new folder called "scr" . copy the usf file the new folder "src"

cp *.usf ./src/

go to the src folder

cd src

compile the source code, use sudo if your user has not the rigth permitions

sudo make

a new file with the compiled sources will be created . "glinswup_PH8"

glinswup list

Run the program with the flag -h to obtain the manual of the program

./glinswup_PH8 -h

Usage: glinswup_PH8 [OPTIONS]... Execute firmware update on Cinterion PH8 wireless module.

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

 -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, --file=value The firmware file to be loaded into the module.
The default value if this parameter is omitted is "./PH8.usf".
-h, --help Display this help and exit.
-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.

The default value if this parameter is omitted is "/dev/ttyACM0" when updating via the

USB and "/dev/ttyS0" when updating via the serial interface.
-s, --serial Use this parameter if the firmware update is executed via a serial tty port. By default it is assumed that the update is executed via the usb interface.

Connect and power on the Pxx8. You can filter with the Linux command dmesg to know the assigned port (USB/Serial).

Example for USB: ( in this case /dev/ttyACM0)

glinswup usb listing

3 Updating the FW

If the module is not listed, check that your module is connected and powered on and check also that the “usbserial” drived is installed; and execute the command modprobe to define the module.

As a rule the CDC ACM Modem enumeration is compatible with generic CDC ACM based USB host drivers. However, to employ generic USB host drivers, specific issues may have to be tak- en into account depending on the operating system. On a Linux system - e.g., Linux 2.6 Kernel with loadable module support and the USB host driv- ers "cdc_acm" as well as "usbserial" compiled as loadable modules the "cdc_acm" driver enumerates the CDC ACM Modem port to /dev/ttyACMx. The "usbserial" driver enumerates its ports to /dev/ttyUSBx. Depending on the AT^SDPORT settings, the above mentioned USB driver modules can be loaded to create the different ports. Please note that the command to load the modules may vary for different Linux distributions:

Example:

modprobe cdc-acm (only required if cdc-acm.ko is Kernel loadable module) or modprobe usbserial vendor=0x1E2D product=0x0053

Please, Pay attention that the related /dev/ttyACM* and/or /dev/ttyS* have the right flags to be used. The FW upgrade process will stop at the 3% and will show and error . If you are in this step then use chmod to give access to your user to these ports. (use sudo is you are not the user root)

chmod 666 /dev/ttyACM* (for USB) or chmod 666 /dev/ttyS* (for serial)

3.1 FW update over USB

The module is connected over USB and in this example we assume that the listed port is /dev/ttyACM0 , the *.USF file is “ph8-p_r03.001_a01.001.07.usf” the used command is: (use sudo if you are not the root user)

./glinswup_PH8 -f ph8-p_r03.001_a01.001.07.usf

glinswup start

FW update finished:

glinswup finish

Regards

Alopez

1 - 10 of 11 Comments

Pages

Alopez's picture
Alopez

Hi,

Link to the video tutorial:

http://youtu.be/hMDyDj7swA8

Regards

ALopez

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

donghyun's picture
donghyun

Hi,

Can I use this step for firmware upgrade EHS6?

Because file tranfer speed is too slown when I use AT^SJDL

My goal is complete wite within 2 minutes.

Regards.

Donghyun.

Alopez's picture
Alopez

HI, 

The procedure and seteps for EHSx are described in:

https://developer.gemalto.com/tutorial/ehsx-linux-firmware-update-glinswup

Regards

ALopez

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

linuxcdeveloper's picture
linuxcdeveloper

Hi ALOPEZ,

I want to implement a firmware download tool for upgrading pxs8 modem using usf files, but I don't know how to read usf files by a c program under linux, I tried to read it with fopen ("rb" mode)/fread but without success, so I can't read length and so I don't know data length.

NOTE: I followed the gemato algorithm to do that.

can you suggest me a solution?

Alopez's picture
Alopez

HI,

Youy can request the sources of the code generated by Gemalto to your local Gemalto M2M office

Regards

ALopez

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

linuxcdeveloper's picture
linuxcdeveloper

Hi ALOPEZ,

I have tried to upgrade my pxs8 modem the upgrade is completed successfully but the modem does not restart again and the usb port does not appear again, how to do?

I have lost any access to modem.

can you suggest me a solution?

Alopez's picture
Alopez

Hi,

Once the FW is updated the module the modules goes to power down. You need to trigger /IGT again to power on the module.

By the other way is your updated has not finish correctly then:

-a)Use RS232 to recover the module

-b) the module in this case will start in bootloader mode. You have at least 30 seconds to send the at^sfdl command. You can just modify the sources to cover also this case

Regards

ALopez

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

Valriea's picture
Valriea

Hi, we have DSB-Mini with pxs8. We whant to update pxs8 to the latest version by USB.  Gemalto M2M office gave us glinswup_PHx.zip

First we tried to update pxs8 from windows and it works fine by usb and serial. But by the needs of our product we need to update it by usb from Linux. By serial from Linux it works fine but by usb we always get error:

Starting firmware update...

Firmware download in progress...

## 3%

ERROR: Timeout waiting for response after block no.0

ERROR: Download failed.

We did all steps from instruction :

AT^SDPORT= 6 , ttyACM0 : USB ACM device

error pxs8 update

Alopez's picture
Alopez

Hi,

in the first 3% the bootloader maked internal checkings.

Are you trying to recover the module for a failure update?

Regards

ALopez

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

cwolff's picture
cwolff

How does this work if I need to upgrade modems in the field and I'm only using a simple RTOS (not Windows or Linux)?

1 - 10 of 11 Comments

Pages

Alopez

Contributors

Profile Picture
Juergen
Profile Picture
KRS