How to send Advertising packet with non-connectable and non-scannable

NCS v2.9.0

nRF52832 DK

peripheral_uart sample

"Online Power Profiler for Bluetooth LE" 

 Online Power Profiler for Bluetooth LE 

has a BLE role to send non-connectable, non-scannable packet,

I want to send this kind of advertising packet to test current consumption,

	err = bt_le_adv_start(BT_LE_ADV_NCONN, ad, ARRAY_SIZE(ad), sd,
			      ARRAY_SIZE(sd));
	if (err) {
		LOG_ERR("Advertising failed to start (err %d)", err);
		return 0;
	}

use BT_LE_ADV_NCONN parameter send ADV_SCAN_IND type advertising,

it seems wrong, which parameter of 

bt_le_adv_start()

is correct for non-connectable, non-scannable advertising packet?

Parents Reply
  • 1) 

    #define BT_LE_ADV_NCONN_IDENTITY BT_LE_ADV_PARAM(BT_LE_ADV_OPT_USE_IDENTITY, \
    						 BT_GAP_ADV_FAST_INT_MIN_2, \
    						 BT_GAP_ADV_FAST_INT_MAX_2, \
    						 NULL)

    To use 

    BT_LE_ADV_NCONN_IDENTITY as parameter,
    	err = bt_le_adv_start(BT_LE_ADV_NCONN_IDENTITY, ad, ARRAY_SIZE(ad), sd,
    			      ARRAY_SIZE(sd));
    It's ADV_SCAN_IND PDU type in wireshark.
    2) 
    	err = bt_le_adv_start(BT_LE_ADV_NCONN, ad, ARRAY_SIZE(ad), sd,
    			      ARRAY_SIZE(sd));
    It's also ADV_SCAN_IND PDU type
    3) Both are TX AND RX advertising packet, 
    still can't get TX ONLY advertising packet. 
Children
Related