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

how to set only 1 advertisement channel for mesh?

Hello devzone,

There are 3 {37,28,29} channels for advertisement & i want to advertise only on 37.

Soft: Nordic mesh v1.0.0 stack & pca10040 nrf board, light switch example.

Try 1

I saw a function set_default_advertiser_configuration() (in /mesh/bearer/src/advertiser.c) which leads me to nrf_mesh_defines.h has a #define NRF_MESH_ADV_CHAN_ALL {37, 38, 39} I changed the values to 37 & servers unable to provisioned, am i missing something to configure to advertise only 1 channel? Thanks

Try 2 

mesh/core/src/core_tx_adv.c in core_tx_adv_init() i set_channels after advertiser_instance_init

set_channels.channels.count = 1;
set_channels.channels.randomize_order = 0;
set_channels.channels.channel_map[0] = 37;

advertiser_channels_set(&m_advertisers[CORE_TX_ROLE_ORIGINATOR],&set_channels); 

Unfortunately, mesh stack unable to initialize.

Related