nRF52 SDK16 device discovery problem in iOS

Hi Community, 

Recently I have started testing my BLE peripheral running HRS with iPhone. My device is running SDK16 on nRF52 SoC. This is working perfectly with Android mobiles. \

I searched the community for this issue and found below thread which mentioned MTU size exchange could be a problem.  

https://devzone.nordicsemi.com/f/nordic-q-a/66256/nrf52-sdk16-service-discovery-doesn-t-happen-on-ios

But MTU exchange is present in nrf_ble_gatt_on_ble_evt callback as shown below. 

case BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST:
on_exchange_mtu_request_evt(p_gatt, p_ble_evt);
break;

I have attached nRF connect log for reference. Can someone help me understand what could be the issue? 

NRF logs.eml

Best

Lakshmikanth. 

Parents
  • Hi

    Have you tried doing what Vidar first recommends in the ticket you link to, to clear the cache by forgetting nRF devices in the Bluetooth settings before trying to connect? From the log, it doesn't seem like the error is triggered until you try enabling notifications for one of the characteristics, so it doesn't seem like the discovery process is the issue to me. Unfortunately it seems to report an "Unknown error" code, which doesn't tell us much of value. Do you have an nRF52 DK you can try using as a peripheral, so we can get a log from the nRF side as well? Maybe that's able to tell us more about what exactly is failing? You can also try taking a sniffer trace (using the nRF Sniffer for example) so we can get some details of what's going on over the air exactly.

    Regarding the MTU size that is mentioned, iOS devices generally won't accept MTU sizes larger than 184 bytes if I recall correctly, so if your nRF52 is trying to set it higher than this, that might be what's going wrong in your connection.

    Best regards,

    Simon

  • + log from nRF firmware debug that confirms firmware set 185 MTU size. 

    <info> app: Heart Rate Sensor example started.
    <debug> nrf_ble_gatt: Requesting to update ATT MTU to 247 bytes on connection 0x0.
    <debug> nrf_ble_gatt: Updating data length to 251 on connection 0x0.
    <info> app: Connected.
    <debug> nrf_ble_gatt: ATT MTU updated to 185 bytes on connection 0x0 (response).
    <info> app: GATT ATT MTU on connection 0x0 changed to 185.
    <debug> nrf_ble_gatt: Data length updated to 27 on connection 0x0.
    <debug> nrf_ble_gatt: max_rx_octets: 27
    <debug> nrf_ble_gatt: max_tx_octets: 27
    <debug> nrf_ble_gatt: max_rx_time: 328
    <debug> nrf_ble_gatt: max_tx_time: 328

Reply
  • + log from nRF firmware debug that confirms firmware set 185 MTU size. 

    <info> app: Heart Rate Sensor example started.
    <debug> nrf_ble_gatt: Requesting to update ATT MTU to 247 bytes on connection 0x0.
    <debug> nrf_ble_gatt: Updating data length to 251 on connection 0x0.
    <info> app: Connected.
    <debug> nrf_ble_gatt: ATT MTU updated to 185 bytes on connection 0x0 (response).
    <info> app: GATT ATT MTU on connection 0x0 changed to 185.
    <debug> nrf_ble_gatt: Data length updated to 27 on connection 0x0.
    <debug> nrf_ble_gatt: max_rx_octets: 27
    <debug> nrf_ble_gatt: max_tx_octets: 27
    <debug> nrf_ble_gatt: max_rx_time: 328
    <debug> nrf_ble_gatt: max_tx_time: 328

Children
No Data
Related