arduinoWebSockets icon indicating copy to clipboard operation
arduinoWebSockets copied to clipboard

ESP8266 with Ethernet

Open Jono72 opened this issue 3 years ago • 0 comments

Just wondered if anyone can tell me if im missing something, great library and have been using it with ESP8266 connected to network via WIFI, works great all data sent and received on my web page, I have tried to utilise exact same setup on another project but I'm using W5500 instead for ethernet connection (using Ethernet2 lib), everything else works fine as I have other data that loads to webpage via get requests, however the Web socket connection just fails with following error

dashboard.js:547 Web Socket connection to 'ws://192.168.10.177:50005/' failed:

I believe its refusing the connection although I have no idea why.

This is the function that fails in the js, I just wondered if I am missing something here

function ws() { Socket = new WebSocket('ws://' + window.location.hostname + ':50005/'); Socket.onmessage = function(event) { processCommand(event); }; }

Kind Regards

Jono

Jono72 avatar Feb 25 '23 05:02 Jono72