2016-03-16 08:03 AM
Hi All,
For my project i am using SPMW01SA WiFi module and still we are in development stage so we are doing our R&D on STEVAL-IDI004v2 evaluation board.STEVAL-IDI004v2 board WiFi is able to connect to internet and when we are trying to send sensor data to cloud WiFi module is responding back with arguments are missing. Our cloud is expecting data in JSON format and HTTP post method.Can anyone please help me on this.Regards,--Manz #https://my.st.com/public/ste2eco2016-03-29 08:00 AM
Hi J,
now, the page accepts the length information. I had to add HTTPS/1.1 in the first line: POST /gcm/send HTTPS/1.1 Also I didn't tell, when the header ends. This is done by adding \r\n\r\n Now I get a bad request answer, so something is still not working but I hope to solve this (this year ;-)) I will post some code in the GCM topic.. Thx & cheers, Flow2016-03-30 01:39 AM
Flow,
Minimal HTTP request MUSTinclude some required fields:GET / HTTP/1.1
Host: www.example.com
Connection: close
HTTP version (1.1 here), and CrLfCrLf (2x) at the end, are mandatory.
For your final step I suggest:
- open a socket server on a PC (e.g.: nc -l 80)
- use your tool to connect to this ''fake'' webserver
You'll find on console how the request is formatted.
Copy whole string inside HTTPREQ payload, and should be working.
Bye
j
2016-04-06 10:25 PM
Hi Gerry,
I get it... I had to addHost: www.example.com
and use HTTP/1.1 instead of HTTPS/1.1
I will provide the example in the Android GCM thread.
Thank you for your support.
Regards,
Flow
2016-04-06 11:19 PM
Hi Flow,
As far as I know,
HTTPS/1.1 is wrong. Means nothing.The HTTP request is totally independent of the TLS encryption.
Both HTTP and HTTPS begins with a TCP connection setup. When webserver receive a TCP connection request, it will request certificates to remote host. Then, after connection is created, ''strings'' are automatically encrypted/decrypted.So, ''GET HTTP/1.1'' will be an HTTPS GET.Minimal HTTP GET request MUST be well formattedHope it's clear.Ciaoj