khoih-prog / WebSockets_Generic

WebSocket / Socket.IO Server and Client for Arduino based on RFC6455. Now supporting Adafruit nRF52, Portenta_H7, STM32F/L/H/G/WB/MP1, Teensy, SAM DUE, SAMD21, SAMD51, Arduino SAMD21 (Nano 33 IoT), MKR1000 / MKR1010WiFi, RP2040-based boards using WiFi101, WiFiNINA, WiFi, Ethernet, WT32_ETH01, Teensy 4.1 NativeEthernet/QNEthernet or Portenta_H7 WiFi/Ethernet, etc. so that those boards can be voice-controlled by Alexa. Now supporting websocket only mode for Socket.IO. Ethernet_Generic library is used as default for W5x00
GNU General Public License v3.0
90 stars 22 forks source link

Error compiling for board Seeeduino Wio Terminal. #21

Closed gbernal closed 2 years ago

gbernal commented 2 years ago

Describe the bug

BOARD_TYPE "SAMD SEEED_WIO_TERMINAL" fails to identify installed board.

Steps to Reproduce

Install seedstudio SAMD boards using the board manager https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json

open the example WIOTerminal_WebSocketClient.ino available from Websocket_Generic for WIO_Terminal

compile sketch

Expected behavior

example code should be able to compile and run on designated board.

Actual behavior

Code fails when uploading to board

Debug and AT-command log (if applicable)

C:\Users\gbernal\AppData\Local\Temp\arduino_modified_sketch_974006\WIOTerminal_WebSocketClient.ino:21:2: warning: #warning Using SEEED_WIO_TERMINAL [-Wcpp]

 #warning Using SEEED_WIO_TERMINAL

  ^~~~~~~

In file included from C:\Users\gbernal\Documents\Arduino\libraries\Seeed_Arduino_rpcUnified\src/lwip/arch.h:49:0,

                 from C:\Users\gbernal\Documents\Arduino\libraries\Seeed_Arduino_rpcUnified\src/lwip/debug.h:40,

                 from C:\Users\gbernal\Documents\Arduino\libraries\Seeed_Arduino_rpcUnified\src/lwip/opt.h:52,

                 from C:\Users\gbernal\Documents\Arduino\libraries\Seeed_Arduino_rpcUnified\src/lwip/ip_addr.h:40,

                 from C:\Users\gbernal\Documents\Arduino\libraries\Seeed_Arduino_rpcUnified\src/esp/tcpip_adapter.h:44,

                 from C:\Users\gbernal\Documents\Arduino\libraries\Seeed_Arduino_rpcUnified\src/esp/esp_event.h:25,

                 from C:\Users\gbernal\Documents\Arduino\libraries\Seeed_Arduino_rpcUnified\src/esp/esp_event_loop.h:22,

                 from C:\Users\gbernal\Documents\Arduino\libraries\Seeed_Arduino_rpcUnified\src/esp/esp_lib_unified.h:12,

                 from C:\Users\gbernal\Documents\Arduino\libraries\Seeed_Arduino_rpcUnified\src/seeed_rpcUnified.h:11,

                 from C:\Users\gbernal\Documents\Arduino\libraries\Seeed_Arduino_rpcWiFi\src/WiFiGeneric.h:26,

                 from C:\Users\gbernal\Documents\Arduino\libraries\Seeed_Arduino_rpcWiFi\src/WiFiSTA.h:28,

                 from C:\Users\gbernal\Documents\Arduino\libraries\Seeed_Arduino_rpcWiFi\src/WiFi.h:32,

                 from C:\Users\gbernal\Documents\Arduino\libraries\Seeed_Arduino_rpcWiFi\src/rpcWiFi.h:1,

                 from C:\Users\gbernal\AppData\Local\Temp\arduino_modified_sketch_974006\WIOTerminal_WebSocketClient.ino:33:

