This is certainly related to this question. I'd have left a comment there but I'm still too young here to do so. :) I have a Android app (on many different devices and different Android versions) that connects to a custom device based on a STM32WB55 device. I leave the connection opened, just a battery level sent every minute, and it ends with a "status = 22" on the Android side after some hours. It can be more than a day but usually around 18h. With a BLE Sniffer I can see the Master (Android) stops with no apparent reason to send "EmptyPDU" packets. Could it be Android that decides it can/must wipe out the app for an unknown reason (GC?)?
I was expecting the connection to stay alive as far as the embedded side doesn't close it explicitly.