Chat freely about anything...

User avatar
By DANBnz
#39401 I have successfully managed to set up my esp8266 and it is connected to my wifi, however I am having difficulty successfully posting data to the sparkfun server.

I'm just using the serial monitor on the arduino IDE to manually send the following commands, and it replies to each : see attached screenshot. Once I have achieved success I would make an arduino programme. I am just unable to get past this point.

Code: Select all//set multiple connections
AT+CIPMUX=1

//open tcp connection
AT+CIPSTART=4,"TCP","54.86.132.254",80

//send number of characters characters
AT+CIPSEND=4,95

//push data
GET /input/<publickey>?private_key=<privatekey>&flow=30.00&temp=45.00 HTTP/1.1

//close connection
AT+CIPCLOSE=4



Now, I have spent a couple of days trying different things but my sparkfun stream still has nothing in it from my arduino.

Please help :) thanks,
Attachments
Capture.PNG
screenshot of the serial monitor output from the esp8266
Capture.PNG (7.23 KiB) Viewed 2288 times
User avatar
By DANBnz
#39412 Solved it.

Set the number of characters to 151,

Sent the below:
GET /input/XXXXXXXXXXXXX?private_key=XXXXXXXXXXX&flow=60.00&temp=15.00 HTTP/1.1\r\nHost: data.sparkfun.com\r\nConnection: close\r\n

Hit the serial monitor/console send button several times until the following displayed :D :

SEND OK

+IPD,4,455:HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET,POST,DELETE
Access-Control-Allow-Headers: X-Requested-With, Phant-Private-Key
Content-Type: text/plain
X-Rate-Limit-Limit: 300
X-Rate-Limit-Remaining: 298
X-Rate-Limit-Reset: 1453434907.992
Date: Fri, 22 Jan 2016 03:47:28 GMT
Set-Cookie: SERVERID=; Expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/
Cache-Control: private
Transfer-Encoding: chunked

a
1 success