Can you make sense of this?

Posted on 2005-02-28
Medium Priority
Last Modified: 2012-06-22
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..

Question by:Type25
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 96

Expert Comment

by:Bob Learned
ID: 13420300
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?


Author Comment

ID: 13420325
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... ??

LVL 96

Accepted Solution

Bob Learned earned 2000 total points
ID: 13420563
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


Author Comment

ID: 13420598
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question