GM862 GPS PASSING TO SERVER

Hi GUYS

You’ve ALL been a great help so far, thanks a million. I’m learning a lot. Appreciate it.

I’m actually trying to send my GPS Lat, Long and Time data via HTTP to my server. I’m just a bit confused about what exactly to send from my micro after the CONNECT.

I start off with

AT#SGACT=1, 1

#SGA: XX. XX. XX. XX

OK

AT#SD=1, 0, 80, “(my server IP addr)”

CONNECT

Now, here do I enter the following?

GET/HTTP/1.0

(my server IP addr)/(GPS coordinates)

CONNECTION:CLOSE

Is the above correct?

No, thats not valid HTTP.

There are two ways of doing it. One is with a GET request, the other with a POST. Both will require some simple escaping to make a form encoded string. The simplest encoding is to just replace " " (space) with “+” (plus), and as long as you don’t have any other separator characters (&, ;, and a few others) you will get valid data to most servers even if its not totally in spec.

Here is a valid HTTP GET to a script called /myscript.

GET /myscript?gpsdata=$GPGGAetc HTTP/1.0

Host: www.myhost.com

Connection: close

Note the Host line. If your server is virtual hosted, this is required.

POST data follows in the body.