Skip to content

[BUG]WebSocketServer crash on ESP32-C6 #907

@luc-github

Description

@luc-github

Hello Markus,
I hope you are ok - I am using your library (mainly WebSocketServer) on my project for years now, and it is working well on ESP8266, ESP8285, ESP32, ESP32-Pico,ESP32-S2, ESP32-S3, ESP32C3, great library.
Unfortunatly the WebSocketServer crash on ESP32-C6, I am just starting the porting.

I digged in the issue using your example: https://github.com/Links2004/arduinoWebSockets/blob/master/examples/esp32/WebSocketServer/WebSocketServer.ino
and found that line is the root cause on C6:
https://github.com/Links2004/arduinoWebSockets/blob/master/src/WebSocketsServer.cpp#L92

it seems ESP32-C6 really does not like :

#define DR_REG_RNG_BASE 0x3ff75144
    randomSeed(READ_PERI_REG(DR_REG_RNG_BASE));

replacing it by the default :

randomSeed(millis());

Solve the crash issue, I did not do a PR because I am not sure this is the solution you want, or you want to screen C6 only for it, etc...
So I just share my finding - hope it help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions