Chat freely about anything...

User avatar
By kn-user
#25956 Hey everyone! I'm trying to send data to my server on http://www.000webhost.com.
I followed this tutorial on youtube https://www.youtube.com/watch?v=q02f4sPghSo

I'm having troubles with sending the data. I get SEND OK feedback from the esp8266 but nothing is happening on the server.
I'm using a serial terminal
Code: Select allAT+RST


OK
ÿ8—þ8ŸŽ þ‚‚ƒ‡Š–Š‹ú$‡.(‚žŽŽûx–�‡8‚‹ƒ�2Žþ
Ai-Thinker Technology Co. Ltd.

ready
AT+GMR

AT version:0.21.0.0
SDK version:0.9.5

OK
AT+CWMODE?

+CWMODE:3

OK
AT+CIPMUX?

+CIPMUX:0

OK
AT+CIFSR

+CIFSR:APIP,"192.168.4.1"
+CIFSR:APMAC,"1a:fe:34:9d:0f:57"
+CIFSR:STAIP,"192.168.0.233"
+CIFSR:STAMAC,"18:fe:34:9d:0f:57"

OK
AT+CIPSTART="TCP","sugerapp-kn.herobo.com",80

CONNECT

OK
AT+CIPSEND=80


OK
> GET /SugarAppV1/esp8266.php?waarde=80 HTTP/1.1\r\nHost: sugerapp-kn.herobo.com\r\n\r\n
busy s...

SEND OK
AT+CIPCLOSE

CLOSED

OK


On the server i have a simple php script to print out the variable:
Code: Select all<?php
   $var = $_GET['waarde'];
   echo $var;
?>


I have tried POST en GET methods with several AT firmware version but nothings seems to work.
Maybe something is wrong with my GET request or am i missing somthing?
Any help would be appreciated!
User avatar
By kenkawakenkenke
#27880 Any luck here? I'm seeing exactly the same thing.
Setting ESP8266 in AP mode and using as a server works perfectly fine.

I get problems when I try to connect from ESP8266 to an external server.
I'm trying to connect to a local server running at 10.0.1.13 on my PC (on the same network as the one ESP8266 is connected to).

Code: Select all>AT+CWMODE=1
OK

>AT+RST
...
ready
WIFI CONNECTED
WIFI GOT IP

>AT+CIFSR

+CIFSR:STAIP,"10.0.1.11"
+CIFSR:STAMAC,"..."

OK

>AT+CIPSTART="TCP","10.0.1.13",8080
CONNECT

OK

>AT+CIPSEND=31

OK

> GET / HTTP/1.1\r\nHost: 10.0.1.11\r\n\r\n

busy s...

Recv 31 bytes

SEND OK
CLOSED


But I don't see any responses from the server, and nothing is logged on the server side.
tcpdump also shows that there are actually no packets sent from 10.0.1.11(ESP8266) to 10.0.1.13(server).
Again, setting ESP8266 in server mode and connecting from 10.0.1.13(PC) to 10.0.1.11(ESP8266) works perfectly well.
What could be the problem?