Thales IoT Developer Community
Python script to load files into module's FFS over AT command interface
Tutorial, March 12, 2014 - 3:02pm, 7681 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.
- 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
- 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
- on Linux remember to set chmod +x before running the script