latitude
lo
n
g
it
u
de
The server can
send email updates
or provide live
updates on a
webpage using
Google Maps.
Establishing a Mobile
Connection
code is also required. Here’s a configuration string that
initializes the device for use in the US on T-Mobile’s
network.
The next step in this application is to establish a
connection to the Internet via the GPRS device. The
purpose of this web connection is to allow the current
location of your robot to be sent to a web server that the
user can view. The NetBurner tools provide some simple
utility functions to open and manage the GPRS network
connection. If any loss of signal occurs, the connection
utility task will re-establish the network interface as soon as
the signal returns.
A serial port connection is then opened from the
NetBurner to the Telit chip. The Telit chip is always listening
on the serial port, so begin by opening a serial port on the
MOD5270. Once the MOD5270 and the Telit are
communicating, you will need to send some basic
initialization and configuration strings to the GPRS module.
If you are familiar with AT commands, this is what the Telit
chip uses for all configuration and dial commands. AT
commands are configuration strings often associated with
modems. Through AT commands, you will need to specify
the mobile provider’s dial-in number and login information.
Along with the mobile provider’s options, a country specific
“AT+CGDCONT=1,\”IP\”,\”internet2.voicestream.com\
”\r\n”
When “AT” is sent through serial, it indicates that a
command string will follow. The CGDCONT command is
used to set the GPRS network connection protocol. The
command used indicates that the board will use an IP-based
connection. Next, the APN (Access Point Name),
“ internet2.voicestream.com” is used. This address was
provided by the mobile service that was used in this
example.
Once the connection is configured, a dial AT command
string is sent to the GPRS device.
“ATD*99***1#\r\n”
This dial string initiates the network connection that is
always on. Unlike dial-up networking, no authentication is
required in a GPRS connection. Your phone number is your
identification, and is how the provider charges you for the
service.
The mobile tracking system stores its position by sending data over a GPRS cellular network
with Internet access on a publically accessible web server.
52 SERVO 07.2010