This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

assert in BLE_GATTS_EVT_TIMEOUT with newer iOS iPhones

Hi, 

I am working with nrf52-ble-app-uart-relay example taken from Nordic Playground github. I have SES IDE,  nRF5_SDK_16.0.0 & nRF52840 DK. The central part of the relay device (nRF52840 DK) polls the status of a peripheral BLE device. The peripheral part of the relay is meant to get connected to a phone to pass on that status. I noticed that Android phones connect well to the relay but iPhone 10 & 11 do not connect to the relay. iPhone7 could connect to the relay device. The issue happens irrespective of whether a peripheral device is connected to the relay device. On debugging, I found that the code hangs at app_nus_server.c -> app_nus_server_ble_evt_handler() -> case BLE_GATTS_EVT_TIMEOUT. It asserts at the APP_ERROR_CHECK() in that case. I printed out the sequence of BLE event IDs in ble_evt_handler() if that helps:

Android phones (works OK):
POWER ON.
BLE eventID= 0x10
BLE eventID= 0x55
BLE eventID= 0x3A
BLE eventID= 0x24
BLE eventID= 0x30
BLE eventID= 0x32
BLE eventID= 0x32
BLE eventID= 0x33
BLE eventID= 0x38

iPhone7 iOS 13.7 (works OK):
POWER ON.
BLE eventID= 0x10
BLE eventID= 0x3A
BLE eventID= 0x24
BLE eventID= 0x23
BLE eventID= 0x24
BLE eventID= 0x50
BLE eventID= 0x50
BLE eventID= 0x50
BLE eventID= 0x50
BLE eventID= 0x50
BLE eventID= 0x50

iPhone10 & 11 iOS14 (hangs while debugging and when not debugging, it constantly resets when trying to connect to the phone):
POWER ON.
BLE eventID= 0x10
BLE eventID= 0x24
BLE eventID= 0x3A
BPOWER ON.
BLE eventID= 0x10
BLE eventID= 0x24
BLE eventID= 0x3A
BPOWER ON.

I used a generic BLE monitor app as well as my custom app on the iPhones to connect to the relay. I think the issue has something to do with failure to comply with iOS' requirements. Can you try to reproduce the issue and suggest a solution? 
Please let me know your test result. Thank you

-Kunal

Parents Reply Children
Related