Description
I have a Node.js based WSS server that is working fine accepting connections from a linux application. I am using the same Certificate and Keys in ArduinoWebsockets to connect to the same WSS server from a ESP8266. I am seeing a 'ConnectionClosed' event with a reason 1006 (Abnormal Closure). Any thoughts on what is happening here?
Is there an option to spit debug messages in ArduinoWebsockets library? I added
#define DEBUG_WEBSOCKETS(...) Serial.printf( VA_ARGS )
in ArduinoWebsockets.h based on some recommendation ... but does not seem to work. Any help is greatly appreciated.
Below is my Arduino code:
// Before connecting, set the ssl certificates and key of the server
X509List cert(ca_cert);
wssclient.setTrustAnchors(&cert);
X509List *serverCertList = new X509List(client_cert);
PrivateKey *serverPrivKey = new PrivateKey(client_private_key);
wssclient.setClientECCert(serverCertList, serverPrivKey);
// Connect to server
bool connected = wssclient.connect(host, port, "/");
if (connected) {