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

Closing the TimeSlot API in Observer Example

I'm using the Github project github.com/NordicSemiconducto... in order to SCAN in a specific channel rather than all 3 channels. I don't want to use the timeslot API continuously, and I want to be able to activate and deactivate it.

For deactivating it (in the specific observer example) is it just enough to use: sd_radio_session_close () and disable the two interrupts: SD_EVT_IRQn and SWI0_IRQn with sd_nvic_DisableIRQ.

Parents
  • do not disable SD_EVT_IRQn if there is parallel BLE activity from softdevice other than time_slot traffic.

    Yes, closing the session will disable time-slot session and you can also disable SWI0_IRQQn if not using it.

  • Thanks, I did this. But, after closing the session, is there any way to see if it's still scanning or not? The whole purpose of using the timeslot for me was to scan in a single channel (hope that like the advertising part, a channel mask will be added for scanning in the future). I want to start advertising after this scan. However, a strange problem happened. I tried to advertise similar to the example provided by Petter for me. After using SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, NULL) in ble_stack_init function, the program jumps to the start of MAIN! This was tested on PCA20006 and S110 SDK 9. That example was working with normal scan and then adv in all 3 channels (no timeslot). But right now after closing the timeslot session and using the same functions for ADV it fails.

Reply
  • Thanks, I did this. But, after closing the session, is there any way to see if it's still scanning or not? The whole purpose of using the timeslot for me was to scan in a single channel (hope that like the advertising part, a channel mask will be added for scanning in the future). I want to start advertising after this scan. However, a strange problem happened. I tried to advertise similar to the example provided by Petter for me. After using SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, NULL) in ble_stack_init function, the program jumps to the start of MAIN! This was tested on PCA20006 and S110 SDK 9. That example was working with normal scan and then adv in all 3 channels (no timeslot). But right now after closing the timeslot session and using the same functions for ADV it fails.

Children
No Data
Related