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
81 stars 30 forks source link

WebSockets2_generic library and MKR1000 + Ethernet Shield #34

Closed jamolina2021 closed 2 years ago

jamolina2021 commented 2 years ago

Hi Khoih,

I'm trying to use the WebSockets2_generic library with the Arduino MKR1000 + Ethernet Shield, but it can't even connect to the server. I am using your example (SAMD-Ethernet-Client) which is prepared for the MKR1000. I have installed the patches from the Ethernet library and the EthernetLarge library, but with neither of the 2 it manages to connect to the nodejs server. Produces the following output:

12:18:04.435 -> 
12:18:04.435 -> Starting SAMD-Ethernet-Client on SAMD MKR1000
12:18:04.435 -> Ethernet using W5x00 and Ethernet Library
12:18:04.435 -> WebSockets2_Generic v1.8.1
12:18:04.982 -> 
12:18:04.982 -> W5100 init, using SS_PIN_DEFAULT = 5, new ss_pin = 10, W5100Class::ss_pin = 10
12:18:04.982 -> no chip :-(
12:18:04.982 -> WebSockets Client IP address: 0.0.0.0
12:18:04.982 -> Connecting to WebSockets Server @192.168.20.100
12:18:04.982 -> [WS] WebsocketsClient::connect: step 1
12:18:04.982 -> [WS] WebsocketsClient::connect: not _connectionOpen, host = 192.168.20.100 , port = 8080
12:18:04.982 -> Not Connected!

Your WebSockets_generic library manages to connect with socket.io, but your WebSockets2_generic library doesn't even connect. According to your documentation the WebSockets2_generic library should work without problems with the MKR1000 + Ethernet Shield just like your WebSockets_generic library.

What could be happening? I am doing something wrong?

Thanks for your help. Regards, Jose

jamolina2021 commented 2 years ago

Ignore this ticket. Thanks.