C:\Users\gbernal\Documents\Arduino\libraries\Seeed_Arduino_rpcUnified\src/lwip/arch/cc.h:44:0: warning: "BYTE_ORDER" redefined

 #define BYTE_ORDER LITTLE_ENDIAN

In file included from c:\users\gbernal\appdata\local\arduino15\packages\seeeduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\sys\types.h:67:0,

                 from c:\users\gbernal\appdata\local\arduino15\packages\seeeduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\stdio.h:61,

                 from C:\Users\gbernal\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.2\cores\arduino/Print.h:23,

                 from C:\Users\gbernal\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.2\cores\arduino/Stream.h:26,

                 from C:\Users\gbernal\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.2\cores\arduino/HardwareSerial.h:24,

                 from C:\Users\gbernal\AppData\Local\Arduino15\packages\Seeeduino\hardware\samd\1.8.2\cores\arduino/Arduino.h:83,

                 from C:\Users\gbernal\AppData\Local\Temp\arduino_build_912138\sketch\WIOTerminal_WebSocketClient.ino.cpp:1:

c:\users\gbernal\appdata\local\arduino15\packages\seeeduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\machine\endian.h:20:0: note: this is the location of the previous definition

 #define BYTE_ORDER _BYTE_ORDER

In file included from C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSockets_Generic.h:101:0,

                 from C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSocketsClient_Generic.h:67,

                 from C:\Users\gbernal\AppData\Local\Temp\arduino_modified_sketch_974006\WIOTerminal_WebSocketClient.ino:37:

C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSocketsVersion_Generic.h:70:0: warning: "WEBSOCKETS_GENERIC_VERSION_MINOR" redefined

 #define WEBSOCKETS_GENERIC_VERSION_MINOR    10

In file included from C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSocketsClient_Generic.h:67:0,

                 from C:\Users\gbernal\AppData\Local\Temp\arduino_modified_sketch_974006\WIOTerminal_WebSocketClient.ino:37:

C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSockets_Generic.h:70:0: note: this is the location of the previous definition

 #define WEBSOCKETS_GENERIC_VERSION_MINOR      13

In file included from C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSockets_Generic.h:101:0,

                 from C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSocketsClient_Generic.h:67,

                 from C:\Users\gbernal\AppData\Local\Temp\arduino_modified_sketch_974006\WIOTerminal_WebSocketClient.ino:37:

C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSocketsVersion_Generic.h:71:0: warning: "WEBSOCKETS_GENERIC_VERSION_PATCH" redefined

 #define WEBSOCKETS_GENERIC_VERSION_PATCH    1

In file included from C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSocketsClient_Generic.h:67:0,

                 from C:\Users\gbernal\AppData\Local\Temp\arduino_modified_sketch_974006\WIOTerminal_WebSocketClient.ino:37:

C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSockets_Generic.h:71:0: note: this is the location of the previous definition

 #define WEBSOCKETS_GENERIC_VERSION_PATCH      0

In file included from C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSockets_Generic.h:101:0,

                 from C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSocketsClient_Generic.h:67,

                 from C:\Users\gbernal\AppData\Local\Temp\arduino_modified_sketch_974006\WIOTerminal_WebSocketClient.ino:37:

C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSocketsVersion_Generic.h:73:0: warning: "WEBSOCKETS_GENERIC_VERSION_INT" redefined

 #define WEBSOCKETS_GENERIC_VERSION_INT      2010001

In file included from C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSocketsClient_Generic.h:67:0,

                 from C:\Users\gbernal\AppData\Local\Temp\arduino_modified_sketch_974006\WIOTerminal_WebSocketClient.ino:37:

C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSockets_Generic.h:73:0: note: this is the location of the previous definition

 #define WEBSOCKETS_GENERIC_VERSION_INT        2013000

In file included from C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSocketsClient_Generic.h:67:0,

                 from C:\Users\gbernal\AppData\Local\Temp\arduino_modified_sketch_974006\WIOTerminal_WebSocketClient.ino:37:

