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

What is the difference between IOS peripheral and android peripheral?


I am developing an application for Android and IOS. 

Faced a problem when try connect  nRF Connect as central (on Android) to nRF Connect as peripheral (on IOS)

(screenshot from  nRF Connect as central (Android))
Why is this happening and how can this be solved?

I have the same problem when I try connect nRF52832 as central to IOS peripheral (on Android all works fine)



Parents Reply Children
  • A day after the first detection of an error, the next day, trying again - it worked (No errors).

    But after an hour of work it again went errors in the console.

    I wrote down 2 logs after errors went (before unboundig and after)

    I hope they help to figure it out


    invalidhandle.pcapng
    delete-ios-and-android-bound-error-160.pcapng

    P.S.
    I tried to remove the pairing on both devices, restart the bluetooth and try to connect again - this did not help. 
     And when trying to connect, Android does not see services on IOS

  • Hi Bibaza, 

    Please be aware that this is Nordic's devzone so please focus on debugging the issue with nRF52832 as the central and iOS as peripheral (and maybe by doing that we find the issue with Android) 

    Please try capture a sniffer trace using nRF52 as the central. 

    Both sniffer trace couldn't help much because the decryption was not successful. Do you do passkey when bonding ? 

    If you don't do bonding do you see the same problem ? What do you have on the peripheral side ? Do you have an app running to handle the GATT server on the iphone?

  • The problem, which I wrote above, for some reason has ceased to be reproduced.

    But we have a new one. For some reason, the “subscribed” event does not come to the IOS as the peripheral when using NFR 52 as the central.

    Is it better to create a new ticket or can we make out this problem here?

    I have logs from nrf 52:

    <info> app: Start_connection for Bonded peer
    <info> app: scan_evt_handler id = 7
    <info> app: Connecting to target 0x73CB011FA706
    <info> peer_manager_im: BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE
    <info> peer_manager_im: addr_compare() True peer_id=0x1
    <info> peer_manager_handler: Previously bonded peer connected: role: Central, conn_handle: 0, peer_id: 1
    <info> peer_manager: pm_conn_sec_status_get()
    <info> peer_manager: pm_conn_secure() conn_handle=0 force_repairing=0
    <info> app: PM_EVT_CONN_SEC_PARAMS_REQ: peer_id=0x1
    <info> peer_manager_im: im_master_id_is_valid()
    <info> peer_manager_handler: Connection security procedure started: role: Central, conn_handle: 0, procedure: Encryption
    <info> app: PM_EVT_CONN_SEC_START: peer_id=0x1
    <info> peer_manager: pm_peer_rank_highest()
    <info> peer_manager_handler: Peer data updated in flash: peer_id: 1, data_id: Peer rank, action: Update
    <info> app: PM_EVT_PEER_DATA_UPDATE_SUCCEEDED: 0, peer_id=0x1, data_id=6, action=0
    <info> app: PM_EVT_BONDED_PEER_CONNECTED: 0  peer_id=0x1 state=0x0
    <info> peer_manager_handler: Previously stored local DB applied: conn_handle: 0, peer_id: 1
    <info> app: PM_EVT_LOCAL_DB_CACHE_APPLIED: peer_id=0x1
    <info> peer_manager: pm_conn_sec_status_get()
    <info> peer_manager: pm_conn_secure() conn_handle=0 force_repairing=0
    <info> app: PM_EVT_CONN_SEC_PARAMS_REQ: peer_id=0x1
    <info> peer_manager_im: im_master_id_is_valid()
    <info> peer_manager_handler: Connection security procedure started: role: Central, conn_handle: 0, procedure: Encryption
    <info> app: PM_EVT_CONN_SEC_START: peer_id=0x1
    <info> app: BLE_GAP_EVT_CONNECTED: 0 peer_id=0x1
    <info> app: multi_qwr_conn_handle_assign(). conn_handle=0x0
    <info> app: Searching for NUS on conn_handle 0x0
    <info> ble_db_disc: Starting discovery of service with UUID 0x1 on connection handle 0x0.
    <info> app: NRF_BLE_GATT_EVT_ATT_MTU_UPDATED: 0 att_mtu_effectiv = 100.
    <info> ble_db_disc: Starting discovery of service with UUID 0x1 on connection handle 0x0.
    <info> app: BLE_GATTC_EVT_EXCHANGE_MTU_RSP: 0
    <info> peer_manager_handler: Connection secured: role: Central, conn_handle: 0, procedure: Encryption
    <info> peer_manager: pm_peer_rank_highest()
    <info> peer_manager_handler: Peer data updated in flash: peer_id: 1, data_id: Peer rank, action: Update
    <info> app: PM_EVT_PEER_DATA_UPDATE_SUCCEEDED: 0, peer_id=0x1, data_id=6, action=0
    <info> app: PM_EVT_CONN_SEC_SUCCEEDED: 0 peer_id=0x1
    <info> app: BLE_GAP_EVT_CONN_SEC_UPDATE: 0
    <info> peer_manager_handler: Connection secured: role: Central, conn_handle: 0, procedure: Encryption
    <info> peer_manager: pm_peer_rank_highest()
    <info> peer_manager_handler: Peer data updated in flash: peer_id: 1, data_id: Peer rank, action: Update
    <info> app: PM_EVT_PEER_DATA_UPDATE_SUCCEEDED: 0, peer_id=0x1, data_id=6, action=0
    <info> app: PM_EVT_CONN_SEC_SUCCEEDED: 0 peer_id=0x1
    <info> app: BLE_GAP_EVT_CONN_SEC_UPDATE: 0
    <info> ble_db_disc: Found service UUID 0x1.
    <info> app: BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP: 0
    <info> app: BLE_GATTC_EVT_CHAR_DISC_RSP: 0
    <info> app: BLE_GATTC_EVT_CHAR_DISC_RSP: 0
    <info> app: BLE_GATTC_EVT_DESC_DISC_RSP: 0
    <info> app: SPIS. Stop transaction by timeout.
    <info> app: BLE_DB_DISCOVERY_COMPLETE: 0
    <info> app: ble_nus_c_evt_handler(): conn_handle=0x0, evt_type=0x0
    <info> app: BLE_NUS_C_EVT_DISCOVERY_COMPLETE: 0
    <info> app: nus_tx_handle=0x3A nus_tx_cccd_handle=0x3C nus_rx_handle=0x36 
    <info> ble_nus_c: ble_nus_c_tx_notif_enable() 



    If I use the Android application “NRF Connect” as a central to connect to IOS as the peripheral, then all events come to IOS.

    Logs from Android application “NRF Connect”:



    I apologize for my English.

  • Could you capture a sniffer trace  ? We need to check if the notification is actually sent.

  • We checked 2 scenarios:
    1. connection of the nFR Connect application as central and the application on the iOs with UART service as peripheral . Everything works fine and the iOs application accepts “subscribed” event if has been send event "Notification enabled" from nFR Connect.
    2. connection of the application ble_app_uart_c (SDK 15.3) on board PCA10040 and the application on the iOs phone as peripheral. We see that ble_app_uart_c sent "Notification Enable" to peripheral via call ble_nus_c_tx_notif_enable() but iOs app does not received  “subscribed” event. The similar app on Android phone works fine.

Related