REST with ESP8266
Posted: Mon Aug 31, 2015 7:21 am
Hi
I am struggling and on the breach to surrender, but before i will give the forum a go and see if someone can give me some guidance to success.
I am about to send a bool variable to my SwitchKing REST server.
When i use my webbrowser it works 100% and also when i use Tasker it work flawless.
But i am not able to get ESP8266 to do as i like.
Working with ESP8266 on Serial to RealTerm 9600/8N1
When i am sending the command over the Webbrowser or Tasker the command is
192.168.0.230:9876/datasources/20/addvalue?value=0
(I use HW reset on ESP8266)
AT+GMR // Get FW version
00200.9.5(b1)
AT+CWMODE=1 // End station only
OK
AT+CIPMUX=0 // Single connection
OK
AT+CWJAP="MYSSID";"MYPASSCODE" // Join Wifinetwork and get IP/no from DHCP server
OK
AT+CIPSTART"TCP,"192.168.0.230",9876 //Local IP and Port to my Rest SK Server
CONNECT
OK
AT+CIPSEND=(no of chars to send)
>
Until this point it behaves as predicted
But i do think i get the string wrong when i try to enter in best cases i get respons "OK" but nothing happens, most of time i get +IPD,490:HTTP/1.1 400 Bad Request
I think (wrongly of course since it´s not working) that this string would be correct
AT+CIPSEND=79
>GET /datasources/20/addvalue?value=1 HTTP/1.0\r\nHost: 192.168.0.230\n\r\n\r\n\r
Can anyone pls help me out of my misery.
I am struggling and on the breach to surrender, but before i will give the forum a go and see if someone can give me some guidance to success.
I am about to send a bool variable to my SwitchKing REST server.
When i use my webbrowser it works 100% and also when i use Tasker it work flawless.
But i am not able to get ESP8266 to do as i like.
Working with ESP8266 on Serial to RealTerm 9600/8N1
When i am sending the command over the Webbrowser or Tasker the command is
192.168.0.230:9876/datasources/20/addvalue?value=0
(I use HW reset on ESP8266)
AT+GMR // Get FW version
00200.9.5(b1)
AT+CWMODE=1 // End station only
OK
AT+CIPMUX=0 // Single connection
OK
AT+CWJAP="MYSSID";"MYPASSCODE" // Join Wifinetwork and get IP/no from DHCP server
OK
AT+CIPSTART"TCP,"192.168.0.230",9876 //Local IP and Port to my Rest SK Server
CONNECT
OK
AT+CIPSEND=(no of chars to send)
>
Until this point it behaves as predicted
But i do think i get the string wrong when i try to enter in best cases i get respons "OK" but nothing happens, most of time i get +IPD,490:HTTP/1.1 400 Bad Request
I think (wrongly of course since it´s not working) that this string would be correct
AT+CIPSEND=79
>GET /datasources/20/addvalue?value=1 HTTP/1.0\r\nHost: 192.168.0.230\n\r\n\r\n\r
Can anyone pls help me out of my misery.