Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

softdevice S140 v6.0.0: how to set the channel mask for different channels

Hi

Can you please provide an example/pseudo-code on how the channel_mask member in the ble_gap_adv_params_t struct is used? The only examples provided in the SDK and the migration document set the entire member to {0} and it is unclear how this should used. In other words, what should we set the channel_mask to if we want to use channels 37, 38, and 39. We have tried the pseudocode below but starting advertising failed:-

s_adv_params.channel_mask[0] = 0xFF;
s_adv_params.channel_mask[1] = 0xFF;
s_adv_params.channel_mask[2] = 0xFF;
s_adv_params.channel_mask[3] = 0xFF;
s_adv_params.channel_mask[4] = 0x1F;

We are using softdevice S140 v6.0.0 and SDK 15.0.0 on an nRF52840 PDK.

Thanks

Youssif

Related