0

I have my web application whose get data from endpoint: ip/update/param1/param2. It's work when I enter url in my broswer. But I want to do this with arduino using esp 01s. I have send data with arduino to thingspeak serwer but now I want send this to my serwer

monitor.println("AT+CIPMUX=1");
monitor.println("AT+CIPSTART=0\"TCP\",\"ip\",80");
monitor.println("AT+CIPSEND=0" + String(lon));
monitor.println(command);
monitor.println("AT+CIPCLOSE");

Up is how i send data and where command and lon are:

String command = "GET http://ip/update/10/12/";
command += "\n\r\n\r";
short lon = command.length() + 3;

But this isn't work and I can't find how do this.

EDIT I want to try manualny send data to my endpoint but it dosen't work. I write these commands:

AT+CIPMUX=1

OK
AT+CWMODE=1

OK
AT+CWJAP="name","password"

OK
AT+CIPSTART=0,"TCP","vps_ip",80
0,CONNECT

OK
AT+CIPSEND=0,76
> GET vps_ip/update/15/50busy s...

SEND OK
AT+CIPCLOSE 

MUX=1

When I paste this in my broswer vps_ip/update/15/50 it works. Maybe this is another reason?

Isild
  • 107
  • 1
  • 11
  • 1
    put a , after the linkId in both commands. after every command you must wait for confirmation or error before sending the next command. to send data you must wait for a prompt `>`. why +3? – Juraj Dec 08 '19 at 10:12
  • I add this but still dont work. Add some new info in EDIT – Isild Dec 08 '19 at 20:47
  • the HTTP protocol requires `GET HTTP/1.1\r\nHost: \r\n\r\n`. but you can't send the new line characters \r and \n from Serial Monitor – Juraj Dec 08 '19 at 21:06
  • You cannot just send the commands. You [must **read** and **parse** the responses received from the modem](https://stackoverflow.com/a/33266839/23118) as well. – hlovdal Jan 26 '20 at 19:26

0 Answers0