Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please every-one I want to write a GPS Application in ASP.NET using C#, My company provide me with an GPS ENFORA TRACKER. What is expected of me is that the application sends an AT Command to the tracker requesting for the current GPS coordinate of a vehicle, the ENFORA TRACKER return the info in Longitude and Latitude, Google Map then Populate it and display it on the MAP

NOTE: Do I have to work with port here.

Please help
Posted
Comments
luisnike19 29-Aug-11 10:50am    
And what's you problem or your question?

I think you might need to clarify what you're trying to do, or evaluate whether or not you're using the right tools for the job.

If you're creating a client application, why does ASP.NET come into play? And does the GPS device have anything to do with the web server?

If you're working on ASP.NET, it won't likely be running on the client machine, so all you're dealing with is the co-ordinates on the server side. Use those with any Google Maps sample and you'll have a simple JavaScript solution in place in minutes.

On the client side, you won't need to do anything other than collect the GPS co-ordinates from the browser. Again, you won't need to know about the GPS device here as you can't access it from the browser; you'll have to take whatever the geolocation will give you.

Cheers.
 
Share this answer
 
Comments
ahmedfaruk88 31-Aug-11 10:38am    
It is a Web Base Application, it will be accessed via a web browser (HTTP)
ahmedfaruk88 31-Aug-11 10:41am    
And also, do I have to work with the system.Ports.SerialPort class in the web application to send the AT Command (I feel it not necessary because it will be send through HTTP) but what I want precisely is to send an AT command to a GPS Device and receive a response. Please if there any code on the web that i can reference that will be welcome
Thanks for some clarification on your question.

What it sounds like is the following:
1) You're creating a functionality that will locate vehicles through some third-party device. You can query this via serial port and it will return GPS co-ordinates.
2) You're also creating a web front-end that can view the co-ordinates of the vehicles.

Here's my recommendation:
1) Separate the apps. You'll have a better experience if you poll the device periodically (say once a minute) in a service application and store the results in a DB/memory. Think about this from a user perspective: if you intend to grow at all, and 10 people hit the page at once and you're doing on-demand loading, you'll run into all kinds of problems with data access. Your serial port will become a bottleneck very quickly.
2) In your web app, use jQuery (or another JS library) to load your co-ordinates in time with the server polling from #1. You're only reading from the DB in this case; very easy.
3) Make sure you understand your licencing in the mapping applications. You can't use Bing Maps or Google Maps for free if you don't provide free access to your maps.

As far as connecting to the device, try contacting the manufacturer. They will have a list of commands, or an SDK that you can use to communicate with the device. As well, the MSDN[^] docs on SerialPort are actually pretty good and will point you in the right direction. If you have specific questions, please do not hesitate to ask.

Cheers.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900