http://www.wavecom.com/forum

Open AT ®  Release version:
C-GPS Plug-in 100

Sample - InternetConnection Sample for C-GPS

Changes

Application Description

This application sends the NMEA data received from the C-GPS chipset (daughter board) over the established TCP socket. The peer in the socket communication should be a TCP server socket. The application opens a client TCP socket and sends the data over the TCP socket. The socket parameters and the APN parameters are configured using the configuration SMS which is sent to the Wireless CPU where the application is executing. The configuration SMS also provides the interval after which the NMEA data should be sent over the socket.

Important Note:

1. To execute the sample, the C-GPS feature must be enabled in the Wireless CPU. If the feature is not enabled, and an attempt is made to execute the application (using AT+WOPEN=1 command), the application responds with a +CME ERROR: 4 (Operation Not Supported). Only when the C-GPS feature is enabled, the application provides the desired functionality.

2. If the sample is to be executed in RTE Mode, then the COM port speed using which the Wireless CPU is connected to the PC must be set to 460800 bauds/second.

3. When the sample is to be executed RTE mode, the user must define a macro called RTE_PRODUCT_TYPE in the file "gpioconfig.h". This macro should represent the Wireless CPU being used. For instance, if Q2686 is being used, the macro should be defined as:

#ifdef __REMOTETASKS__

/* Define the product type only for RTE mode */

/* ADL_IO_PRODUCT_TYPE_Q2686 or ADL_IO_PRODUCT_TYPE_Q2687 */

#define RTE_PRODUCT_TYPE ADL_IO_PRODUCT_TYPE_Q2686

#endif

Application Configuration Commands

The application uses some custom commands which are used to start the application and/or configure the behaviour of the application.

 

  AT+NMEA (Configure the Debug UART)
CommandAnswers
AT+NMEA?+NMEA: <value>
OK
AT+NMEA=?+NMEA: (0-2)
OK
AT+NMEA= <value> +CME ERROR: 3
or
OK
 
ParameterValues rangeDescriptionDefault value
value0-20: Specifies that the NMEA frames should not be sent to the Debug UART.
1: Specifies that the NMEA frames should be sent to the Debug UART in standard format.
2: Specifies that RAW NMEA frames should be sent to the Debug UART.
0

The value parameter specifies whether the NMEA frames are sent over the Debug UART (UART which is not used by C-GPS board) or not.

 

  AT+PASSWORD (Configuration SMS Password)
CommandAnswers
AT+PASSWORD?+PASSWORD: <pwd>
OK
AT+PASSWORD=?+PASSWORD: (String of maximum 20 characters)
OK
AT+PASSWORD= <pwd> +CME ERROR: 3
or
OK
 
ParameterValues rangeDescriptionDefault value
pwdString of maximum 20 characters0: Specifies that the NMEA frames should not be sent to the Debug UART.
1: Specifies that the NMEA frames should be sent to the Debug UART in standard format.
2: Specifies that RAW NMEA frames should be sent to the Debug UART.
CGPS

This command specifies the password which is used to validate a correct configuration SMS. The configuration SMS must provide the correct password to be able to received the PVT information. The password is case sensitive. This password is stored in Flash memory and hence once saved the new password takes its effect until the flash objects are deleted or the password is deliberately changed.

 

  AT+CGPS (C-GPS UART Selection Command.)
CommandAnswers
AT+CGPS?+CGPS: <value>
OK
AT+CGPS=?+CGPS: (1-2)
OK
AT+CGPS= <value> +CME ERROR: 3
or
OK
 
ParameterValues rangeDescriptionDefault value
value1-21: UART 1 is used by C-GPS chipset (daughter board). UART 2 becomes the Debug UART.
2: UART 2 is used by C-GPS chipset (daughter board). UART 1 becomes the Debug UART.
0

The value parameter specifies the UART which is to be used by the C-GPS chipset for communication with Wavecom Wireless CPU. The UART which is left out becomes the Debug UART over which the Debug NMEA frames and/or traces can be received and AT commands can be sent.

 

  AT+CONFIG (Command to save previously set configuration.)
CommandAnswers
AT+CONFIG?+CONFIG: <value>
OK
AT+CONFIG=?+CONFIG: (0-1)
OK
AT+CONFIG= <value> +CME ERROR: 3
or
OK
 
ParameterValues rangeDescriptionDefault value
value0-10: The application should not save the +NMEA setting and the UART used for C-GPS.
1. The application saves the +NMEA setting and the UART used for C-GPS. Hence, if the Wireless CPU resets, the application would use the previously saved values and the C-GPS chipset (daughter board) would start working.
0

This command indicates whether the application save the +NMEA setting (set using AT+NMEA command) and the UART to be used for C-GPS (GPS UART) or not.

NOTE:
1. The command AT+CONFIG should be given after specifying the parameters for +NMEA and +CGPS commands. If the user wants that the application should not automatically start when the Wireless CPU resets, the command AT+CONFIG = 0 should be given and the Wireless CPU should be reset.

2. To start the application for the first time, specify the +NMEA setting, and then specify the UART which is to be used for C-GPS chipset (daughter board). The application starts only when the C-GPS chipset is initialized and this is done when the user specifies the AT+CGPS command.

Configuration SMS Format

To retrieve the PVT information, the user has to send a configuration SMS to the Wireless CPU where the Query Application is in execution.

The Configuration SMS should have the following format:

INFO:"Password":"IP":"IPAddr":"Port":"APN","Username","Password":"Optional Interval"
where the fields have the following values:

-> INFO - This field specifies that a configuration SMS has been received.
-> Password - This field specifies the password which would authenticate a valid user to configure the Wireless CPU. The Password value is configured using AT+PASSWORD command. The default value for this parameter is "CGPS".
-> IP - This literal string specifies that IP bearer has to be used for sending PVT information.
-> IP Addr - This is the actual IP address of the server with which the connection will be made to send the PVT information.
-> Port - This is the actual value of the Port of the server on which the TCP server is running where the socket will be made.
-> APN - This parameter specifies the Access Point Name using which the PDP context will be activated. The APN should not be included in double quotes.
-> Username - This parameter specifies the Access Point Username using which the PDP context will be activated.
-> Password - This parameter specifies the Access Point password which will be used during the PDP context activation.
-> Optional Interval - This parameter specifies the interval (in seconds) after which the PVT information will be sent to server. The default value for this parameter is 100 seconds. The maximum value that this parameter can take is 429496728 seconds.
A sample configuration SMS contents would be:
INFO:CGPS:IP:10.15.22.33:80:myapn,usename,mypassword:10

NOTE:
To stop the bearer, a configuration SMS has to be sent. This SMS should have the following format:
INFO:"Password":STOP

Also the configuration SMS should have the APN, APN Username and APN Password as comma separated fields (not colon separated) If a bearer is already running and an attempt is made to start the same bearer (without stopping the previous bearer), the application will send an error SMS message (BEARER ALREADY RUNNING) to the number from which the SMS is received (or which is configured using the configuration SMS)


Updated: Thu Nov 23 10:34:36 CET 2006;