Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] SIM900 GPRS POST/GET Return data - Days spent trying to resolve!

Status
Not open for further replies.

davek17

Newbie level 3
Joined
May 2, 2012
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Liverpool, UK
Activity points
1,318
Hi There

I have read pretty much every post about this on here, read the manual, talked to Arduino people and this is driving me crazy. I really hope someone can help.

I can do pretty much everything with the SIM900 and at the moment i'm just using Terminal v1.19b to talk to it through serial, throwing AT commands merrily to the SIM, connected to an arduino Uno.

The problem is that I can't get any data back from a POST or GET to a server. Even the simple Google and Yahoo examples give me the SEND OK.....CLOSED scenario.

I have checked for the CRLF format that I know some servers can be fussy about, and I have triple checked my vodafone SIM card works in a PDA and of course using the AT+CIPSTATUS and AT+CIFSR to check the connection and IP address are there. I can put the card in a PDA and it will browse to google.co.uk etc too.

I simply cannot get the card to get any return data.

My next job will be to write my own webs ervice, stick a DB behind it and check if the card is sending data but I really feel like the simple exmaples to google/yahoo not working are showing something fundamentally wrong with my code. My sequence of AT commands are below (I know half of the below is not needed but its complete):

AT+CPIN?
AT+CSQ
AT+CREG?
AT+CGATT?
AT+CGDCONT=1, "IP", "pp.vodafone.co.uk"
AT+CSTT="pp.vodafone.co.uk", "web", "web"
AT+CIICR
AT+CIFSR
AT+CIPSTART="TCP","http://www.google.com","80"
AT+CIPHEAD=1
AT+CIPSEND

GET / HTTP/1.1
Host: https://www.google.com
Connection: Keep-Alive
Accept: */*
Accept-Language: en-us

All the above has a CR + LF at the end of each line. I then finsih with another CRLF then send a $1A (Ctrl-Z) to complete the GET.

I get a SEND OK, and about 30 seconds later I get CLOSED. No data returned.

If I send an incorrectly formatted GET then I get an error so I must be connecting to the server.

I am really flummoxed, days over my original schedule to get this working and any help would be greatly received.

Davek17
 

OK, I foinally got this working. I ended up building my own webservice in .NET and enmabling it to use GET and POST.

So far I have finally got the "GET" working and I have a DB populating from values being passed from the arduino through the SIM900, error codes and all!

I will try a POST later and if anyone's interested i'll put the code here, no problem.
 

@davek17
I am in the same boat, I am connecting to my server and getting the http response, but I have not yet figured out how to send the correctly formatted HTTP GET command, I am passing 3 pieces of data to the server, can you share how you were able to get your HTTP GET command to work and maybe even the web page that you used to collect the data, I have a php page running on apache on port 9003, I can connect to the page and send data but I get a response back when I try to send the GET to my page.. The error is coming back from my server so I know I am talking to it, but I want to pass the ID, Latitude, Longitude to my web page so that it will inject it into the database. If I hit my page with a browser and put this in the URL it will log the data to the database: **broken link removed**
Can you share how you got your SIM900 to send the correct HTTP GET ?

Thanks!! I really appreciate it..
 

Hi There

I'll definitley post my code as soon as I have it completed. BTW the main issue here was actually not the Arduino C code, it was the Webservice being used. My webservice was not set-up to use a GET, as soon as I altered this in the .NET code it worked a treat!

I am getting and posting with ease now.

I am just working out how to get the IMEI number now, I know its AT+GMR but it's very odd the way it streams through.
 

OK, I foinally got this working. I ended up building my own webservice in .NET and enmabling it to use GET and POST.

So far I have finally got the "GET" working and I have a DB populating from values being passed from the arduino through the SIM900, error codes and all!

I will try a POST later and if anyone's interested i'll put the code here, no problem.


Can you post your code?
my problem is´nt the webservice but the schetch code to access it.
i´m using an GBoard 1.0 (that include SIM900 on board) with Software UART, and i´m expecting some trouble with used Lib.

Thank´s.
 

OK, I foinally got this working. I ended up building my own webservice in .NET and enmabling it to use GET and POST.

So far I have finally got the "GET" working and I have a DB populating from values being passed from the arduino through the SIM900, error codes and all!

I will try a POST later and if anyone's interested i'll put the code here, no problem.

I've just started working with SIM900. I have to send data from one GSM module to another, but i don't know how to proceed. I've been able to send a msg from it. Please could you help me with the code. Its urgent to run it. Its for a project. Thanks
 

Where is the code ???
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top