Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 283
  • Last Modified:

Can you make sense of this?

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 or http://www.gsm-modem.de/smtp-gprs.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.

 Initial data:
Server to be contacted: www.gsm-modem.com
Application Layer Protocol: HTTP1.0 (RFC1945)
Page to be retrieved: homepage of server

GPRS settings:
APN: internet.gprs
IP of GPRS device: dynamically assigned by the network
DNS: assigned by the network
USERID: Happy User

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,0<cr>(1-GPRS context setting)
AT#USERID = "Happy User"<cr>(2-Authentication setting)
AT#PASSW = "EASY GPRS"<cr>(2-Authentication setting)
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>
Connection: keep-alive<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
Content-Type: text/html
X-Cache: MISS from proxy.telital.com
Connection: close
… here is all the HTML code of the page..

  • 2
  • 2
1 Solution
Bob LearnedCommented:
I haven't done this specifically, but it doesn't look too complicated.  What are you having a problem with understanding?

Probably the whole thing, right?

Type25Author Commented:
Bob, pretty much yeah.

I need to the simpliest thing, that is, create a smart device application and click a button to dial the default gprs connection.

Just haven't got a clue where to start at the minute, do i create a RAS connection, AT commands... ??

Bob LearnedCommented:
Looking at this example, it appears that they were using the AT commands with the GSM modem:

Here is a reference for Hayes AT commands:

More confusing information that attempts to explain the AT commands for the GSM modem to make a GPRS connection:

Woggledog: GPRS

Type25Author Commented:
Ok, let's presume for a moment that i know what AT Command to send, any idea how i actually send it to the modem?   with C#...

I can only presume it's with an external call to a system DLL?


Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now