Sim908 http post send data

Status
Not open for further replies.

qwertycoolguy

Member level 2
Joined
Aug 14, 2014
Messages
42
Helped
0
Reputation
2
Reaction score
0
Trophy points
6
Activity points
329
Dear Forum,

I want to send data to my webserver at http://108.167.133.20/.../index.php via a POST .

I understand how to send data through GET. I did it as follows.

AT+SAPBR was already configured!
so ,
AT+HTTPINIT

AT+HTTPPARA="CID",1

AT+HTTPPARA="URL","http://108.167.133.20/.../index.php"

AT+HTTPACTION=0

AT+HTTPREAD=1,100000

and I nicely read the response my server echoed.

But how should I now insert some data to the server via POST.

I would be so much grateful if someone can tell me a sequence of commands.

- - - Updated - - -

Can SIM908 send data using POST method at all? Im starting to have doubts now.
 

I believe the link is broken. could you please reheck?
 

I believe the answer chosen on that forum is wrong. SIMCom has TCP/IP embedded on all their devices.
We can easily type the "IP address destination" "PORT" "DATA" and expect the packet to be delivered via TCP/IP protocol NOT via IP protocol as mentioned in the answer.

I am interested in understanding how I can send POST data through SIM908. The AT command available

AT+HTTPACTION=1 not 0 (which is for get)

and AT+HTTPDATA is really really confusing and no matter how hard I try, I cannot seem to understand the meaning of both of them.

However,

If I use the sequence,

AT+ SAPBR = 1,1 (I have my gps profile already saved in sim908 with APN set to "PPWAP")
AT+HTTPPARA="URL","www.url.com/index.php"
AT+HTTPACTION=0
(now sim908 tells me how much bytes downloaded from the website through GET method)
AT+HTTPREAD=1,1000 ( read the first 1000 charators on downloaded from the website)

now this is using GET Method. I want to use POST. which SIM908 data sheet claims can be done using the command

AT+HTTPACTION=1

but when i do the same sequence using that command, I get some garbage values.

makes me think.. is there a method to download? a webpages content using POST method?
 

[Moved]SIM908 mwaning of AT+HTTPDATA command?

I am a SIM908 user and I do not understand the meaning of the command
AT+HTTPDATA.

Can someone please explain to me in what sort of a context it can be used with an example? it would help me a lot.

thank you.
 
Last edited by a moderator:

Fortunately I'm no SIMCOM user, so I don't suffer from their "virtuosity" to spill important informations over a number of different documents.

Having said this, it should be clear that my knowledge is from pure reading.

As far as I see, the expected procedure with HTTP POST is clearly explained in the FTP HTTP AT Commands User Guide. "Example HTTP POST method".

Essentially, you'll send the data with HTTPDATA and then execute HTTPACTION=1.
 
well thank you so much! fvm! thanks! I would have never looked at that document! this is so funny. Im actually thinking of leaving SIM com. I think they are really good. but any electronic company is as good as their documentation is my view. I may be wrong. but thats my openion. feel free to correct me if you think I am wrong.

I am still laughing out loud!! I cant believe POST method is included in the ftp manuel.

- - - Updated - - -

well that example is also in the AT Command manual v1.1. I was expecting a better one.

but the problem is using POST method I need to SEND data. not DOWNLOAD any data. this example doesnt have anyplace for me to place the POST data I need to send to the server.

- - - Updated - - -

Can you please tell me the GSM IC you're using? if not what would you recommend?
 

Hi qwertycoolguy

I'm not done with sim900' Post method to send data yet , and i'm working on it
but I'm sure you can send your data with sim900's GET method .

do this :
.
.
.

HTTPPARA="URL","HTTP://YOURDOMAIN/your_php_page.php?yourdata=XXX"
HTTPACTION=0 (Select GET Method)

in this method , the data is included in the url . you need just a correct php code to receive the data in your server .


I'v tested this Method and it works

this thread below will help you a lot . take a look at it :

https://www.edaboard.com/threads/281314/
 
Actually I already know this method. SIM908 data sheet mentions HTTPACTION can be made =1 to POST the data. but there is no record how is can be done.
 

Since you have received help here why not post your solution so all can benefit.

Cheers.
 
To add a short notice.

Edaboard forum rules don't want the thread discussion to be redirected to private channels. Saying "I solved the problem but don't say how" is a disregard of forum members who previously contributed to the discussion. It also witholds others a chance to learn.

It may be inpractical in some cases to post the full problem solution, but you should at least report the basic idea.
 

I did it. If anyones interested, contact me.

Hello, i am simon, from indonesia.. i interested with the project you have done.

my project is using sim5320 to send a ASCII byte streaming from camera into HTTP server via atmega128.

maybe you can help me how to do it. Thanks before
 

[Originally Posted by qwertycoolguy

I did it. If anyones interested, contact me.]


Hi qwertycoolguy ,


I also have the same problem with HTTP POST method in SIM800. Kindly send me the solution for this.

Thanks in advance

Regards,

sathshya.
 

I did it. If anyones interested, contact me.

Hi qwertycoolguy

Please can you post your solution here, I have completed the GET method which is not secure, but need to use the POST method using HTTPDATA & HTTPACTION=1.
 

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