Aspicore GSM Tracker
Real-Time GPS Tracking with Series 60 Smartphone
UDP Perl Tools
Listen a UDP socket, collect, parse and store datagrams from GSM Tracker
mobile clients into SQL database. Can be used with or without a database.
Compatible with MySQL 4.0. (Now adapted for MySQL 4.1.1 and above, 2005-03-31)
Run in a computer, which should be connected to the Internet
with a public IP. The computer must have Perl installed. We recommend v5.8.0
or newer. For Windows, you can download Perl from
ActiveState web site.
You can use these scripts as a demonstration, how to handle UDP packets
at the server end, even if you are not going to use Perl and MySQL.
Download
Download Perl tools here.
(6 kB Zip file, contains socket_udp_server.pl, socket_udp_server.bat,
socket_udp_client.pl, socket_udp_srv_parser.pl, socket_udp_srv_parser.bat,
store_gps_datagrams.pl)
MySQL related scripts and info
here.
(4 kB Zip file,
contains GSM_Tracker_MySQL_tab.sql, GSM_Tracker_MySQL.txt, select.pl,
insert.pl, delete.pl.)
Below is an explanation for the files, that you find within the
downloaded Zip files.
Tools to test UDP communication locally
| File name |
Description |
socket_udp_server.pl
|
This program receives UDP datagrams from Aspicore GSM Tracker
(or from socket_udp_client.pl) and
prints them to the console. |
| socket_udp_server.bat |
Optional command file to run socket_udp_server.pl |
socket_udp_client.pl
|
Simulate Aspicore GSM Tracker mobile client by sending UDP datagrams.
Usage: socket_udp_client.pl <remote_IP> <remote_port>.
(Arguments optional) |
Support FAQ
(Including Getting Started info for Windows)
Tool to display GSM Tracker datagrams
| File name |
Description |
socket_udp_srv_parser.pl
|
This program receives UDP datagrams from Aspicore GSM
Tracker, parses and prints them to the console |
| socket_udp_srv_parser.bat |
Optional command file to run socket_udp_srv_parser.pl |
Tool to store datagrams into SQL database
| File name |
Description |
store_gps_datagrams.pl
|
This program receives UDP datagrams from Aspicore GSM Tracker,
parses and stores them to a MySQL database. (You need to create the database
first.) |
|
|
Usage: store_gps_datagrams.pl <mysql_password> <local_port>.
(Arguments optional) |
|
In a real production environment you must add some error checking code etc. to make store_gps_datagrams.pl robust enough in different exception cases like temporary break in
the database connection etc. |
Files to create and test the SQL database
| File name |
Description |
GSM_Tracker_MySQL_tab.sql
|
Database creation SQL script for table GPS. |
GSM_Tracker_MySQL.txt
|
Instructions how to create the database gsmtrack and run the script GSM_Tracker_MySQL_tab.sql. |
select.pl
|
Make a SQL SELECT from MySQL database gsmtrack. |
insert.pl
|
Make a SQL INSERT to MySQL database gsmtrack. |
delete.pl
|
Delete all records from the GPS table in the MySQL database gsmtrack. |
Installation
- Install Perl
- Install Aspicore Perl scripts
- Install database engine (MySQL)
- Create database by executing the SQL scripts.
- Configure UDP port number at the server, if necessary
(store_gps_datagrams.pl line starting with "my $port" )
- Run store_gps_datagrams.pl
- Configure your possible firewall to pass the UDP packets through
to the local port number you are using.
- Start Aspicore GSM Tracker in your phone and change the setting "GPRS
Server IP" to the public IP address of the computer, where your Perl
script is running.
- Restart Aspicore GSM Tracker in your phone.
Now you are ready. The datagrams sent by your phone should appear into
the SQL database.
Obviously you need to write or purchase some additional program code to
do something with the positioning data collected to the database.
If you want to use these Perl tools with a MS SQL database, see our
Support FAQ.
Please contact support@aspicore.com,
if you have questions or suggestions. You can also use our
discussion forum.
If you have written the receiving part for our GSM tracker UDP datagrams with a different language than Perl and
allow us to share your code free of charge to the other users, we would appreciate any such source code you can send
us by e-mail.
N.B. In case, you would rather using Java, Carlton O'Riley has kindly sent us a Java solution to reading the data.
You can find it from here.
PHP samples are available here
and ASP samples here.
Back to product main page
|