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

Multiple Advertisements Using the Timeslot API

Hello,

I am currently designing a project that will advertise as two different beacons simultaneously using the Timeslot API. I have successfully implemented the nRF51-multi-role-conn-observer-advertiser example on GitHub and by using the nRF Master Control Panel application on android I can successfully see both advertisements. The problem is that I am noticing some irregularities in the waveform when I run the Timeslot advertisement alongside the SoftDevice advertisement. If i make the call to sd_ble_gap_adv_start() by itself I get an ideal waveform and if I make the call to btle_hci_adv_enable(BTLE_ADV_ENABLE) by itself I again get the ideal waveform. If I make both calls together, I get the irregularity. I have attached a screen capture from my oscilloscope to show the irregularity.

image description

I have set up my Timeslot advertisement to advertise at a rate of 100ms and my SoftDevice to advertise at a rate of 1285ms

static void timeslot_advertiser_init(void)
{
btle_cmd_param_le_write_advertising_parameters_t adv_params;

/* we use software interrupt 1 */
btle_hci_adv_init(SWI1_IRQn);

/* BLE on-air address */
static ble_gap_addr_t ble_addr;

uint32_t err_code = sd_ble_gap_address_get(&ble_addr);
   APP_ERROR_CHECK(err_code);


memcpy((void*) &adv_params.direct_address[0], (void*) &ble_addr.addr[0], BTLE_DEVICE_ADDRESS__SIZE);

/* want to maximize potential scan requests */
adv_params.channel_map = BTLE_CHANNEL_MAP_ALL;
adv_params.direct_address_type = BTLE_ADDR_TYPE_RANDOM;
adv_params.filter_policy = BTLE_ADV_FILTER_ALLOW_ANY;
adv_params.interval_min = BLE_ADV_INTERVAL_100MS;
adv_params.interval_max = BLE_ADV_INTERVAL_105MS;

adv_params.own_address_type = BTLE_ADDR_TYPE_RANDOM;

/* Only want non-connectable requests */
adv_params.type = BTLE_ADV_TYPE_NONCONN_IND;

btle_hci_adv_params_set(&adv_params);
}

The waveform irregularity appears to occur about once every second.I am having difficulty understanding where this irregularity comes from and how to remove it. Any help you could provide would be greatly appreciated.

I am using the S110 SoftDevice version 7.1.0 and SDK 7.2.0

Thank You,

Cory

  • The primary reason is because I am trying to conform to the iBeacon spec set by Apple but I also want my own custom advertisement as well, since the fastest undirected advertisement interval I can achieve is 100ms, changing the advertisement data means I will miss an iBeacon advertisement which isn't a violation of the spec, i'm just shooting for no missed packets. Another reason is that I can use timeslot to advertise only non-connectable advertisements every 100ms and use the softdevice to advertise connectable advertisements every 1000ms. Using this implementation i can save power by having the majority of my packets be non-connectable. I know I can toggle the connectability of my advertisements as well but this also eliminates me having to come up with a toggling scheme where I have to have a tradeoff between power savings and having an easy time connecting to the device.

Related