Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Client Power Loss or ESP32 Reset, BLE-Gamepad Stuck in False Connected Mode #271

Open
1stage opened this issue Feb 26, 2025 · 0 comments

Comments

@1stage
Copy link

1stage commented Feb 26, 2025

When our Client device (using an ESP32-S3-WROOM) is turned off or it's ESP32 is reset, if our ESP32-BLE-Gamepad Server device has connected to it, no onDisconnect event gets sent, due to the abrupt power loss on the Client. The ESP32-BLE-Gamepad still shows as connected when the stats are polled...

21:49:59.867 -> BTLE Stats:
21:49:59.867 ->      StringAddress : 34:85:18:61:de:06
21:49:59.867 ->      NimBLEAddress : 34:85:18:61:de:06
21:49:59.912 ->       Peer Address : 34:85:18:61:de:06
21:49:59.912 ->    Peer ID Address : 34:85:18:61:de:06
21:49:59.912 ->    Peer ConnHandle : 1
21:49:59.912 ->  Peer ConnInterval : 7
21:49:59.912 ->   Peer ConnTimeOut : 600
21:49:59.912 ->   Peer ConnLatency : 0
21:49:59.912 ->           Peer MTU : 23

...yet there is no REAL connection. If the Client device is turned back on, it cannot re-connect with the ESP32-BLE-Gamepad, because it is already "connected" and not advertising its availability.

A power-cycle of the ESP32-BLE-Gamepad device fixes the issue... both devices re-connect with each other after both are power-cycled.

But is there a BLE-Gamepad function I can use to periodically validate the connection, and get it unstuck?

The Client device is using NimBLE as well, but not the Arduino build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant