Go to Triangle Digital Support Home Page TDS2020F TECHNICAL MANUAL
Hardware expansion
GPRS / GSM cell phone radio modem
Live website search
Enter key words
 

GPRS / GSM CELLPHONE RADIO MODEM

QUICK LINKS

Description - Starter Pack - GX102 terminal - Modem connections - Customisation - Fast Start Guide - GPS & GPRS Operators

OVERVIEW

Global System Mobile (GSM) is the world’s leading and fastest growing mobile standard, spanning over 170 countries. GSM technology is in use by more than one in ten of the world’s population.

 

The GX102 GPRS / GSM terminal along with the support library files #GSM.TDS and #EMAIL.TDS allows you to

 

q    send an email from a TDS2020F to report its status or collected data

q    dial out from a TDS2020F single board computer and then send or receive data

q    dial in to a TDS2020F and then send or receive data

q    send an SMS text message from a TDS2020F with up to 140 characters

q    receive an SMS text message into a TDS2020F and act on its content

 

GX102 GPRS / GSM terminal Starter Pack

GX102 GPRS/GSM terminal Starter Pack

Applications include

 

q    data logging

q    telemetry

q    remote monitoring

q    meter reading

q    remote control

q    fleet management

q    security systems

q    vending machines

q    traffic control

q    telemetry

q    charging by use

 

DESCRIPTION

A GSM radio modem is equivalent to a cell phone but responds to an extended set of modem AT commands. The two support software files #EMAIL.TDS and #GSM.TDS were developed using GX102 Terminal with one socket connected to a serial port on a TDS2020F computer and another to an antenna. We suggest you use the GX102, but most terminals conforming to GSM phase 2 specifications should work with the software. However the email facility uses AT commands custom to the GX102 terminal.

 

This software as written provides five procedures that act

 

q    as tests for each of the four basic modes of operation

q    as templates to be expanded to meet the needs of the application

 

The five procedures in files #EMAIL.TDS and #GSM.TDS are

 

EMAIL-TEST   DIALOUT-TEST   DIALIN-TEST   SMSOUT-TEST   SMSIN-TEST.

 

All five include modem initialisation, PIN access to the SIM card and registration with the network. This initialisation can take up to 20 seconds but is much faster if the modem has been initialised before. This is an example of what you should see during a test:

 

EMAIL-TEST
- Initialising modem
- Waiting for registration on network
- Cellphone signal strength 16%
- Connecting to Internet Service Provider
- Connecting to mail server
- Sending message header information
- Sending message content
- Message successfully sent ok

 

You will require:

 

q    An operational SIM card; one from a current mobile telephone should be suitable.

q    For the data dial-in facility (second of the four described above) you will also need to ask the network operator for a data telephone number. This will be different from the usual analog number and is usually provided at no extra charge.

q    To send emails you need a GPRS extension to your GSM contract. The network operator can arrange this and you will be charged either by the megabyte of data transferred or a fixed fee per month.

q    To send emails obtain the network parameters from your mobile service provider. Settings for different operators around the world are in the file 'GPRS Settings for various network operators.htm' in the \Essentials\GSM directory on the CD, but these may change - check with your provider. See the Fast Start Guide below for more information.

GSM/GPRS STARTER PACK

The GSM-GX102SP Starter Pack contains everything needed to get the TDS2020F card computer communicating long distance by radio over the mobile phone network. Telephone, email, data and text message transmission and reception are supported.

It is suitable for all areas where GSM has frequencies 900MHz, 1.8GHz or 1.9GHz, including North America. The Starter Pack includes

 

q    GX102S tri-band GSM/GPRS terminal

q    Antenna with waterproof plastic enclosure

q    2 metre radio frequency cable

q    9-pin D-plug and cable to connect to TDS2020F computer

q    Power connector and cable

q    Software and documentation CD

GX102 TERMINAL

 

q    Tri-band GSM/GPRS modem/terminal (EGSM900/1800/1900MHz).

q    Designed for GPRS, data, fax, SMS and voice applications.

q    Embedded TCP/IP stack for Internet access.

q    Fully compliant with ETSI GSM Phase 2+ specifications (Norman MS).

q    Remote control by AT commands and AT+ (GSM07.07 and 07.05) command sets.

q    Input voltage: +8 to +24V.

q    Input current at +12V: 8mA in idle mode and 150mA with 2W output power.

q    Temperature range: -20°C to +70°C operating, -30°C to +85°C storage.

q    Dimensions: 80 x 62 x 32mm (3.2" x 2.5" x 1.3").

q    Weight: 200g (7oz).

q    GPRS / Data /Fax features: Packed Data (GPRS class B, class10), Coding schemes CS1 to CS4, Circuit Switched Data (CSD) asynchronous, transparent and non-transparent up to 14.4kbps, automatic fax group 3 (Class 1).

q    Short Message Service (SMS text messaging) features: Text and PDU, Point to Point (MT/MO), SMS cell broadcast.

q    GSM supplementary services: Call forwarding, call barring, call waiting, call hold, Calling Line Identity, Explicit call transfer.

q    Interfaces: RS232 DCE through D-type 9-pin female connector, RJ11 connector for voice telephone or other analog signals, power supply through a Molex 4-pin connector, SMA antenna connector, toggle-spring SIM card reader (3 Volt).

MODEM CONNECTIONS

The supplied software assumes the following connections to a GSM phase 2 modem (one which accepts extended 'AT' commands). They apply to the GX102 Terminal supplied by TDS Ltd and to most others. Only a 3-wire interface is necessary, the software configures the terminal appropriately.

 

TDS2020F Port 2

Direction

Modem 9-pin socket

Function

 

 

NC

<--

1

Data Carrier Detect

 

SIN2

c14

<--

2

Receive data

 

SOUT2

c13

-->

3

Transmit data

 

 

NC

-->

4

Data Terminal Ready

 

GND

c32

 

5

Ground

 

 

NC

<--

6

Data Set Ready

 

 

NC

-->

7

Request To Send

 

 

NC

<--

8

Clear To Send

 

 

NC

<--

9

Ring

 

Alternatively, if you want to use the modem on Port 1 on the TDS2020F connect as follows and customise the software as described below.

 

TDS2020F Port 1

Direction

Modem 9-pin socket

Function

 

SIN1

a25

<--

2

Receive data

 

SOUT1

c25

-->

3

Transmit data

 

GND

c32

 

5

Receive data

FAST START GUIDE

Note: If you need to email from the TDS2020F use file #EMAIL.TDS and during compilation file #GSM.TDS will be included. If you do not need email use only #GSM.TDS.

 

1.  Obtain a GSM SIM card from a network operator and, if data dial-in is required, a data telephone number. If the TDS2020F is to send emails request a GPRS extension to your GSM contract.

 

2.  Check operation of the SIM card in a mobile telephone on both voice and text messages. Set a PIN number of four digits on the SIM card (but no PIN2).

 

3.  Before start-up, the hardware components required for your application must be set up. Before power is applied, the SIM card should be inserted in the GX102 and the TDS2020F attached to the modem according to the connections shown above.

 

4.  Do the minimum customisation necessary.
On a copy of file #GSM.TDS:
- set the dial out telephone number (see CONSTANTS)
- set the destination SMS text message number (see CONSTANTS)
- set the PIN number (see CONSTANTS)
- change from serial port 2 to port 1 if necessary (see CUSTOMISATION)
If you will need emails, on a copy of file #EMAIL.TDS:
See CONSTANTS and a list of operators and appropriate parameters in the CD directory \Essentials\GSM.
- set the APN (Access Point Name) for your mobile network
- set the User ID for your mobile network
- set the Password for your mobile network
- set the mail server name for your mobile network
- set your own domain name
- set the sender's email address
- set the recipient's email address
- set the plain name of recipient
- set the email subject line

 

5.  Before involving your application program, test the hardware by using the copies of file #GSM.TDS or #EMAIL.TDS alone. Each of the five functions has its test routine and
we suggest you get these working before customising them for the application. The easiest way is to put a PC running TDS-PC for Windows on serial port 1, with the GSM/GPRS modem on serial port 2.

If you must have them the other way around, compile the copy of file #GSM.TDS into a Xicor 28HC256 EEPROM (stock code EEPROM32K) and then type
: WORK SHELTER 4800 2BAUD 2FORTH START ; SET WORK
Now in TDS-PC for Windows connected to port 2 on the TDS2020F select 4800 baud by clicking on the interactive window, then 'Options' menu, followed by 'Baud rate' and '4800'. Check for the Forth 'ok'.

 

6.  To do all the tests you will also need a PC with an analog modem and HyperTerminal (included with all versions of Windows). A single or two different PCs can be used for the two functions. You are now ready to proceed with the following five tests. In the cases of dial-in and SMS-in ensure that initialisation, PIN authorisation and network registration has taken place before attempting to connect to the GX102S. After power-up this can take up to 20 seconds, but is much faster on subsequent occasions. The GX102S flashes about once a second initially but gives only brief flashes once registered.

 

7.  DIAL OUT calls a remote modem that is in a receive mode, sends data and then hangs up. You can use HyperTerminal on a PC to receive the data - set it to the appropriate PC serial port or modem and from the 'Call' menu select 'Wait for call'. Now send the DIALOUT-TEST command to the TDS2020F. You should hear the connection being made between the modems and the dummy data from the TDS2020F will appear in HyperTerminal.

 

8.  DIAL IN assumes the TDS2020F is ready to accept calls by sending it the DIALIN-TEST command. Then from HyperTerminal dial up the SIM card's data telephone number. You should hear the connection being made between the modems and the dummy data from the TDS2020F ought to appear in HyperTerminal.

 

9.  SMS OUT sends a text message from a TDS2020F to a mobile telephone. Send command SMSOUT-TEST to the TDS2020F and on the mobile telephone whose number is defined in CONSTANTS you should receive a test message that shows the time and date set in the TDS2020F.

 

10. SMS IN receives a text message in a TDS2020F from a mobile telephone. Type command SMSIN-TEST and from a mobile telephone send the following text message to the SIM card's voice telephone number: Hello world
The test program executes received text messages as Forth code and you should see 'Hello world' on the TDS-PC for Windows connected to the TDS2020F. Sent text message Test over to exit the test - it is programmed to recognise this string.

 

11. To send an email (If you used #EMAIL.TDS) type command EMAIL-TEST and wait until 'Message successfully sent' appears. Have patience because the SMTP Internet email standards say that it can take over 30 minutes to complete an email, and that is without any data! In practice it won't be this long.

 

12. In case of difficulty talk to the GSM modem transparently through the TDS2020F using the word DIRECT . A full list of AT commands is in the \Essentials\GSM directory on the CD.

CUSTOMISATION

We suggest that before you do any customisation you follow the Fast Start Guide to ensure that your hardware is operational.

 

1. As written, serial port 2 is used by the software files #EMAIL.TDS and #GSM.TDS for the modem. To use serial port 1 change the constant PORT# from 2 to 1.

2. If you will not use serial port 2 comment out #SERIAL2.TDS in a final program that has the GSM modem on serial port . However, It is useful to include it during initial testing as described in the Fast Start Guide.

3. The four last sections in file #GSM.TDS are (1) dial out, (2) dial in, (3) send an SMS text message, (4) receive an SMS text message. Delete any of these sections where the function is not needed in the application.

4. In the TDS2020F the scratchpad known as PAD is guaranteed to be 84 bytes long and PADLENGTH in the CONSTANTS section is set to 80. However, PAD is a very convenient place to handle text messages, which can be up to 140 bytes long. If you need messages over 80 bytes change the constant PADLENGTH to 140 and ensure that at runtime you will have 141 bytes of RAM available. You will probably need to move the start of variables forward by adding this line to your source code before compiling any other code:
$FE30  VDP !

5. To change the message in the email sent by file #EMAIL.TDS construct your own version of the word CONTENT in the section PRIMITIVES.

GSM & GPRS OPERATORS

In USA three different companies provide GSM/GPRS service: Cingular (formerly AT&T Wireless), Cingular, and T-Mobile. Some cell phone networks are not compatible with the international GSM/GPRS standards. Note that the GX102 terminal will operate on 1900MHz in the Americas, but not where GSM 850MHz is used (sometimes called 800MHz). In most of the world 900MHz and 1800MHz are the frequencies used - the GX terminal handles both. There is a list of operators in the CD folder \Essentials\GSM.

GPRS for sending emails may not be always be available, especially when roaming if your network does not have the appropriate agreements. Check with your network service provider.

Go to Triangle Digital Support Home Page Go to top   Next page