I have a Mac app acting as as central and an iOS app acting as as peripheral. They are both using Core Bluetooth to communicate. How long can I expect the connection to live? Can connections be long lived?
I find that the iOS peripheral disconnects quickly after some inactivity (maybe 10-15 seconds) and I have to keep reconnecting to send more data over.
The error I get on disconnection is "Code=6 “The connection has timed out unexpectedly.” (happens all the time on an iOS device running iOS 10 and a newer one running iOS 14).
The error message make it sound like this shouldn't happen, but maybe that's how BLE is supposed to work and I shouldn't expect to use it more like a web socket.
I find that the iOS peripheral disconnects quickly after some inactivity (maybe 10-15 seconds) and I have to keep reconnecting to send more data over.
The error I get on disconnection is "Code=6 “The connection has timed out unexpectedly.” (happens all the time on an iOS device running iOS 10 and a newer one running iOS 14).
The error message make it sound like this shouldn't happen, but maybe that's how BLE is supposed to work and I shouldn't expect to use it more like a web socket.