Problem using WebSockets on ESP8266 and Espruino #5887
Unanswered
espruino-discuss
asked this question in
ESP8266
Replies: 1 comment
-
Posted at 2017-10-16 by Wilberforce Your code above is not like the client here - the port is passed as an option The client assumes there is a server on that ip and port - what do you have running as a server? Posted at 2017-10-17 by swaroop I tried the example but that didn't work either. Infact the code didn't work on the desktop either.. When running like a Websocket client . I was getting a "invalid url" error on the desktop. I changed the code to what it is now and atleast it began working with a WebSocket server (code below) and the WebSocket client when both are running on the desktop
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-10-16 by swaroop
I am trying to follow this example to setup a sample Websocket Client but the client won't connect nor does it thrown an error. None of the callback functions are ever called.
I made sure that the WiFi is connected before the Websocket is initialized. The server doesn't see that the client running on Espruino on an ESP8266 is even connected. Does the built-in Websocket support the built in @require("Wifi") model?
This same code runs fine when run from the Mac console when the websocket client is running inside the Mac and the server is also on the Mac.
I have verified that the HTTP object is able to call another Web-server on the Mac.. So its definitely not a connectivity issue.
Just need to know if the WebSocket object knows to utilize the connection as established by the Wifi.connect() API.
Beta Was this translation helpful? Give feedback.
All reactions