Suomeksi | In English
Aspicore

Mobile software
Forum

Aspicore GSM Tracker

Real-Time GPS Tracking with Series 60 Smartphone

ASP Tools

Sample VBScript ASP code to create a server end, which accepts data from Aspicore GSM Tracker mobile clients, optionally stored into SQL database and sends some feedback.

These scripts can be used to upload location data to a server, when Aspicore GSM Tracker uses HTTP protocol for communication. Reporting scripts listmdb.asp, queryphone.asp and rss_feed.asp can also be used, when the location data has been uploaded with UDP protocol.

Uploading location data with HTTP requires Aspicore GSM Tracker v2.00 or above or an S80 version. (Download S60 SIS from here, updated 2006-04-05. Version 2.xx supports HTTP protocol to upload the location data to the server, in addition to the UDP protocol used in the earlier versions. Version 2.xx requires that the phone operating system is based on Series 60 platform 2.0 or above. If your Series 60 phone is not compatible, you get "Series60Product ID Required" error, when trying to install the SIS file. Series 80 SIS is here.)

ASP Tools can be used with or without a database. Compatible with Access database (*.mdb file, MS Office 2000 format) and with MS SQL Server. Uses Microsoft ADODB v2.7 data access library.

Run in a computer, which should be connected to the Internet with a public IP and should have web server software running, e.g. Microsoft IIS. The computer must have Active Server Pages enabled.

You can use these scripts as a demonstration, how to handle Aspicore GSM Tracker http data at the server end, even if you are not going to use IIS, ASP or MSADO technology.

Download

Download ASP tools here.
(27 kB Zip file, contains adovbs.inc, listmdb.asp, queryphone.asp, rss_feed.asp, showargs.asp, storedata.asp, storemdb.asp, storesql.asp and storemdb.mdb.)

Additional downloads:

SQL scripts to create GSM Tracker database into Microsoft SQL Server 7 or MSDE 1.0. Download from here. (2 kB Zip)

Below is an explanation for the files, that you find within the downloaded Zip files.

Tool to test HTTP round-trip communication

File name Description
showargs.asp
 

Show URL arguments as plain text. This sample demonstrates, how Aspicore GSM Tracker sends location data to the server via HTTP.

Usage: Set "Internet page URL" in Aspicore GSM Tracker settings to point to this page. You see the output in your phone in the Info tab every time the phone sends some location data to the server via a HTTP connection.

Tool to store HTTP location data into text file

File name Description
storedata.asp
 

Show URL arguments as plain text and stores data into text file. (The data is written to C:\WINDOWS\Temp\storedata.txt by default.)

Usage: Set "Internet page URL" in Aspicore GSM Tracker settings to point to this page. You see the output in your phone in the Info tab every time the phone sends some location data to the server via a HTTP connection.

Tools to store HTTP location data into Access or SQL database

You must install the database first before you can use any of the SQL related ASP scripts below. See section "Additional downloads" above.

File name Description
storemdb.asp
 

Show URL arguments as plain text and store data into database.

For simplicity, this script stores GPS data only. You can amend it to store also the cell tower info into another database table.

Usage: Set "Internet page URL" in Aspicore GSM Tracker settings to point to this page. You see the output in your phone in the Info tab every time the phone sends some location data to the server via a HTTP connection.

Example of the response:

screenshot of Info-tab

storesql.asp

Show URL arguments as plain text and store data into MS SQL Server database.

As opposed to storemdb.asp, this script stores also the cell tower info and test messages in addition to the GPS data.

Usage: Set "Internet page URL" in Aspicore GSM Tracker settings to point to this page. You see the output in your phone in the Info tab every time the phone sends some location data to the server via a HTTP connection.

Tools to view data stored into Access or SQL database

File name Description
listmdb.asp
 

You can use this sample to see, what data storemdb.asp has stored into the database.

Usage: Go to the URL of this page with your Internet browser, e.g. http://<YourWebServer>/listmdb.asp

queryphone.asp
 

You can use this sample to see, what data exists in the database for a certain phone.

Usage: Go to the URL of this page with your Internet browser, e.g. http://<YourWebServer>/queryphone.asp?imei=<your_imei>

Example of the response

rss_feed.asp
 

Show tracking data from MS SQL Server database as a geocoded RSS feed. You can use this sample to see the most recent locations of the selected phone in an RSS feed reader. When you click one feed item, a map of the logged location is shown.

Usage: Go to the URL of this page with your RSS feed reader, e.g. http://<YourWebServer>/rss_feed.asp?imei=<your_imei>

(In Windows you can use e.g. Luke Hutteman's SharpReader or RssReader from http://www.rssreader.com/.)

Example of the XML response

xml rss

(Compatible with Mikel Maron's excellent light weight mapping tool, worldKit)

Installation

  1. Install the database (MS Access file storemdb.mdb or MS SQL Server database with GSM_Tracker_MSSQL7.sql)
  2. Make sure you have a working web server (Microsoft IIS)
  3. Copy Aspicore ASP files into some public folder in your web server.
  4. Edit Aspicore ASP files to set the db connection parameters in the source files as required by your database settings (strConn string: host, username, passwd, dbname).
  5. Go to the URL http://localhost/showargs.asp?myarg=dummy with your Internet browser to see that your ASP installation works. (Modify  the URL to point to the folder where copied showargs.asp).
  6. If you see in your browser something like:
    4/15/05 5:39:48 PM
    myarg => dummy
    your setup works at least locally.
  7. Repeat the same test from public Internet to make sure that the ASP page is accessible also from your phone.
  8. Configure the Internet Access Point in your phone, if necessary. More info here.
  9. Start Aspicore GSM Tracker v2.00 in your phone. Goto Options->Settings->http. Set HTTP Protocol -> On and Internet page URL -> http://www.yourdomain.com/showargs.asp?
    Press Back to save the settings.
  10. Choose Options->GPRS data->Connect GPRS
  11. Choose Options->GPRS data->Send GPRS test msg
  12. Activate the Info tab in Aspicore GSM Tracker. Soon you should see the server reply:
    screenshot of Info-tab

Now your setup is ready and you can continue with the other sample scripts, which store data into your server.

Obviously you need to write or purchase some additional program code to do something with the positioning data collected to the database.

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 with a different language than VBScript / ASP 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 or via our discussion forum. Open source C# and Python solutions were especially interesting.

N.B. See also our PHP, Perl and Java samples.

Back to product main page

©