C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSockets_Generic.h:210:4: warning: #warning Use SAMD21/SAMD51 in WebSockets_Generic [-Wcpp]

   #warning Use SAMD21/SAMD51 in WebSockets_Generic

    ^~~~~~~

In file included from C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSocketsClient_Generic.h:67:0,

                 from C:\Users\gbernal\AppData\Local\Temp\arduino_modified_sketch_974006\WIOTerminal_WebSocketClient.ino:37:

C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSockets_Generic.h:559:4: warning: #warning Using RTL8720DN Seeed_Arduino_rpcWiFi Library [-Wcpp]

   #warning Using RTL8720DN Seeed_Arduino_rpcWiFi Library

    ^~~~~~~

C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSockets_Generic.h:636:4: warning: #warning This network type Supporting SSL for WebSockets [-Wcpp]

   #warning This network type Supporting SSL for WebSockets

    ^~~~~~~

In file included from C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSockets_Generic.h:816:0,

                 from C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSocketsClient_Generic.h:67,

                 from C:\Users\gbernal\AppData\Local\Temp\arduino_modified_sketch_974006\WIOTerminal_WebSocketClient.ino:37:

C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSockets_Generic-Impl.h:82:6: warning: #warning CORE_HAS_LIBB64 [-Wcpp]

     #warning CORE_HAS_LIBB64

      ^~~~~~~

In file included from C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSocketsClient_Generic.h:247:0,

                 from C:\Users\gbernal\AppData\Local\Temp\arduino_modified_sketch_974006\WIOTerminal_WebSocketClient.ino:37:

C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSocketsClient_Generic-Impl.h:320:4: warning: #warning WEBSOCKETS_NETWORK_TYPE != NETWORK_ESP8266_ASYNC [-Wcpp]

   #warning WEBSOCKETS_NETWORK_TYPE != NETWORK_ESP8266_ASYNC

    ^~~~~~~

C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSocketsClient_Generic-Impl.h:342:4: warning: #warning HAS_SSL [-Wcpp]

   #warning HAS_SSL

    ^~~~~~~

C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSocketsClient_Generic-Impl.h:363:4: warning: #warning ESP32 or NETWORK_RTL8720DN [-Wcpp]

   #warning ESP32 or NETWORK_RTL8720DN

    ^~~~~~~

C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSocketsClient_Generic-Impl.h: In member function 'void WebSocketsClient::loop()':

C:\Users\gbernal\Documents\Arduino\libraries\WebSockets_Generic\src/WebSocketsClient_Generic-Impl.h:400:22: error: 'class WiFiClientSecure' has no member named 'setInsecure'

         _client.ssl->setInsecure();

                      ^~~~~~~~~~~

exit status 1
Error compiling for board Seeeduino Wio Terminal.

Screenshots

image

Information

Please ensure to specify the following:

OS - Windows 10

Example


Arduino IDE version: 1.8.13
ESP32 Core Version 1.0.5
OS: Ubuntu 20.04 LTS
Linux xy-Inspiron-3593 5.4.0-66-generic #74-Ubuntu SMP Wed Jan 27 22:54:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Context:
I encountered an endless loop while trying to connect to Local WiFi.

Steps to reproduce:

Install seedstudio SAMD boards using the board manager https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json

open the example WIOTerminal_WebSocketClient.ino available from Websocket_Generic for WIO_Terminal

compile sketch
### Additional context

Add any other context about the problem here.
khoih-prog commented 2 years ago

Hi @gbernal

Thanks for using the library and reporting the bug.

The new WebSockets_Generic releases v2.14.1 has just been published to fix the bug.

Be sure to use the Packages_Patches of this library version v2.14.1+ to avoid compiler error.

Best Regards,


Release v2.14.1

  1. Fix setInsecure() bug for WIO_Terminal.
  2. Update Packages' Patches for Seeeduino core. Be sure to use the Packages_Patches of this library version v2.14.1+ to avoid compiler error.

Selection_099

gbernal commented 2 years ago

Thank you @khoih-prog, the example uploads and runs now.