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

simultaneous advertising and scanning

Currently I am scanning with a window of ~23ms and an interval of ~33ms.  I am also advertising with an advertising interval of ~330ms.  Using radio events, I notice that the radio is active for ~3ms when advertising.  However, when advertising occurs, an entire scan interval (33ms) occurs with no scanning.  In other words, I notice that 1 scan interval is replaced with the advertising event.  That means that during an advertising event, there are ~43ms (33ms plus the last 10ms of the previous scan interval) where there is no active scanning.

For my particular project, I cannot go more than 10ms without scanning, and I need to scan at a minimum window of 23ms.  Is it possible for the advertising to occur somewhere in the ~10ms where scanning is not occurring?  If not, is there a way to change my scanning/advertising approach such that I don't go ~43 ms without scanning?

Parents
  • Hey Matthew,

    The easiest option is to scan for shorter windows and intervals, thereby continually scanning. 

    Do you mind sharing some more details about your communication needs? I might be able to help you find a better solution. 

    Cheers,

    Håkon.

  • Hakon,

    My product works with an off the shelf wireless BLE switch.  When the switch is pressed, 3 1ms advertisements are sent out, then 20ms lapse, 3 more 1ms advertisements are sent out, another 20ms lapses, then finally 3 more 1ms advertisements are sent out.  It is recommended that I scan 23ms out of at least 33ms in order to ensure the best chance of receiving the switch advertisement.  Right now, I am advertising only to support OTA updates.  If I make a connection while I am advertising, I am no longer concerned with scanning and can stop scanning if I need to.

     I recently tried a different approach where I scan for 10ms window and 10ms interval.  I changed my advertising interval to 760ms.  This seems to help.  I thought that when advertising occurs that I would not scan for 10ms.  However, using radio events it appears that I stop scanning for 2 scanning intervals, or 20ms, when I'm advertising.

    This seems to be a better approach?  Do you know of the mimimum scanning interval required such that only 1 scanning interval will be skipped when advertising?

    Thanks,

    Matthew

  • I tried using a scan window of 311.25ms, a scan interval of 318.75ms, and an advertising interval of 318.75ms.  This results in periods of 318.75 where I am not scanning.  This will not work.  What is the best way to scan all the time except when I'm advertising?

    I tried a scanning window of 20ms, a scanning interval of 20ms, and an advertising interval of 760ms.  This results in periods of either 20ms or 40ms where I am not scanning.

    Matthew

Reply
  • I tried using a scan window of 311.25ms, a scan interval of 318.75ms, and an advertising interval of 318.75ms.  This results in periods of 318.75 where I am not scanning.  This will not work.  What is the best way to scan all the time except when I'm advertising?

    I tried a scanning window of 20ms, a scanning interval of 20ms, and an advertising interval of 760ms.  This results in periods of either 20ms or 40ms where I am not scanning.

    Matthew

Children
Related