hi, i am using sdk 10, with s120.
i want to advertise data on a single channel with frequency say (2426). is there any sample code or something, with which i can play with.
thanks!!
hi, i am using sdk 10, with s120.
i want to advertise data on a single channel with frequency say (2426). is there any sample code or something, with which i can play with.
thanks!!
Hi,
If you meant BLE advertising you can look at Kristin's answer on this post: devzone.nordicsemi.com/.../
It's for S110 v8, but I have tested it in S110 and S130 v9 and it should be in SDK 10 too. You can look for ble_gap_adv_params_t --> ble_gap_adv_ch_mask_t in infocenter.nordicsemi.com/ for more information.
A tutorial on simple BLE advertising is also in devzone.nordicsemi.com/.../.
Hope it helps, FA
i am not able to understand how do i inmplement this. in ble_gap_adv_ch_mask_t structure i found 3 channel as follows
uint8_t ch_37_off : 1;
uint8_t ch_38_off : 1;
uint8_t ch_39_off : 1;
now how should i implement this in my main program. please help me. thanks!!
the struct ble_gap_adv_params_t --> ble_gap_adv_ch_mask_t give the option to turn any advertising channel OFF. i am not able to use this in my main program. how can i use this to disable the channel.
If you define:
static ble_gap_adv_params_t m_adv_params;
static ble_gap_adv_ch_mask_t ch_off;
Then in your advertising_init function you should have something like:
// Initialize advertising parameters (used when starting advertising).
memset(&m_adv_params, 0, sizeof(m_adv_params));
m_adv_params.type = BLE_GAP_ADV_TYPE_ADV_NONCONN_IND;
m_adv_params.interval = NON_CONNECTABLE_ADV_INTERVAL;
You can now just add:
ch_off.ch_37_off = 0;
ch_off.ch_38_off = 1;
ch_off.ch_39_off = 1;
m_adv_params.channel_mask = ch_off;
This will only advertise in channel 37
hi thanks for your reply, i am able to implement the channel. but when i off any one of these 3 channels then , nrf sniffer dongle is not able to detect my advertisement packet.
why it is happening I have no idea. can you please explain me why sniffer is not able to detect when i off any one of these 3 channels.
thanks!!