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

bond connection questions

Hi,

Some questions in example ble_app_hids_keyboard/main.c

  1. Why set the adv_params.timeout to zero in BLE_DIRECT_ADV (Line 779) ? That will cause no BLE_GAP_EVT_TIMEOUT event come, right?

  2. If no BLE_GAP_EVT_TIMEOUT event come, which event to count down the variable m_direct_adv_cnt in BLE_DIRECT_ADV mode (Line 781) ? The m_direct_adv_cnt always be reset on BLE_GAP_EVT_DISCONNECTED event.

  3. (removed)

My device information:

  1. S110 v7.1
  2. Use Device Manager for bond connection.

Cheers,

  • It is a bit confusing. In the BLE_DIRECTED_ADV state the device will be put in "Directed Connectable Mode" (see Bluetooth Core Specification 4.1, Volume 3, Part C, Section 9.3.3.

    Last sentence: "The Host shall configure the Controller to send directed connectable advertising events."

    In Volume 6, Part B, Section 4.4.2 (Table 4.1) you can see that ADV_DIRECT_IND should be used for connectable directed events.

    The connectable directed event type is explained in Volume 6, Part B, Section 4.4.2.4. The SoftDevice uses "High Duty Cycle Directed Advertising". This shall not last more than 1.28 seconds.

    This 1.28 seconds limit is enforced by the SoftDevice, it seems it just ignores the set timeout value.

    So, after 1.28 seconds you will get BLE_GAP_EVT_TIMEOUT, m_direct_adv_cnt will be decreased and so on.

    Regarding your issue with iOS8 and Android, could you add this as a new question? Please try to provide some more information. This may be helpful.

Related