My application performs an HTTP post with the following WIPSoft AT commands:
// create a client connection to the server. note the port number is 80 for http
// post the data
// when the post is done, leave data mode and close the socket
Sorry, but I cannot include the responses to the commands above. (That system has gone live in the mean time, and I might get executed without trail if I start posting test data to it)
The app uploads data to a server using HTTP GET. I was rather confused when the suppliers gave my this solution to upload my data, but it seemed to do the trick. The problem with this method is that I have to leave Data Mode after each GET; this becomes very time consuming and is not an option when you have dozens of records to upload.
[SOLUTION] Forgive me for reviving such an old thread, but I have struggled with this for several hours now and couldn’t find any decent references for doing an HTTP POST without embedding the POST data in the URL.
Here is what I believe to be a better approach. There is no such example in any official documentation I could find, but it seems to work. I added the solution here for future reference, as this is the first relevant page I found during my own search.
Start IP Stack
Open GPRS bearer
Set APN (replace “internet” with your APN)
Start GPRS bearer
Connect TCP socket to remote server on port 80 in HTTP mode (substitute your URL, but you can use httpbin.org for testing)
+WIPREADY 5, 1
Do HTTP POST (adjust the content type, content length and other header data to suit your needs)
(NB: Now the modem is in data mode and does not echo bytes sent over UART)