Flow of data from the GSM to the Webserver

Hello All,

I have recently managed to send data from my Arduino Board to my web server.
I am using the 900 GSM from SIMCOM. The board can be seen on the link below.

http://imall.iteadstudio.com/im120417009.html

I was just wondering if someone has a good knowledge of the different layer the data go through before getting to my webserver.

Example (Arduino, GSM, GPRS, Webserver)

Any link to documentation to help me understand will be appreciated.

Cserge

Can you explain what you meamn.

How have you sent the data? as an http: protocol.

If so it arrives at the server as a socket packet on Port 80..

Hello tgsuperspec,

Thank you very much for your feedback.

I am sending my data from the Arduino to the webserver using the code below:

===========================================================

void setup()

{

Serial.begin(9600);

Serial.println("GSM Shield testing.");

if (gsm.begin(2400)){

Serial.println("\nstatus=READY");

started=true;

}

else Serial.println("\nstatus=IDLE");

if(started){

if (inet.attachGPRS("internet.wind", "", ""))

Serial.println("status=ATTACHED");

else Serial.println("status=ERROR");

delay(1000);

numdata=inet.httpPOST("www.evildeejay.it", 80, "/test/test.php", "name=Marco&age=24",msg, 50);

}
};

void loop()
{
};

===============================================================
So yes I assume that I am using the http protocol because of the command below

numdata=inet.httpPOST("www.evildeejay.it", 80, "/test/test.php", "name=Marco&age=24",msg, 50);

So yes it arrives at the server as a socket packet on port 80.

My question was, can anybody explain to me the flow of data from my Arduino to the webserver (Via the GSM board)? I want to understand the protocol respected etc..
I will appreciate any documentation to understand.

Many thanks,
cserge

This an indepth question... I used to lecture this subject and I can point you in the right direction.

  1. Lets take the WEB server first.. the protocol is http but this sits on TCP/IP
  2. TCP is the main transport control protocol, this is a varient of the ISO 7 layer model derived for basc packet switching
  3. The layered model starts at the bottom with physical media i.e i and 0 on the transmission media
    Each layer above adds information or removes information depending on direction up/down layers
    UP removes and checks .. Down adds after investigating the packet.

At the top of the TCP stack we have a common data transport structure if the packet is marked as http then its passed up to the http stack to be further decoded, alternatively it can be FTP or and other of the common protocols each is handled by the specific relevant protocol stack

4 the extension TCP / IP adds further layers at bottom of stack to direct the traffic flow based on IP Internet protocol strategy which included the DNS to find the target location etc. DNS Dynamic name service translated www.. to IP4 or IP 6 Psuedo physical address, the only actual address in the network are the MAC interface addresses on the interface cards.

  1. Now if we look at GSM the M = modem, the ability to transfer 1 and 0 as some form of tone initially designed for land lines now modified to use two radio circuits one each way .. full duplex.

  2. The protocol for data transmission itself from Application to physical media is similar but GSM is circuit switching not packet switching and used a decdicated route from modem to tower.

  3. The towers on GSM interact to locate the receive phone number

SIMS register there location with a Tower as they enter the towers radius of operation ..this is the technique used for assisted GPS to locate a device using cell or tower locations.

The actual data is fiixed routed between towers once route is established unlike a landline ... GSM will send data in the form of an sms to the receive number to get it out of the cell network if the relevant SIM is located .the receiving Modem does not have to request it. in earlier incarnations of SMS there was a store / forward transfer buffer and circuit switched packets could be cycled round the network or simply bounce back / forth but this is not practical with the world wide cellular network amymore there is simply not the band width avaiable ort the store / forward buffering any more.

Thats a very broad and incomplete overlap if you want more detail google TCP/IP or UDP/IP an alternative protocol stack, the difference is TCP makes sure receiver gets packets in roight order and non are lost it will await confrmation of success on each packet and retransmit if there was an error . UDP has no such extra bits very useful for flood broadcasts etc.

