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

Why UART still undergoes connection after setting to scannable/non-connectable state

Hi so I ran this example:

https://devzone.nordicsemi.com/f/nordic-q-a/40476/unable-to-convert-to-long-range-after-looking-at-umpteen-examples--/157426#157426 

When I went to ble_advertising.c file and searched for ble_advertising_init

Under the line 502 and made edits to ensure it looks like this. (see below for photo)

p_advertising->adv_params.primary_phy = BLE_GAP_PHY_CODED;

p_advertising->adv_params.secondary_phy = BLE_GAP_PHY_CODED;

p_advertising->adv_params.properties.type = BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_SCANNABLE_UNDIRECTED; //by right this means the advertising packet is advertising but connection does not occur, however despite changing this to a nonconnectable/scannable state, the central and peripheral still connects

I do not why it still connects even after setting it to p_advertising->adv_params.properties.type = BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_SCANNABLE_UNDIRECTED;

Parents
  • Hi.

     

    p_advertising->adv_params.properties.type = BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_SCANNABLE_UNDIRECTED; //by right this means the advertising packet is advertising but connection does not occur, however despite changing this to a nonconnectable/scannable state, the central and peripheral still connects

     Strange. Is the Connected event generated in the ble handler? How do you verify that it actually connects?

    regards

    Jared 

Reply
  • Hi.

     

    p_advertising->adv_params.properties.type = BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_SCANNABLE_UNDIRECTED; //by right this means the advertising packet is advertising but connection does not occur, however despite changing this to a nonconnectable/scannable state, the central and peripheral still connects

     Strange. Is the Connected event generated in the ble handler? How do you verify that it actually connects?

    regards

    Jared 

Children
Related