2015-04-29 12:26 AM
Hi,
I'm trying to use custom socket with two SPWF01SA, but I'm having some troubles:-I can't find the documentation, to know how it works exactly-I have a creepy behavior once I try to send data from server to clientI have disabled the standard HTTP socket on port 80 (TCP) and I have set up my own on the same port. Then the server waits the WIND:61 indication (incoming socket) to send the following text through the UART: ''HTTP/1.1 200 OK - HTTP version as in GET\r\n''''Content-type: text/html\r\n''''Content-length:15\r\n''''\r\n''''<html>_|_<html>''I use the other SPWF01SA as a client and after a wi-fi association I use ''AT+S.HTTPGET=172.20.146.1,/index.html\r'' expecting the previous text, but instead I receive:''t-type: text/htmlersion as in GETContent-length:15htmlersion as in GETntent-length:15htmlersion as in GET<html>_|_<html>15htmlersion as in GET[1A][1A][1A]''Am I doing something wrong? And where can I find the documentation on sockets?Regards,Hector2015-04-29 03:34 AM
Hi,
I did the same attempt, but I have good results.Module 1 - server:- turn off web server - at+s.httpd=0- turn on socket server - at+s.sockd=80Module 2 - client: - request resource - at+s.httpget=_ip_,_res_Module 1 output:<CR><LF>+WIND:61:Incoming Socket Client:192.168.1.126<CR><LF><CR><LF>+WIND:60:Now in Data Mode<CR><LF>GET / HTTP/1.0<CR><LF>User-Agent: SPWF01SA1<CR><LF>Host: 192.168.1.104<CR><LF>Connection: close<CR><LF><CR><LF><CR><LF>+WIND:59:Back to Command Mode<CR><LF><CR><LF>+WIND:62:Socket Client Gone:192.168.1.126<CR><LF>Module 2 output:at+s.httpget=192.168.1.104,/ERROR: nothing received, increase ip_http_get_recv_timeout variable************************ OR **************************Module 1 output:<CR><LF>+WIND:61:Incoming Socket Client:192.168.1.126<CR><LF><CR><LF>+WIND:60:Now in Data Mode<CR><LF>GET / HTTP/1.0<CR><LF>User-Agent: SPWF01SA1<CR><LF>Host: 192.168.1.104<CR><LF>Connection: close<CR><LF><CR><LF>29-Apr-15 12:31:43 [TX] - 1234567829-Apr-15 12:31:46 [RX] - <CR><LF>+WIND:59:Back to Command Mode<CR><LF><CR><LF>+WIND:62:Socket Client Gone:192.168.1.126<CR><LF>Module 2 output:at+s.httpget=192.168.1.104,/12345678OK - 21800 - 10 - 329Is this what you are trying to do?2015-04-29 04:41 AM
I'm trying to do the same thing yes. I do receive something but the sentences are all mixed up...
Thanks for the quick answer again :)2015-04-29 04:48 AM
Debug your host application...
jerry