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

Broadcasting BLE (nonconnectable scannable)

Dear All

I want to advertise as broadcaster (not peripheral and also not as a beacon). Advertising packages do not have the information nonconnectable and even if I am using

m_advertising.adv_params.properties.type = BLE_GAP_ADV_TYPE_NONCONNECTABLE_SCANNABLE_UNDIRECTED;

it is still seen as connectable (I checked by the nrf connect desktop by using another devkit). I am using 52840 and soft device 7 via sd_ble... commands. Also a service is added with its UUID but no characteristics exist in the service.

What are the conditions that the observer understands (or assumes) that the advertising device is peripheral (connectable) or broadcaster (nonconnectable)? Or in other words, what is this type BLE_GAP_ADV_TYPE_NONCONNECTABLE really doing?

My confusion is that the advertising package does not hold any information. The first line is for example is simply the AD flags telling about the limited/general discoverable or Bluetooth classic is supported or not. But there is no info about connectable vs. nonconnectable.

Best,

Emek

Parents
  • Hello Emek,

    I believe what you are seeing is that the advertising type is set within ble_advertising_start():

    uint32_t ble_advertising_start(ble_advertising_t * const p_advertising,
                                   ble_adv_mode_t            advertising_mode)
    {
        ...
    
        p_advertising->adv_params.properties.type = BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED;
    
        ...
    }

    If you are setting this setting manually before you call ble_advertising_start(), please comment out this line from the ble_advertising_start() implementation.

    Best regards,

    Edvin

Reply
  • Hello Emek,

    I believe what you are seeing is that the advertising type is set within ble_advertising_start():

    uint32_t ble_advertising_start(ble_advertising_t * const p_advertising,
                                   ble_adv_mode_t            advertising_mode)
    {
        ...
    
        p_advertising->adv_params.properties.type = BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED;
    
        ...
    }

    If you are setting this setting manually before you call ble_advertising_start(), please comment out this line from the ble_advertising_start() implementation.

    Best regards,

    Edvin

Children
No Data
Related