This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to make advertisement non connectable and non scannable in ble_app_uart example?

I am using S112 softdevice along with SDK 15.1.1. The chip that I am using is nRF52832 and ble uart example

I want to make advertisement non connectable and non scannable at certain point. For this I am adding code from ble_app_beacon to ble_app_uart. 

My question is does softdevice S112 support ble beacon soft device calls?

Also is this the right approach to refer beacon code and add to uart example?

Parents
  • Hello,

    The ble_app_beacon example is not using the advertising module that the ble_app_uart example (and most other examples) is using. However, this advertising module is using the softdevice API that the ble_app_beacon is using, so using this API directly shouldn't really be a problem. But I believe you need to stop advertising with the advertising module before you start advertising using the ble_app_beacon implementation. This applies for all use cases, regardless of what API you are using. The Softdevice can only have one advertising set active at any point in time. 

    I see that the advertising module used in ble_app_uart isn't really that configure-friendly when you want unconnectable advertisements, because it sets p_advertising->adv_params.properties.type = BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED directly in the ble_advertising_start(), so it is not possible to change this without either changing the implementation in ble_advertising.c or by using the API directly, like in the ble_app_beacon example.

    Best regards,

    Edvin

Reply
  • Hello,

    The ble_app_beacon example is not using the advertising module that the ble_app_uart example (and most other examples) is using. However, this advertising module is using the softdevice API that the ble_app_beacon is using, so using this API directly shouldn't really be a problem. But I believe you need to stop advertising with the advertising module before you start advertising using the ble_app_beacon implementation. This applies for all use cases, regardless of what API you are using. The Softdevice can only have one advertising set active at any point in time. 

    I see that the advertising module used in ble_app_uart isn't really that configure-friendly when you want unconnectable advertisements, because it sets p_advertising->adv_params.properties.type = BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED directly in the ble_advertising_start(), so it is not possible to change this without either changing the implementation in ble_advertising.c or by using the API directly, like in the ble_app_beacon example.

    Best regards,

    Edvin

Children
Related