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:
AsyncWebSocket ws("/ws");
void onWsEvent(AsyncWebSocket *server, AsyncWebSocketClient *WS_Client, AwsEventType type, void *arg, uint8_t *data, size_t len) {
if (type == WS_EVT_CONNECT) {
Serial.println("Websocket client connection received");
WS_Client->text("Hello from ESP32 Server");
} else if (type == WS_EVT_DISCONNECT) {
Serial.println("Client disconnected");
}
}`
In SETUP:
ws.onEvent(onWsEvent);
server.addHandler(&ws);`
In LOOP:
if (millis() > timer + 5000) {
ws.textAll(String(millis() / 1000));
timer = millis();
}
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.