Issue:
Recently, I am frequently getting CBManagerStateResetting state in CBPeripheralManager. After getting CBManagerStateResetting state, CBManagerStatePoweredOn comes within 3~5 seconds. However, this not only effect the application but also peer device is getting disconnect status due to link loss error.
Scenario:
This issue occurs specially during continuous data transaction in BLE while parallelly using 3G Data from iPhone.
When CBManagerStateResetting occurs, peer device gets disconnected. It is so annoying now a days as it is occurring frequently.
My question,
Extra information: CBPeripheralManagerStates are as follows:
typedef NS_ENUM(NSInteger, CBPeripheralManagerState) {
CBPeripheralManagerStateUnknown = CBManagerStateUnknown,
**CBPeripheralManagerStateResetting = CBManagerStateResetting,**
CBPeripheralManagerStateUnsupported = CBManagerStateUnsupported,
CBPeripheralManagerStateUnauthorized = CBManagerStateUnauthorized,
CBPeripheralManagerStatePoweredOff = CBManagerStatePoweredOff,
CBPeripheralManagerStatePoweredOn = CBManagerStatePoweredOn,
};
This issue happens due to an unstable Bluetooth stack when Apple first released iOS 10. In the subsequent update, the issue has been solved. In current releases "CBPeripheralManagerStateResetting" comes rarely.