I'm no BLE expert, but I've recently been dealing with the "The connection has timed out unexpectedly" issue you mentioned. I found that even if the app issued a GATT command every 30 seconds I still would get unexpected timeouts. It was only by adjusting the BLE connection parameters on our device to comply with the recommendations from Apple (see link below) that we were able to eliminate the intermittent disconnects.
https://developer.apple.com/library/archive/qa/qa1931/_index.html
Topic:
App & System Services
SubTopic:
Core OS
Tags: