Websocket server problems #680
Replies: 3 comments
-
Posted at 2017-01-15 by countxerox Hi user72696, Thanks very much for this example, it's the first time I've seen this REST approach so I thought I give your code a try. It works. If I type "http://192.168.1.70:8080/hello" in the browser then Espruino says "Hello World". I didn't see any problem firing the websocket. My ESP8266 is already connected to wifi with wifi.save() and I don't have the servos and leds connected so I changed the code a bit..
Also I got some weird "ACORN compiler.js" warnings? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by Fredrik Thank's for taking the time to test the code out. I will try your code and see if that works. But when you tested could you send and receive frames in the websocket? When I tested I also got a websocket connection but could not send and receive any messages. Regards |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-01-16 by countxerox No problem, yes I saw the messages sent and received in chrome and in espruino console log and I also looked in the chrome developer mode at the frames and data. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-01-15 by Fredrik
I'm trying to setup a websocket server on a ESP8266.
I have wifi connection, http requests work, WS connection looks okay (right headers and chrome send the first frame).
The problem I have is that it do not look like the event for "websocket" is triggered i.e. i dont ge the ws object and no data.
I have looked at different examples on the net, but cant figure out what I do wrong so any suggestions are welcome.
Attachments:
Beta Was this translation helpful? Give feedback.
All reactions