Telit Cinterion IoT Developer Community
Python script to load files into module's FFS over AT command interface
Tutorial, March 12, 2014 - 3:02pm, 9906 views
On EHSx module's family AT^SJDL command can be used to download files into the module's FFS via RS232 or USB interfaces. The advantage of this solution is that it is in general OS independent. Check attached module_downloader.py file. This example shows how to download files to the module over AT command interface with Python script.
module_downloader.py works on Windows (tested with Windows 7 64bit) and Linux (Ubuntu 12.04). It opens com interface, reads module's SW version, invokes AT^SJDL to download the file and calculates CRC code to verify if transfered file is complete.
Prerequisites:
- installed Python 2.7.x (tested with Python 2.7.5 on Windows and Python 2.7.3 on Ubuntu)
- installed pySerial library (tested with 2.7 on Windows and 2.5 on Ubuntu)
- rights to access serial devices
Usage examples:
- print help: module_downloader.py -h for help
- download on Windows: module_downloader.py -p COM1 -b 115200 LocalFile.txt RemoteFile.txt
- download on Linux: module_downloader.py -p /dev/ttyACM0 -b 115200 LocalFile.txt RemoteFile.txt
Notes:
- on Linux remember to set chmod +x before running the script
Download File module_downloader.zip
(zip | 1.91 KB)
Somewhere over the rainbow!!! Looking for the Oz Land!!!
There's a slight bug in this excellent code: if the CRC happens to have a leading 0, the CRC comparison fails. I've updated the matching code to account for this.
I've also added some code to support a default remote filename.
Very Great, works only under Python 2.7 ... but very fine...Danke
Hi,
I am not able to download the attach zip file. Access denied.
Could you please send me the file eugene.han@airbus.com
Thanks
It should work now. Please try.