Mc55 gprs html get test
After long time I have finally manage to test the internet connectivity of the cinterion/siemens mc55i gsm/gprs modem used in the sintwind project.
In order to perform this test I have attached the computer directly to the modem. For more detailed information on these steps (and others) please refer to the MC55iATcommand_set datasheet.
The first step is to enable the polling mode, this means that we will query the modem for each result a given command generates.
at^scfg="Tcp/WithURCs","off"
Define a connection profile dependant on your gsm provider. For this example I have used the Italian’s TIM.
The profile number is 0, the connection type GPRS, timeout 20 sec and the apn used is ibox.tim.it
AT^SICS=0,CONTYPE,GPRS0
AT^SICS=0,"inactTO","20"
AT^SICS=0,apn,"ibox.tim.it"
Define the service profile which indicates what we want to do and on which connection profile we want to do It.
In this case I have used the service profile number 0 as well, type of service is HTTP, this service profile is linked to the connection profile 0 (conId), the http method is GET and the website address is http://enricorossi.org/testdata?t=22.7&h=69&d=n&w=7.2 completed of all the get parameters in the URL (note: That URL does not exist).
at^siss=0,srvType,"HTTP"
at^siss=0,conId,"0"
at^siss=0,hcMethod,0
at^siss=0,address,http://enricorossi.org/testdata?t=22.7&h=69&d=n&w=7.2
Connect.
AT^SISO=0
Query for bytes received (1500 at a time, repeat until no more are left).
at^sisr=0,1500
Check the connection’s status or the error.
at^sisi?
at^sise=0
and finally close the connection.
AT^SISC=0
The record of the entire procedure.
note: The destination URL is a page 404, not found.
at^scfg="Tcp/WithURCs","off"
^SCFG: "Tcp/WithURCs","off"
OK
at^sics=0,CONTYPE,GPRS0
OK
at^sics=0,"inactTO","20"
OK
at^sics=0,apn,"ibox.tim.it"
OK
at^sics?
^SICS: 0,"conType","GPRS0"
^SICS: 0,"alphabet","0"
^SICS: 0,"inactTO","20"
^SICS: 0,"user",""
^SICS: 0,"passwd","*****"
^SICS: 0,"apn","ibox.tim.it"
^SICS: 1,"conType",""
^SICS: 2,"conType",""
^SICS: 3,"conType",""
^SICS: 4,"conType",""
^SICS: 5,"conType",""
OK
at^siss=0,srvType,"HTTP"
OK
at^siss=0,conId,"0"
OK
at^siss=0,hcMethod,0
OK
at^siss=0,address,http://enricorossi.org/testdata?t=22.7&h=69&d=n&w=7.2
OK
at^siso=0
OK
at^sisr=0,1500
ERROR
at^sisi?
^SISI: 0,6,0,0,0,0
OK
at^sise=0
^SISE: 0,201,"HTTP/1.1 404 Not Found"
OK
at^sise=0
^SISE: 0,201,"HTTP/1.1 404 Not Found"
OK
at^sisc=0
OK
On the web server log I see:
176.201.9.139 - - [06/Oct/2013:12:39:03 +0200] "GET /testdata?t=22.7&h=69&d=n&w=7.2 HTTP/1.1" 404 528 "-" "MC75/4.1"