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

irk saved but android 5.0 cannot reconnect to s110

Hi, we have two devices using android 5.0 have this issue.

  1. bonding to s110, irk_counter=1; s110 uses whitelist advertising. android 5.0 device can reconnect to s110.

  2. android 5.0 device delete bonding info, and rebonding to s110, irk_counter=2; s110 uses whitelist advertising. android 5.0 device cannot reconnect to s110.

  3. s110 uses advertising without whitelist, android 5.0 device can reconnect to s110.

iPhone5s and android 4.4 device can do it right. Anyone have similar issue like me? thanks.

S110 + SDKv6.1 + SDv7.1

======================================================================================

07/13:

And about ble_app_proximity example in SDK, we can only find it in SDK8.1.0 (in pack installer also), but our s110 is rev2, it seems that we cannot test this example. Or do you know where to get SDK6.1 version? Thanks.

update: iPhone5s also cannot reconnect to S110 using whitelist advertising after rebonding.

my whitelist parameter:

whitelist.addr_count = BLE_GAP_WHITELIST_ADDR_MAX_COUNT;
whitelist.irk_count  = BLE_GAP_WHITELIST_IRK_MAX_COUNT;
whitelist.pp_addrs   = p_whitelist_addr;
whitelist.pp_irks    = p_whitelist_irk;

err_code = dm_whitelist_create(&m_app_handle, &whitelist);
APP_ERROR_CHECK(err_code);

if ((whitelist.addr_count != 0) || (whitelist.irk_count != 0))
{
    adv_params.type        = BLE_GAP_ADV_TYPE_ADV_IND;
    adv_params.p_peer_addr = NULL;    // Undirected advertisement.
    adv_params.interval    = APP_ADV_INTERVAL;
    adv_params.timeout     = 0;
    adv_params.fp          = BLE_GAP_ADV_FP_FILTER_BOTH;
    adv_params.p_whitelist = &whitelist;
    advertising_init(BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED);    
}
Parents
  • @Now:

    image description

    From the sniffer trace you sent, as shown in the picture, what I can tell is:

    • The master (the tablet) is managed to connect. Which meant it went throught the whitelist successfully .
    • The master tried to rebond, this is strange, because you mentioned that you erased bond information (forget the device in Bluetooth setting). I don't know why the tablet still want to rebond. You can find the LL_ENC_REQ sent from the master. This is not normal. When the bond information is deleted from the tablet, it should not sent this request. After this, the slave tried to start the encryption (LL_START_ENC_REQ), but the master encrypted response (LL_START_ENC_RSP) was most likely wrong. So we can see the central keep retrying until it's timed out.

    What did you do to erase bonding information on the Nexus 7 ? Which app did you use to test?

    Could you try to use the nRF Master Control panel app for testing ?

    Could you also attach the trace for iPhone 5 ?

    You can try SDK v6.x with S110 v7.x for testing with XLR2. You can download the .zip file for the SDK (don't use pack) here.

Reply
  • @Now:

    image description

    From the sniffer trace you sent, as shown in the picture, what I can tell is:

    • The master (the tablet) is managed to connect. Which meant it went throught the whitelist successfully .
    • The master tried to rebond, this is strange, because you mentioned that you erased bond information (forget the device in Bluetooth setting). I don't know why the tablet still want to rebond. You can find the LL_ENC_REQ sent from the master. This is not normal. When the bond information is deleted from the tablet, it should not sent this request. After this, the slave tried to start the encryption (LL_START_ENC_REQ), but the master encrypted response (LL_START_ENC_RSP) was most likely wrong. So we can see the central keep retrying until it's timed out.

    What did you do to erase bonding information on the Nexus 7 ? Which app did you use to test?

    Could you try to use the nRF Master Control panel app for testing ?

    Could you also attach the trace for iPhone 5 ?

    You can try SDK v6.x with S110 v7.x for testing with XLR2. You can download the .zip file for the SDK (don't use pack) here.

Children
  • What did you do to erase bonding information on the Nexus 7 ? Which app did you use to test?

    we just imitate the user behavior, and we tried Nordic UART and our own APP.

    Could you try to use the nRF Master Control panel app for testing ?

    You mean to simulate android device to connect to our developing device?

    Could you also attach the trace for iPhone 5 ?

    iPhone has the same behavior as Android L, since they both use IRK... do you still need that? If yes, I'll upload it later.

    You can try SDK v6.x with S110 v7.x for testing with XLR2. You can download the .zip file for the SDK (don't use pack) here.

    Just tried ble_app_proximity example; it make s110 continuely tried to connect and bond iPhone5s , (with nRFready Proximity App to test), although it has whitelist advertising status, we're not sure if it really work on whitelist advertising... it seems that it cannot save bonded device with the exmaple setting.

    we use "nRF51-ble-app-uart-static-passkey-master.zip" on gitHub to be our base.

    -Thanks.

  • we'll upload two sniffer log later, one is for rebonding and connect without whitelist advertising, the other is for rebonding and cannot connect with whitelist advertising.

  • @Now:

    • When you test with the proximity, please make sure you have deleted bond on both the phone and the nRF51 (use erase all to clean the flash).

    • Usually after you have unbond (select FORGET in bluetooth setting menu on Android setting), the tablet should not try to re-encrypt the link, because it should treat the nRF51 as a new device.

    • Yes, please provide the trace with iPhone 5

  • Hi Hung, before getting other sniffer log, a quick reply for this:

    The master tried to rebond, this is strange, because you mentioned that you erased bond information (forget the device in Bluetooth setting). I don't know why the tablet still want to rebond. You can find the LL_ENC_REQ sent from the master. This is not normal. When the bond information is deleted from the tablet, it should not sent this request. After this, the slave tried to start the encryption (LL_START_ENC_REQ), but the master encrypted response (LL_START_ENC_RSP) was most likely wrong. So we can see the central keep retrying until it's timed out.

    Because I do re-bond in android setting after deleting first bond info, and it was done successfully. Then I use nordic UART APP, it finded S110 and tried to connect to it with LTK.

  • @Now: I would not suggest to try to bond inside android setting. It should be better to trigger bonding in app, not in Bluetooth setting. I know there is nothing wrong with your approach, but I suspect there could be smth wrong with the implementation on Android (bond not really erased until you quit the bluetooth setting).

    You can try to use our nRF master control panel app for testing. If you try to read an encrypted characteristic, it will trigger bonding on the phone.

Related