There are many references to the ISO model and lso to GSM terchniques obviously G3 and G4 have refined many aspects of the transmission techniques and these are also referenced on many WEB sites.

It is a common misconception you need to understand how all this works ... at the start yes we did need to know since there were aspects that were not reliable and we found work rounds, but the RFC request for comments maintained by the Internet Engineering Task force are now effectively caste in stone You can Google any of these there are hundreds to get a detailed software perspecitive on any aspect of data transmission using standard protocol techniques..

Enjoy the fact its easy to send data ..

Happy coding..

Hello tgsuperspec,

First of all, I want to pause five minutes and thank you enormously for the time you took to put this email together. Again I repeat thank you.

So will you agree with me if I say that the data goes from the Microcontroller to the GSM which then send them to the GPRS network that use the TCP/IP protocol and the HTTP protocol to send the data to the webserver.Is my understanding correct?

My question was motivated by the fact that, I am using an international SIM card from telefonica (SPAIN or ITALY) while in the USA to transfer data to my webserver and it take around 45 second for each data to be sent.

So I was wondering if they was an extra layer of protocol that was causing this delay and that using a local SIM card will reduce that time a little bit?

Many Thanks,
Cserge,

Yes the data roaming of a SIM does impose additional delays both for data and calls.

All SIMS actually carry Country codes although generally they are not needed

I live in Spain.. Tenerife now, I have English Mobile with Tesco SIM and a Spanish Mobile Telephonica

To make a call between need to use +44 or +34 prefix.

The SIM will be roaming registered with the cell but to make a connectiopn it may need to refdlect back to country of origin to validate use there are a number of protocols in G3 and G4 to try and sort this, as well as last years eiropean agreement on landing chages etc., which has yet to be fully implemented arround the world.

Your slightly out

Ardunino to GSM midulate to -> network > demodulate GSM then transfer and interprete TCP/IP
In the other direction its a reverse mimic..

Hello tgsuperspec,

Thank you again for your fast reply. I am impressed.
You must be a very intelligent man. It is an honor for me to talk to you Sir.

You have mentioned the modulation of the signal.
When I read on the features of the IComSat v1.1 –SIM900 GSM/GPRS shield. It is mentioned

“Quad-Band 850/900/1800/1900MHz”

Is this feature the modulation frequency?
Is it correct to think that the highest the modulation frequency is , The fastest the data are transmitted?

Is it why many telephone companies are going to 3G and 4G? To transmit faster their data

Many thanks,
Cserge

The frequencys define the base band ... the frequencies are distributed arround the world and in fact that a problem on compatability in some cases.

The modulation is based on these frequencys if you want to know more look up frequency modulation techniques, basically you produce quadrature side bands in the basic technique then each of the four side bands are assigned values of 00,10,10,11.. Todays modulation techniques allow octal and in some cases hexa allowing 0 to 7 or 0 to 15 side band thereby allowing patterns of

in hexa base the patterns are 0000, 0001 etc., to be transmitted as a single side band 'ton, octal allows... 000,001 etc.. so we have 2^4 combinations in hexa side band generation and 2^3 in octal.

The more info in each side band = faster speed..

3G and 4G do use enhanced modulation techniques but they also have different error recovery and routing techniques both device to cell and cell to cell.

Hello tgsuperspec,

Thank you very much for sharing your knowledge. I have two last questions.

Do you know any good link or online courses that explain in a simple way, the difference step the data go through from my Arduino Board, to the GSM to the Webserver?

Checking on the internet they are so many document, I do not know which one is good or not.

I was also wondering if you know a good tutorial on GSM Shield AT Command.

Many thanks,

Cserge

Its too complex a subject to find simple tutorials

Hence my comment that I used to lecture on subject..

Hayes AT command set for GSM simply get yourself a command reference document, I know theres one for the

Siemans TC35 Modem board just do a Web search..

What extra info on data flow are you looking for ?

I think that I am good now. Thank you very much for your help.