DA14580 advertises to a specify channel
source link: https://ooso.net/archives/774
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
DA14580 advertises to a specify channel – 某人的栖息地
For BLE, Channels 37, 38, and 39 are used only for sending advertisement packets. DA14580 advertises at channel 37, 38 and 39 in the example project from Dialog. But sometimes we need it advertises to a specify channel.
Here are the channel define In the file co_bt.h
///Advertising channels enables
enum adv_channel_map
{
///Byte value for advertising channel map for channel 37 enable
ADV_CHNL_37_EN = 0x01,
///Byte value for advertising channel map for channel 38 enable
ADV_CHNL_38_EN,
///Byte value for advertising channel map for channel 39 enable
ADV_CHNL_39_EN = 0x04,
///Byte value for advertising channel map for channel 37, 38 and 39 enable
ADV_ALL_CHNLS_EN = 0x07,
///Enumeration end value for advertising channels enable value check
ADV_CHNL_END
};
Here’s the code to let DA14580 advertises to channel 37
#define APP_ADV_CHMAP ADV_CHNL_37_EN
....
struct gapm_start_advertise_cmd *cmd;
....
cmd->channel_map = APP_ADV_CHMAP;
- Tags ble
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK