I was looking for this problem, but no one sees it.
I have two iPads. One of them acts as a Bluetooth peripheral device, which is always in the foreground. Since I'm more interested in the central side, I made my central iPad mode for the BLE central one. My workflow is as follows:
- The central application starts and starts the scan.
- Peripheral Ad Service (or in range)
- The central device connects to the peripheral device and stops scanning.
- The peripheral stops the ad (or leaves the range)
- The central device turns off and starts the scan.
- Follow steps 1-5, regardless of whether the center is in the foreground or in the background.
When I launch my central iPad app, steps 3 and 5 are repeated every 10 seconds, even if the service is advertised all the time. This happens in the foreground and in the background.
When disconnecting, I get this error:
Error occurred while disconnecting peripheral: The specified device has disconnected from us.
Any ideas on why he keeps disconnecting? Does CoreBluetooth clear connections if no data is transferred? Right now, my central is doing a one-time read of peripheral characteristics. It does not subscribe to updates because the values ββare static. Thanks!!
ios background-process core-bluetooth
Big-o claire
source share