Closed Mike0675 closed 1 year ago
Please post the MRE, as well as all the tests procedures / results so far, to save anybody time to duplicate the issue.
Also try to adapt the example from sibling library Async_WebSocketsServer, written for RP2040W AsyncWebServer_RP2040W
Hi @Mike0675
I just adapted the Async_WebSocketsServer code and posted in this library as Async_WebSocketsServer for Teensy4_1
The WebSockets Server is working correctly, meaning the WS protocol is handled correctly in this library
The terminal debug is
Starting Async_WebSocketsServer on TEENSY 4.1
with Teensy4.1 QNEthernet
AsyncWebServer_Teensy41 v1.6.1
Initialize Ethernet using DHCP => Connected! IP address:192.168.2.119
ws[Server: /ws][ClientID: 1] WSClient connected
ws[Server: /ws][ClientID: 1] text-message[len: 13]: Hello, Server
ws[Server: /ws][ClientID: 1] WSClient disconnected
ws[Server: /ws][ClientID: 2] WSClient connected
ws[Server: /ws][ClientID: 2] text-message[len: 13]: Hello, Server
ws[Server: /ws][ClientID: 2] WSClient disconnected
ws[Server: /ws][ClientID: 3] WSClient connected
ws[Server: /ws][ClientID: 3] text-message[len: 13]: Hello, Server
Just modify to match the IP of the server. In this case 192.168.2.119
Describe the bug
I can´t use WebSockets with Async_WebServer_Teensy41.
I adopted a Sketch from ESP32 where it works well.
With Teensy 4.1 the Connection establishes but send no Data to the Client (HRESULT: 0x80072F78).
Im using Windows10, "Websocket Debug Tools", Wireshark
Arduino IDE version 1.8.19 Teensyduino Core v1.58 beta3 QNEthernet library version v0.17.0
Steps to Reproduce
I used Async_AdvancedWebServer Example and added:
In SETUP:
In LOOP:
Expected behavior
The Server should send back "Hello from Teensy 4.1 Server". Every 5s the Server should send millis() / 1000.
Actual behavior
With "Websocket Debug Tools" I get (HRESULT: 0x80072F78) Using Wireshark it seems the OPCODE for Websocket Connection is Wrong.