-->
Page 1 of 1

NodeMcu websocket client can't connect to a secured websocke

PostPosted: Mon Sep 25, 2017 10:11 am
by Omer Bar-Ness
I've been trying to create a websocket client on a NodeMcu, I was sucessful using the websocket module which is being used in thecloud build (link on bottom). However, when trying to connect to a secured server (using wss), the connection failed. I've found out that the module doesn't support wss and therfore, built my own FW using a Docker Image, and I used a different websocket module. and was also unable to connect to a secured server, I enabled debugging and made sure that the error was "ws_connectTimeout". so I increased the timeout to 30 seconds (originally was 10) and still was unable to connect to wss.
for e.g: wss://echo.websocket.org

I was wondering if anyone has experieneced a similar issue and was able to resolve it, or maybe can take a look at the .c source file and find the bug (assuming there is one).

thanks.


also posted in stackoverflow

Re: NodeMcu websocket client can't connect to a secured webs

PostPosted: Thu Dec 10, 2020 3:10 pm
by lyakh
Having the same issue, while a comment in NodeMCU TLS module documentation https://nodemcu.readthedocs.io/en/release/modules/tls/ suggests, that it's expected, that NodeMCU / LUA has problems connecting to external TLS (HTTPS / WSS) servers, they are suggesting to use socat as a proxy. Would be great to have a working recipe for that.