Data transfer between GPRS modem and Remote server

Status
Not open for further replies.
Re: gprs server

How can i know the ip assigned to my module?

---------- Post added at 08:35 AM ---------- Previous post was at 07:58 AM ----------

AT+CIPSTATUS

OK

STATE: PDP DEACT
tHIS IS WHAT iAM GETTING.what MAY BE THE REASON?
 

once i configure modem as a server, then the web browser asks for a web page which i plan to store on a micro controller . if anyone has done something like that please let me know ???????
 

I want help about cipsend command and in hyper terminal what should I do after that line
GET /HTTP/1.1

when I hit enter for cr it response SEND OK when I use ^m^j and ctrl-z and ^m^j^z and ctrl -z t RESPONSE : SEND OK
BUT NO DATA or something not return

I am not clear about CDNSCFG COMMAND may I problem is here I can't find dns number
BEST REGARDS

UGUR
 
Last edited:

sim300 GPRS modem send data to remote server using 8051 microcontroller
is working c code pls check the bellow link..
#include<string.h>
#include<reg51.h>
unsigned char x=0,i,g[20];
unsigned char s1[9]="AT\r\n"; //send "AT" command modem will response
unsigned char s2[18]="AT+CIPMODE=0\r\n";//Select TCPIP Application mode
unsigned char s3[30]="AT+CLPORT=\"UDP\",\"3500\"\r\n"; //set Local Port
unsigned char s4[45]="AT+CIPCSGP=1,\"airtelgprs.com\"\r\n";//set csd or GPRS for Connection mode "ur GPRS provide address"
unsigned char s5[15]="AT+CSTT\r";//Start Task and set apn
unsigned char s6[15]="AT+CIICR\r";//Bring up wireless connection with GPRS or CSD
unsigned char s7[15]="AT+CIFSR\r"; // Get Local Ip Address "is assign for GPRS Modem"
code unsigned char s8[50]="AT+CIPSTART=\"UDP\",\"219.64.118.125\",\"3500\"\r\n"; // Start Up TCP or Udp Connection
unsigned char s9[15]="AT+CIPSEND\r\n"; //Send Datat Through TCP or UDP Connection
unsigned char sd[46]="193308950\r\n"; // This is the Example Data Send through GPRS Modem



Embed4u » Code Library
 
so many thanks that is give me an idea but I have problems to read sim900 replys for example

I want to do this like that :

