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

Why are timeslots only called after ble advertising events?

I have an application that advertises as connectable in BLE.

After connection and configuration, it should then disable connectable advertising and enable nonconnectable advertising using the timeslot api.

My advertising intervals are 150ms for fast, and 700ms for slow. The timeslot nonconnectable advertisements should have a period of 300ms.

After the connection has been terminated, ble connectable advertising starts as it always does, but once ble_advertising falls back to the 700ms interval, the timeslot api does not respect my 300ms in m_beacon.timeslot_request.params.normal.distance_us = 300000;

During fast advertising, everything works well but ideally I would call sd_ble_gap_adv_stop(). Unfortunately that stops all of my timeslot advertisements too. No, I do not have sleep_mode_enter anywhere in my code.

What is the suggested workaround?

Parents
  • Hi, When you mentioned "does not respect my 300ms" what was the actual distance/interval you got ? Do you have the timeslot blocked or cancelled ? You can try to toggle a GPIO pin when the time slot started and use logic analyzer to check what is the actual interval. You can also use radio notification to detect when the stack's advertising happens.

    I assume you have 2 issue, one with the timeslot distance, and second with the sd_ble_gap_adv_stop() ? It's pretty strange that the timeslot advertisement also stopped. Have you checked it was because the timeslot was never given or because it couldn't send the radio packet when in the timeslot ?

Reply
  • Hi, When you mentioned "does not respect my 300ms" what was the actual distance/interval you got ? Do you have the timeslot blocked or cancelled ? You can try to toggle a GPIO pin when the time slot started and use logic analyzer to check what is the actual interval. You can also use radio notification to detect when the stack's advertising happens.

    I assume you have 2 issue, one with the timeslot distance, and second with the sd_ble_gap_adv_stop() ? It's pretty strange that the timeslot advertisement also stopped. Have you checked it was because the timeslot was never given or because it couldn't send the radio packet when in the timeslot ?

Children
No Data
Related