Wavecom GR64, GS64 Application Note

GR/GS64 APPLICATION NOTE
Embedded Application Remote Download
Reference: WI_DEV_Gx64_APN_012
Version: 001
Date: February 26, 2007
Trademarks
®, WAVECOM®, WISMO®, Open AT®, Wireless CPU®, Wireless Microprocessor® and certain other trademarks and logos appearing on this document, are filed or registered trademarks of Wavecom S.A. in France or in other countries. All other company and/or product names mentioned may be filed or registered trademarks of their respective owners.
Copyright
This manual is copyrighted by WAVECOM with all rights reserved. No part of this manual may be reproduced in any form without the prior written permission of WAVECOM.
No patent liability is assumed with respect to the use of the information contained herein.
No Warranty
WAVECOM publishes this manual without making any warranty as to the content contained herein. Further Wavecom Inc reserves the right to make modifications, additions and deletions to this manual due to typographical errors, inaccurate information, or improvements to programs and/or equipment at any time and without notice. Such changes will, nevertheless be incorporated into new editions of this manual.
Gx64 APPLICATION NOTE EA Remote Download Page: 2/22
This document is the sole and exclusive property of WAVECOM. Not to be distributed or divulged without prior written agreement. Ce document est la propriété exclusive de WAVECOM. Il ne peut être communiqué ou divulgué à des tiers sans son autorisation préalable
Table of Contents
1 Introduction.......................................................................................... 5
2 Overview............................................................................................... 6
2.1 GENERAL ............................................................................................................... 6
2.2 CONTROL PC SETUP ............................................................................................... 6
2.3 REMOTE GR64 SETUP ............................................................................................. 7
2.4 SECURITY ASPECTS................................................................................................. 7
2.4.1 SMS METHOD ................................................................................................. 7
2.4.2 CLIP METHOD................................................................................................. 8
2.4.3 IP ADDRESS METHOD...................................................................................... 8
3 Functional Description of Embedded Application .................................. 9
3.1 FLOW CHART OF REMOTE CONTROL EMBEDDED APPLICATION................................ 9
3.1.1 RC DESCRIPTION .......................................................................................... 10
3.2 IPRC EMBEDDED APPLICATION CODE.................................................................... 12
Appendix A............................................................................................... 14
SCRIPT DOWNLOAD SEQUENCE ..................................................................................... 14
XMODEM BLOCK STRUCTURE ........................................................................................ 15
SCRIPT HEADER BLOCK ................................................................................................. 15
Appendix B ............................................................................................... 16
REMOTE DOWNLOAD APPLICATION ............................................................................... 16
TCP/IP CONTROLS ...................................................................................................... 17
SERIAL CONTROLS ...................................................................................................... 17
COMMON CONTROLS.................................................................................................. 17
4 Appendix C......................................................................................... 19
Gx64 APPLICATION NOTE EA Remote Download Page: 3/22
This document is the sole and exclusive property of WAVECOM. Not to be distributed or divulged without prior written agreement. Ce document est la propriété exclusive de WAVECOM. Il ne peut être communiqué ou divulgué à des tiers sans son autorisation préalable
REMOTE DOWNLOAD APPLICATION VIA M2MPOWER IDE ................................................ 19
Gx64 APPLICATION NOTE EA Remote Download Page: 4/22
This document is the sole and exclusive property of WAVECOM. Not to be distributed or divulged without prior written agreement. Ce document est la propriété exclusive de WAVECOM. Il ne peut être communiqué ou divulgué à des tiers sans son autorisation préalable

1 Introduction

The GR64 has been designed so that scripts embedded within the device can be updated either through a serial interface on UART1 or where this is not feasible, due to location, remotely using the air interface. The script resident in the device must be written in a way that makes remote access permissible and preferably with some form of authentication of the calling party.
Gx64 APPLICATION NOTE EA Remote Download Page: 5/22
This document is the sole and exclusive property of WAVECOM. Not to be distributed or divulged without prior written agreement. Ce document est la propriété exclusive de WAVECOM. Il ne peut être communiqué ou divulgué à des tiers sans son autorisation préalable

2 Overview

2.1 General

The remote script download is dependant on the currently active script within the GR64 having the remote control (RC/IPRC) intrinsic function capability written in such a way that once a connection is made (circuit switch data call or IP connection), the remote control (RC/IPRC) intrinsic function is called and the remote script download takes place. Once the script is downloaded into GR64 memory and all checksums are verified, the GR64 is reset, and on completion of the power up routine, the new downloaded script is activated.
It is imperative that the new script downloaded using the over the air routine also has the RC/IPRC functionality written into it. If not, once this new script is activated and running, this script cannot be updated again.
The remote download process takes care of script number allocation and will use whatever script number is not being used by the activated script. This ensures that the original script is not lost and can be activated again if the new script is not functioning as expected.
Note: It is very important that the new script to be downloaded using the remote download facility has been checked thoroughly for possible bugs or run time errors. As once the script is downloaded and activated, it is not possible to gain remote access again if the script has crashed and is not running.

2.2 Control PC setup

The user has two alternative methods available to assist in the remote download of embedded application scripts. Firstly they can access the functionality via the
m
power IDE (Directions for its use can be found in Appendix C), secondly the
M2 user can use the Remote Download Application.
If using the Remote Download Application, the host PC requires Microsoft .NET framework 2.0 to run the application. This Remote Download Application provides connectivity to the remote module either through TCP/IP in the form of a host PC Winsock or CSD using a GSM modem connected to a serial port. The Download Sequence is as follows:
Gx64 APPLICATION NOTE EA Remote Download Page: 6/22
1. Select connection type, TCP/IP or CSD (serial).
2. Establish connection to remote module.
3. Select download slot.
This document is the sole and exclusive property of WAVECOM. Not to be distributed or divulged without prior written agreement. Ce document est la propriété exclusive de WAVECOM. Il ne peut être communiqué ou divulgué à des tiers sans son autorisation préalable
4. Select script file to download.
5. Initiate download.
6. Set new script to be active.
7. Set script to run from start. Normally this setting will already be in force in which case this step can be omitted.
8. Reset remote module so that new script will be run.

2.3 Remote GR64 Setup

The GR64 that is to have its script updated by using the RC/IPRC function must have a script with the RC/IPRC functionality active as part of the main loop within the script structure (example Section 3.1.1/3.1.2). The remote GR64 must also have a SIM card with a data number to allow the setup of a CSD call when using RC, or a SIM card which allows for GPRS connections to be made when using IPRC.
The RC embedded application in section 3.1.1 relies upon a data call being received before switching the RC function on. This can also be done in reverse i.e. the embedded application can be made to dial a target server and then switch on the RC function. Likewise, the IPRC embedded application in section 3.1.2 waits for an IP connection to be made, however, the IP connection could also have been initiated from the IPRC script.

2.4 Security aspects

When implementing the code, some thought should be given to ensuring that no unauthorized entity can dial into the module and perform an unauthorized download.
Some methods are described below which are easy to implement and secure in their operation.

2.4.1 SMS Method

The download operation could be triggered by an incoming SMS, the format of which is recognised by the script i.e. the text of the SMS could be
Gx64 APPLICATION NOTE EA Remote Download Page: 7/22
‘Update required: code 1234 call service centre’.
This should be sent from a known number, and could also include a number to dial for RC, or an IP address to connect to for IPRC.
This document is the sole and exclusive property of WAVECOM. Not to be distributed or divulged without prior written agreement. Ce document est la propriété exclusive de WAVECOM. Il ne peut être communiqué ou divulgué à des tiers sans son autorisation préalable
Loading...
+ 15 hidden pages