khoih-prog / WebSockets2_Generic

A WebSocket Server and Client library for Arduino, based on RFC6455, for writing modern Websockets applications. Now support ESP8266, ESP32 (including ESP32-S2 Saola, AI-Thinker ESP-12K, WT32_ETH01, etc.), nRF52, SAMD21, SAMD51, SAM DUE, STM32F/L/H/G/WB/MP1, Teensy, RP2040-based, etc. boards, with WiFiNINA, Teensy 4.1 NativeEthernet/QNEthernet, Ethernet W5x00 / ENC28J60 / LAN8742A / LAN8720, ESP8266 / ESP32-AT modules/shields, as well as SINRIC / Alexa / Google Home
GNU General Public License v3.0
85 stars 30 forks source link

Error 1006 #49

Closed ahdaib closed 2 years ago

ahdaib commented 2 years ago

I'm Using ESP8266-Client.ino Example and connected to this site : https://socketsbay.com/test-websockets i change in defines.h const char* websockets_server_host = "socketsbay.com"; //Enter server address

define WEBSOCKETS_PORT 443 //8080

and in io file bool connected = client.connectSecure(websockets_server_host, websockets_server_port, "/wss/v2/2/demo/");

it's work fine but after 50 second the connection is close with code 1006

can you test and check why the connection close with code 1006

Thank you

khoih-prog commented 2 years ago

Try the correct and unmodified SSL example, such as Secured-Esp8266-Client first to see if OK, then modify gradually for new WSS site.

You must do some more research on how TLS/SSL and to understand how to get correct SSL certificate / fingerprint, etc., not just blindly change the site and port of non-SSL example.

You already posted on

  1. Error 1006 abnormal close websocket?
  2. ArduinoWebsockets issues

I'm closing the invalid issue now as this is not a proven bug of the library. You'll be blocked to access if continuing with unproven issues. It's more appropriate to post on Forum or Discussion session.

Good Luck,