Chat freely about anything...

User avatar
By Squonk
#1158 Everything works as expected: you sent a Websocket "upgrade" HTTP request, and the ESP8266 received it and just sitting there, as well as you JS on the other side :P

If you wan to go further, you just need to figure out how to retrieve the connection on the ESP8266 side and answer to that request :D

Do you really need the complex Websocket protocol? Are plain sockets not an option? It would be much simpler, don't you think?
User avatar
By popcorn
#1159 Its a simple program. So first I tested with a simple program SocketTest.

It worked only when I set the SocketTest as server. I only want to send text from Javascript to the ESP8266. If it's possible not by posting..

But maybe its to complicated, using the websocket.. I cant send text back now to the Javascript. Any other options?
User avatar
By Squonk
#1160 The Websocket protocol is complex, see https://tools.ietf.org/html/rfc6455 for details.

If you want it to work, you will need something to implement it on the ESP8266 side. Currently, it only contains a simple TCP server, period.

If you don't want to do just posts, you can use AJAX, either direct by using XMLHttpRequest() calls in JS, or by using more sophisticated methods like JQuery, etc.
User avatar
By popcorn
#1184 Hmm ok.

I'm setting the goal for now:
- Set Esp8266 as server and wifi spot V Done
- Visit the ip / page from Esp8266 V Done
- Sending info back from the server to the webpage.. X