This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

S130 simultaneous scan & advertise problem

I'm trying to implement a simultaneous broadcaster observer by calling ble_gap_adv_start() and sd_ble_gap_scan_start() and waiting for respective events.

If I call advertising start first and scan start second, everything works fine. However, if I call scan start first and advertising start second, ble_gap_adv_start() returns invalid state.

The reason I need to call advertising start second, is that I'm always scanning but advertising only when I scan something of interest.

Am I doing something wrong?

Thanks,

K

Parents
  • I've tried varying all the parameters, for example, making scan window 10ms out of 90ms, and advertising at 90ms interval. This should certainly have plenty of time to schedule advertisement between scan windows.

    Strangely, if I do the start/stop thing, I can get advertising interval that's smaller that scan window and somehow get both (although at unknown rate because we don't have an RF sniffer). Do you know what happens in that case (what takes priority scan or adv)?

Reply
  • I've tried varying all the parameters, for example, making scan window 10ms out of 90ms, and advertising at 90ms interval. This should certainly have plenty of time to schedule advertisement between scan windows.

    Strangely, if I do the start/stop thing, I can get advertising interval that's smaller that scan window and somehow get both (although at unknown rate because we don't have an RF sniffer). Do you know what happens in that case (what takes priority scan or adv)?

Children
No Data
Related