Code:
void main ()
{
.
.
.
.
      while(buff_rx[buff_rx_adr]!='\0')
     {
      lcd_show(buf_rx[buff_rx_adr]);
      buff_adr++;
       }
}
static void interrupt Kesme(void)
	{
		
		if(RCIF)
		{
		buff_rx[buff_rx_adr]=RCREG;
		paket_ok=0;
		paket_coming=1;
		GSM=1;
		buff_rx_adr++;
		TMR1H=250;
		TMR1IF=0;
		}


can you help me with this ?
 

Hi
I use This at command

AT+CDNSORIP=1
at+cipstart="TCP","gpstracking.somee.com","80"
at+cipsend
get /default.asp?=test HTTP/1.1
Host: gpstracking.somee.com
Connection: Keep-Alive
Accept: */*

but i get this error what is the Wrong?

SEND OK
HTTP/1.1 400 Bad Request
Content-Type: text/html
Date: Sat, 23 Oct 2010 18:32:01 GMT
Connection: close
Content-Length: 20

<h1>Bad Request</h1>
CLOSED

urgent Help appreciated
 

Firstly you should use this

at+cipstart="TCP","www.gpstracking.somee.com","80"
OK

CONNECT OK

at+cipsend
> GET **broken link removed**(CR)(LF)
Connection:Keep-Alive(CR)(LF)
(CR)(LF)(ctrl+z)


then you got your html page

if you fail at your first try plz try my code again for 2 or tree 3 times.
 

Hi
Thanks to your Reply,I use This At so many times and the resault is the Same as before.


AT+CDNSORIP=1
OK
at+cipstart="TCP","www.gpstracking.somee.com","80"
OK

CONNECT OK
at+cipsend
>GET **broken link removed**)
Connection:Keep-Alive(CR)(LF)
(CR)(LF)
CTRL+Z


resault is The same before:

SEND OK
HTTP/1.1 400 Bad Request
Content-Type: text/html
Date: Tue, 26 Oct 2010 12:12:26 GMT
Connection: close
Content-Length: 20

<h1>Bad Request</h1>
CLOSED


and some times when i send

AT+CDNSORIP=1
OK
at+cipstart="TCP","www.gpstracking.somee.com","80"
OK

CONNECT OK
at+cipsend
>GET **broken link removed**)
(CR)(LF)
CTRL+Z


resault is :

SEND OK


but no data add to my text file in this address
**broken link removed**

my asp page that i put in server with default.asp (**broken link removed**) name have below code and when get data write it to logdata.txt file on the server when i use with Internet explorer or Any explorer Data add but wit my modem when i send the
GET http://www.gpstracking.somee.com/default.asp?data=12(CR)(LF)
(CR)(LF)
ctrl+z
I have an error that i say in above or say data send without any Error, but no data add to my file.

my asp page code is:

<%@ LANGUAGE=VBSCRIPT %>
<% Option Explicit%>

<%

If Err.Number <> 0 then
Response.Write(Err.Description)
Error.Clear
End If

Dim data_string, file_System, file_path, file

data_string = Request.QueryString("Data")

if data_string <> "" then
Set file_System = CreateObject("Scripting.FileSystemObject")
file_path = Server.MapPath("Data\LogData.txt")
Set file = file_System.OpenTextFile(file_path, 8, True)
file.WriteLine (data_string & vbCrLf)
file.Close
Set file = Nothing
Set file_System = Nothing
response.write("OK")
else
response.write("No Data")
end if
%>
 
Last edited:

hi farshchian
firstly
try without
AT+CDNSORIP=1
OK

and when you do a connection to an web adress or you got an error mesaage you should use this

AT+CIPSHUT (this depends on which gsm modem you are using)
OK
I mean every trying of your codes build a connection between you and web adress although it fails you should shut it with that command above.
Be sure about your host adress and if you are not sure you dont have to use Host:www.blabla.com line its directly goto your referenced adress.

and if you use hyper terminal for automatic CR LF AT THE end of each line try this : file/properties/settings/ASCII SETUP/Send line ends with line feeds

if these are not helped I am here for your questions

good luck


and if you fail again
AT+CGDCONT=1,"IP","apn"
apn is yours providers access point name maybe there is a problem

but if you connect your site and you see something like that



<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>405 Method
Not Allowed</title>
</head><body>
<h1>Method Not Allowed</h1>
<p>The requested meth
od is not allowed for the URL /blabla.html.</p>
<hr>
<address>Apache/2.2.9 (Debi
an) PHP/5.2.6-1+lenny9 with Suhosin-Patch mod_ssl/2.2.9 OpenSSL/0.9.8g Server at
www.blabla.com Port 80</address>
</body></html>

CLOSED

------------------

OR

------------------------
at+cipsend
> GET **broken link removed**)
Connection:Keep-Alive(CR)(LF)
(CR)(LF)(CTRL+Z)
SEND OK
<html>
<head>
</head>
<body>
hello this is a TEXT page
</body>
</html>
CLOSED



that means you could connect to internet but the problem is at your web page maybe because of asp

good luck waiting for your reply that is interested me.
 
Last edited:

Hi izwirlee_35
before i Do the automatic CR+LF Setting but the problem exict, right now when i use
GET **broken link removed** /HTTP1.1
I have Problem as before but when i use like below
GET **broken link removed**
it's ok and i can add data to my log file, in any website and help file said /HTTP1.1 neded,It's Strange to me.see here(http://www.w3.org/Protocols/rfc2068/rfc2068)
Right now i am tring to send data in transparent mode but itsn't ok also when i use Connection: Keep-Alive after data sending connection is closed and i restart it. do you have any Idia espaesialy for Transparent Mode beacause i want send Data every 5 seceneds to my logdata.txt file or any sql database in next.
Thanks your Kindly Reply
 
Last edited:

Yes farshchian you are right its been said about /HTTP1.1 but I tried many times and best answer is HTTP ERROR 404. and I decided to not to use it.
and it worked as you did.
if we would talk about transparent mode in my search and knowledge it's used for bigger than 1024kb data transfeR. and I used it a bit but I cant achieve to this commands I am to study about them (at+cipmode ,at+cipccfg) transparent mode is necessary for me too but if your data is smaller than 1024kbyte and if you send data in every 5 minutes you dont have to use transparent mode I think.

good luck
 

Hi izwirlee_35
Thanks your Attention, I need Send Some GPS protocol DATA Such as GPGGA and some Other data Like MAchine ID to Remote Server Every 5 Seconds not minute.Ok i am trying to do with normal mode.
Thanks alot
 

Now suppose I want to transfer file using FTP then what changes will I have to make??
 


while writing this code i got got OK response from my hyperterminal
but after entering at+cipmux? i am getting error
what should i do to get proper response
 



can any one tel me , where the data has been sent?
i mean to which GPRS(or mail) he has sent the data ?
 

I need help on the Q24l002 module:
I am getting these errors:
AT
OK
AT+CGREG?
+CGREG: 1,1

OK
AT+CGATT?
+CGATT: 1

OK
AT+CSTT="browse","",""
ERROR
AT+CIICR
ERROR
AT+CIPSTART=?
ERROR

AT+CIPSTART="TCP","74.125.79.83","80"
ERROR


The CSTT, CICR and the CIPSTART are not in the AT commands provided me.
Please check for me.

This show version
AT+WCDM=?
+WCDM: (0-10),(0-1)

OK
AT+WSSW
C57b09gg.Q2786F 0006006CAF5DC7FF

OK

but I get IP from the Provider:

AT+CGPADDR=?
+CGPADDR: (1,2)

OK

AT+CGPADDR=1,"107.210.5.4"
+CGPADDR: 1,"10.43.238.148" /////ip from the network

AT+CGPADDR
+CGPADDR: 1,"10.43.238.148"
+CGPADDR: 2,

Any ideas
Thanks
 

nice code thx a lot but until here I do get without any problem:
> pasv

then when the server does deliver me the passive mode IP and port I cant connect with:
AT+CIPSTART=1,"TCP","205.234.235.188",37203
it tells me that I'm already connected. if I disconnect and try with this IP again it still can't connect...

what could the problem be?
 

Re: gprs server

Until the following Commands , Everything was great.

>> AT+CIPSEND - Issue Send Command
<< > - wait for module to return'>' to indicate it's ready to receive data
>> GET / HTTP/1.1 - Send data - this example is an HTTP request for the default page
>> Host: Google
>> Connection: Keep-Alive
>> Accept: */*
>> Accept-Language: en-us
>>
<< data from server returned - Server will return data here
[/code][/QUOTE]

Of course Gave the following error for this command:
at+cdnscfg="208.67.222.222","208.67.220.220"
and
at+cdnsorip=1
What should I do now?
i have sim900.
Is it possible this happens because this is sim900?

please help me...
 

    V

    Points: 2
    Helpful Answer Positive Rating
hi everybody,

i have getting more ideas from this forum regarding GPRS.
i am interested in doing a web data logger using simcom340c GPRS modem.

i am using the following commands to send data from my modem.i am using vodafone sim.

AT
AT+CGATT=1
AT&D1
AT+CGDCONT=1,"IP","portalnmms"
AT+CSTT="portalnmms","username","password"
AT+CDNSORIP=0
AT+CIICR
AT+CIFSR
AT+CIPSTART="TCP',"10.10.1.100","9401"
AT+CIPSEND
> data to send

this above steps work well.
now i want to know how to get the data from the ip 10.10.1.100.
and i also want to know how can i send data from the ip 10.10.1.100 to my gprs modem.
 
Reactions: rafati

    rafati

    Points: 2
    Helpful Answer Positive Rating
Hello vairamani
if this ip(10.10.1.100) is also for gprs modem , you can add AT+CIPSERVER=1,"PORT NUMBER" BEFORE AT+CIFSR .
AND you can send data from server to this modem with same command.

but if this ip isnt gprs modem , i dont know how can do that work.
if you can please tell me.

thanks
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…