c# smart device context, initiating a GPRS connection, does this make any sense to anyone?
May you have a look on gprs-http_.html">http://www.gsm-modem.de/gprs-http_.html
It shows how to send and Email or how to access to a HTTP server.
Example HTTP client application
Let's suppose you want to connect your embedded device to an HTTP server and retrieve an HTML page using the EASY GPRS feature.
Server to be contacted: www.gsm-modem.com
Application Layer Protocol: HTTP1.0 (RFC1945)
Page to be retrieved: homepage of server
IP of GPRS device: dynamically assigned by the network
DNS: assigned by the network
USERID: Happy User
PASSWORD: EASY GPRS
Checking on the RFC990 the HTTP service we can found that the port 80 is dedicated for HTTP service, therefore our HTTP server will be waiting for incoming connections on that port and we will fix the EASY GPRS port to be contacted on the remote server exactly to 80.Second thing we have to discover is whether the transport protocol has to be TCP or UDP; on theRFC1945 we can read that the HTTP Application layer protocol is meant to be on top of TCP/IPprotocol, therefore the transport protocol choice will fall on TCP. Now we have all the information needed to configure our system. With your microcontroller you issue to the GM862-GPRS the following AT commands:
AT+CGDCONT = 1,"IP","internet.gprs","0.
S context setting)
AT#USERID = "Happy User"<cr>(2-Authentication
AT#PASSW = "EASY GPRS"<cr>(2-Authentication
AT#SKTSET= 0,80," www.gsm-modem.de
"<cr>(3-remote host setting)
For our convenience we store all these parameters with the command:
Now we can activate the GPRS connection and let the GPRS module contact the server:
When we receive the CONNECT indication, then we are exchanging data with the HTTP server program on the remote host machine. Now following the HTTP protocol we ask for the homepage by sending the following lines on the serial line:
GET / HTTP/1.0<cr><lf>
As a response to our query the HTTP server will reply with the HTML code of the homepage and some debugging responses that we will see directly on the serial line:
HTTP/1.0 200 OK
Date: Thu, 06 2003 10:21:58 GMT
Server: Apache/1.3.27 (Unix)
Last-Modified: Thu, 06 2003 10:21:58 GMT
X-Cache: MISS from proxy.telital.com
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 FINAL//EN">
â€¦ here is all the HTML code of the page..
DONE! Easy as EASY GPRS.