Skip to content

ESP32 silent disconnects. #694

@Mysticial

Description

@Mysticial

The ESP32 will occasionally get silently disconnected in a such a way that we can still send reports to the Switch but it ignores everything.

This tends to happen when we exceed the report rate requested by the Switch. The easiest way to reproduce this is to run TurboA on the grip menu. (100% disconnect on Switch 1, 30% disconnect on Switch 2)

Mitch from HOJA says this happens because we aren't sending reports at the precisely the interval requested by the Switch. IOW, skipping reports can cause disconnects. This is fine, we'll revisit this in the future.

For now, the problem is that we can't detect the disconnects. If we can detect it, we can reset the connection. In most cases, we can use the rumble output reports to detect the disconnects since they stop coming after a disconnect. But this isn't guaranteed and using the absence of rumble reports to reconnect will false positive. This is bad for the Switch 1 due to: #587 as it always leads to the MAC address getting banned.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions