How to set Unconectable Advertisement?

Hi, I’m trying to Advertise as NonConnectable, but without luck.
When .code = GAPM_ADV_NON_CONN there is no advertisement at all,
when changed to .code = GAPM_ADV_UNDIRECT all works.

struct gapm_start_advertise_cmd advertiseCmd =
{
    .op = {
        .code = GAPM_ADV_NON_CONN,
        .addr_src = GAPM_STATIC_ADDR,
        .state = 0
    },
    .intv_min = GAPM_DEFAULT_ADV_INTV_MIN,
    .intv_max = GAPM_DEFAULT_ADV_INTV_MAX,
    .channel_map = GAPM_DEFAULT_ADV_CHMAP,
    .info.host = {
        .mode = GAP_GEN_DISCOVERABLE,
        .adv_filt_policy = ADV_ALLOW_SCAN_ANY_CON_ANY
    }
};

What I’m missing, why I can’t view advertisement when GAPM_ADV_NON_CONN is used?
Thanks!

Hi @Karlis

There are a few factors to take into account when switching to non-connectable advertising:

  • Minimal Advertising interval is 100 ms as opposed to 20 ms when connectable.
    .intv_min >= 160
  • There should be no scan response data set.
    .info.host.scan_rsp_data_len = 0
  • Advertising mode needs to be set to Broadcaster.
    .info.host.mode = GAP_BROADCASTER_MODE

For full details you can refer to the documentation of GAPM_START_ADVERTISE_CMD comand in the GAP Interface Specification (RW-BLE-GP-IS_2mbps.pdf) that is provided with RSL10 Software.

Best regards,
Lukas

3 Likes

Hi Lukas!
Thanks for clarification!

Have a nice day!

3 Likes