calling read() to get the device serial for pin pairing sometimes doesn't prompt the pin modal
Describe the bug
On iOS, calling read() to get the serial characteristic from the device, normally prompting the pin pairing modal, occasionally returns null as though the modal came up and was cancelled/wrong pin typed in. It fails about 25% of the time, and succeeds 75% of the time.
To Reproduce
Steps to reproduce the behavior:
Calling the following line: const char = await BleManager.read(deviceId, serviceUUID, characteristicUUID);
Expected behavior
Calling this read() prompts the user to type in a pairing pin every time.
Smartphone (please complete the following information):
- Device: iPhone 13 mini
- OS: iOS 16.6
- react-native-ble-manager version: 10.1.3
- react-native version: 0.72.3
Additional context
We've made sure retrieveServices() is always called before a read() call.
Hi @cfradella , the library only uses OS calls, this behavior may be caused by a device or OS problem.
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
I'm witnessing similar behavior.
If the peripheral requires pairing before reading something but isn't accepting any pairing requests, the read resolves with null value.