Chat freely about anything...

User avatar
By toffie
#5787 martinayotte
Thanks for the reply!
Code: Select allGET /esp.php?value1=3 HTTP/1.1\r\nHost: www.swemod.com\r\n\r\n

That code locks up my server I'm afraid..


villTech
Thanks for your reply and thanks for trying to help me! I'm really lost around all this :)

When I connect with Telnet to the server and write everything like you do, then it works. Really strange, when I tried Telnet the other days the connection got locked up straight away when I connected to the server. So that works today, heh strange :)

Great, now I know your IP address, so I can really see that it has worked. Thanks for that!

I tried with the following sequence;
Code: Select allAT+CIPSTART="TCP","WWW.SWEMOD.COM",80
AT+CIPSEND=46
GET http://www.swemod.com/esp.php?value1=1\r\n

I only included one set of \r\n as my terminal already send one set of \r\n, which makes it two.

That doesn't lock the server, but I dont get any response and no update in the database. Here's the log;
Code: Select allAT
OK

AT+GMR
0018000902-AI03
OK

AT+CIFSR
192.168.1.228
OK

AT+CIPSTART="TCP","WWW.SWEMOD.COM",80
OK
Linked

AT+CIPSEND=46
> GET http://www.swemod.com/esp.php?value1=1\r\n

busy s...
SEND OK

OK
Unlink


If I instead try the following sequence;
Code: Select allAT+CIPSTART="TCP","WWW.SWEMOD.COM",80
AT+CIPSEND=46
GET http://www.swemod.com/esp.php?value1=1

And just press "Send" twice after the last line, which means my terminal window send two sets of \r\n .. then my server gets locked up and I dont get any response.

If I disable CR LF in my terminal window and just try and send \r\n myself, that doesn't work at all. The module doesn't understand that.


SCREW THIS!
I got it to work... I think I might have sent one CR LF too much and that locked up my connection.. But if I send exactly 2 CR LF as you say, then it works with the following sequence;
Code: Select allAT+CIPSTART="TCP","WWW.SWEMOD.COM",80
AT+CIPSEND=46
GET http://www.swemod.com/esp.php?value1=8

And then after that I press SEND twice after to send two sets of \r\n / CR LF

Now it works perfectly fine.. I dont understand.. I've kept a personal log for all the tried I've done to see if I've done something in the past for the ESP8266 and I've almost done this before, but not exactly apparently.. But now it works.. I can update the database through the page via the ESP8266 module.. It's AMAZING!! :D

But don't worry I will certainly come back with other errors or questions soon, apart from all the problems I love these modules.. AND I really appreciate all your help both villTech but also all you others who have given your time to test and try and help me out. I really appreciate it! :)

THANK YOU! :)
User avatar
By martinayotte
#5788
toffie wrote:martinayotte
Thanks for the reply!
Code: Select allGET /esp.php?value1=3 HTTP/1.1\r\nHost: www.swemod.com\r\n\r\n

That code locks up my server I'm afraid..


Oupps ! I forgot to remove the \r\n while doing copy/paste ...
It should be :
Code: Select allGET /esp.php?value1=3 HTTP/1.1 Host: www.swemod.com\r\n\r\n
User avatar
By toffie
#5793 martinayotte
Code: Select allGET /esp.php?value1=3 HTTP/1.1 Host: www.swemod.com\r\n\r\n

Tried that just now, didn't work either I'm afraid. If you don't mind, would you try that out if you can?

It would be great to know if it works for you, then I could investigate further perhaps and see why it works for you but not for me. But if it doesn't work for you, then it must be something with the server right?

I've been thinking, could it be that my server is very restrictive with connections? I have no idea, but it's a thought :)
User avatar
By martinayotte
#5841 Hi toffie,

I got success trying to connect to your server using a small python script which sends the proper AT command to my ESP.
Here is the output received from your server :
Code: Select allHTTP/1.1 200 OK
Date: Sun, 28 Dec 2014 21:28:02 GMT
Server: Apache/2.2.22 (Debian)
X-Powered-By: PHP/5.4.4-14+deb7u10
Vary: Accept-Encoding
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
 
4
TACK
0



I've done the same with a telnet, and response was the same.