Closed brucedk closed 8 months ago
I'm using the example codes to test
What kind of WebSocket server do you use? Please mind that the SSL connection is not supported.
I'm using the same library with a arduino mega 2560 and a 28J60. with the arduino as a client and the esp32 as a server, it works. when I reverse, it give me the error above. the arduino as a server I can connect with a nodejs as a client. and I'm not using ssl
I'm talking about a scenerio when you have a WebSocket client (this library) uploaded into a ESP32 board. What is your server endpoint? also this library?
open config.h
and uncomment debugging defines.
I'm talking about a scenerio when you have a WebSocket client (this library) uploaded into a ESP32 board. What is your server endpoint? also this library?
Yes, in a Arduino Mega 2560
this is the console log with the uncomment debuging
Connecting to tecnica
.. connected
Device IP: 192.168.10.236
[ 1264][E][esp32-hal-adc.c:158] __analogRead(): Pin 0 is not ADC pin!
[Line #0] HTTP/1.1 400 Bad Request
Error during WebSocket handshake: net::ERR_INVALID_HTTP_RESPONSE
Connection failed!
And what about a debug log of a server?
it does not receive any data, even with the debug enable
The connection was rejected way before the handshake.
Make sure that your ip and port is correct when using client.open(...)
just check again, ip and port are correct. this error only happens when the ip and port are correct, if it is wrong it only shows the connection failed, without the analogread error
host
argument (in client.open()
) in a form: xxx.xxx.xxx.xxx
or ws://...
?the host is xxx.xxx.xxx.xxx
and the server connect to a nodejs client as a test
Actually it's the other way around, the client connets to a server (server can only accept/reject a client). Anyways, I can't help you with debugging without a servers log. Looks like WiFi controller rejects a connection (I don't know why).
On a board that you have a WebSocket client, could you upload any WebServer client sketch (try a built-in example)?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug I'm using a ESP32-S3 DevkitC-1 in wifi mode, when I'm working as a server, it all works, but when I set it as client, it gives me this error
Environment info
Failure log