How to test one channel Advertising?

Dear Nordic

how i test one channel advertising?

I change inside advertising_init() 

   ble_gap_adv_params_t m_adv_params;

   m_adv_params.channel_mask[4] =0x60;       // advertising only in channel 39

Is it right way  or anything additional settings needed?

Tested in nrf52832 DK using SDK 15 its advertising but i don't know is this work properly how i know its advertising only in channel 39

can you help me to achieve this?

Parents Reply Children
  • Thank you

    I tested this with two device one is act as receiver and other is for advertising 

    Advertiser Side:-

    I change inside advertising_init() 

       ble_gap_adv_params_t m_adv_params;

       m_adv_params.channel_mask[4] =0x60;       // advertising only in channel 39

    and also i changed Receiver side:-

    static ble_gap_scan_params_t const m_scan_params =
    {
    .extended = 1,
    .active = 1,
    .interval = SCAN_INTERVAL,
    .window = SCAN_WINDOW,
    .timeout = SCAN_DURATION,
    .scan_phys = BLE_GAP_PHY_1MBPS,
    .filter_policy = BLE_GAP_SCAN_FP_ACCEPT_ALL,
    .channel_mask[4] =0x80,    
    };

    this is for scanning channel 38 and 37 

    Here i get the advertising packets in 38 and 37 channel

    is it any wrong in my procedure?

    set Advertising ---->39 channel

    set Scanning----->37 and 38 channel

    but i get advertising in 37 and 38 channels

    can you help me to solve this issue?

  • Can you init as it is intended by:

    m_adv_params.channel_mask.ch_37_off = 1;
    m_adv_params.channel_mask.ch_38_off = 1;

    Instead of:

    m_adv_params.channel_mask[4] =0x60;

  • Thank you for reply I am using SDK 15

    and i tried to like you said above in advertising_init() but its show error that's why I am using (m_adv_params.channel_mask[4] =0x60;)

    but advertising in one channel is not working 

    can you help how to implement this in my application?

  • Seems they always change the parameters..

    I have now tried ble_app_beacon example, with only one addition in advertising_init():
    m_adv_params.channel_mask[4] = 0x60; 

    I can confirm it only advertise on channel 39 using an Ellisys Bluetooth sniffer.

    Best regards,
    Kenneth

  • Thank you

    I set 39 channel  for Advertising and in scanner 37 and 38 channel for scanning

    Modification in Advertiser:-

    m_adv_params.channel_mask[4] = 0x60; (for 39 channel)

    Modification in Scanner:-

    static ble_gap_scan_params_t const m_scan_params =
    {
    .extended = 1,
    .active = 1,
    .interval = SCAN_INTERVAL,
    .window = SCAN_WINDOW,
    .timeout = SCAN_DURATION,
    .scan_phys = BLE_GAP_PHY_1MBPS,
    .filter_policy = BLE_GAP_SCAN_FP_ACCEPT_ALL,
    .channel_mask[4] =0x80,
    };

    for 37 and 38 channel scanning

    but scanner gets Advertising is it any wrong in my procedure?

Related