Thales IoT Developer Community
PH8,PHS8, PVS8, PXS8 FW upgrade with Linux . glinswup
Tutorial, August 25, 2014 - 1:04pm, 16240 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_***.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
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
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
compile the source code, use sudo if your user has not the rigth permitions
a new file with the compiled sources will be created . "glinswup_PH8"
Run the program with the flag -h to obtain the manual of the program
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)
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:
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
FW update finished: