I'm using iOS 13.4 beta 4 because we got some reports from users who are unable to connect to our devices. I think this is only an issue with beta 4.
Some background info:
Peripheral is an ESP32 with Bluedroid BLE stack
Central is an iPhone XR with iOS 13.4 beta 4
From what I can tell, after a connection event, our app reads the device info service (uuid:0x180A)
CoreBluetooth returns an array of a single characteristic, the serial number string characteristic (uuid:0x2A25). We try to read this characteristic, however, CoreBluetooth also attempts to read the device manufacturer name characteristic (uuid:0x2A29), even though this does not happen on iOS 13.3.1, nor do we attempt to read this value in our code. In iOS 13.3.1, we can read characteristic 0x2A29 without issue.
It looks like the connection times out due to the lack of response to the read of manufacturer name, and CB automatically disconnects.
This behavior is reproducible in nRF Connect, running against the exact same firmware and device (although it works with iOS 13.3.1)
iOS 13.4
- Central (phone) connects to peripheral (ESP32) with 72s timeout setting
- Central discovers Device Information service
- Central issues a read for Serial Number characteristic
- Central issues a read for Manufacturer Name characteristic Note: this is not issued by the application
- Central subscribes for notifications to Custom Serial Service characteristic
- Peripheral replies to Serial Number characteristic
- Peripheral does not reply to Manufacturer Name characteristic
- Due to no reply to previously issued read (for Mfg Name), Central times out the connection and issues a disconnect
iOS 13.3.1
- Central (phone) connects to peripheral (ESP32) with 72s timeout setting
- Central discovers Device Information service
- Central issues a read for Serial Number characteristic
- Central subscribes for notifications to BAF Service characteristic
- Peripheral replies to Serial Number characteristic
- Any user initiated reads properly respond, even for other characteristics in the Device Info service.
The key difference in behavior is that it seems like CoreBluetooth is automatically issuing a read for the Manufacturer Name characteristic, even though this has not been requested. Does anyone have any experience with similar disconnects?