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

Scan end event

Can I somehow catch end of scan window on S130? I need to do some processing after each scanning. Thanks!

Parents Reply Children
  • Thanks, it's helpful feature but it doesn't cover my needs. As I understand it generates notifications for any radio activity but I can't choose exactly scanning. So, I will not able to separate notifications - for example: which are because of connection and which are generated because of scanning... Correct me if I'm not right.

  • Your understanding is correct. I assumed your application was just scanning, since that was the only thing you mentioned. If you clarify your question a bit (What kind of processing? Process only on successful scans, or every scan window? What else is happening simultaneously?) it would be easier to propose a solution for you.

  • Ok. In general my app does advertising and scanning simultaneously and can be in connection with some master. During each scan app collects adv packets of other devices. After each scanning window app does many jobs like sorting, filtering collected data and makes some decision.. These all can't be done at receiving each adv data bcs it takes long time and can affect scanner's latency. So, due to that I (app) need to know when exactly scanner has finished its job (when scan window expires), otherwise collected data can be corrupted.

  • Hi Yaroslav

    A potential solution: What about starting the scan after an advertising event, get an advertising end event by setting a radio notification set at the end of a radio event. When you get the radio notification event, start scanning and set the scan timeout just slightly longer then the scan window. The softdevice will scan once and then you will get a scan timeout event at the end of the scan event, and there you will set a timer to start a new scan at a later time. What do you think?

Related