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

Get Scan Response Packet over BLE Mesh

Hi,

I'm working on a BLE scanner which need collect data from the beacon's scan response packet. 

As far as I test, the current mesh beaconing example cannot get the scan response packet itself unless other scanners (nrf Connect App) keep scan.

I assume the mesh scanner does not has active scan functions and will not send  SCAN REQ, pls corrrect me if I was wrong.

I have checked the mesh advertiser and scanner configs but didn't find any related params. Does mesh support active scan? Is there any way to get scan response packet from the beacon?

Please guide me if it is possible.

Thanks.

Parents
  • Hi,

    Your observations are correct. Active scanning is not supported. In order to do active scanning concurrently with running our Bluetooth mesh stack, you need to combine with the scan module from nRF5 SDK. See Integrating Mesh into nRF5 SDK examples. Note that if going for this solution, the radio time spent for active scanning will not be available to the Bluetooth mesh stack. That is, the packets will only be available to the non-mesh nRF5 SDK module.

    Regards,
    Terje

  • Hi Terje,

    According to the document, "If your application requires active scanning or needs to initiate a connection, the scan parameters should be set as conservatively as possible. Long scan intervals with short scan windows will give the Mesh as much time as possible for its own radio activity.". While in my case the mesh node need keep active scanning to collect data from the beacon response which mean I may need a longer scan window. Will it effect the performence? Any suggestion on scan interval and windoiw setting?

    As far as I tried the scanner could not get the response properly although I can catch the SCAN_REQ and SCAN_RSP packet between node and beacon  frequently from sniffer. 

Reply
  • Hi Terje,

    According to the document, "If your application requires active scanning or needs to initiate a connection, the scan parameters should be set as conservatively as possible. Long scan intervals with short scan windows will give the Mesh as much time as possible for its own radio activity.". While in my case the mesh node need keep active scanning to collect data from the beacon response which mean I may need a longer scan window. Will it effect the performence? Any suggestion on scan interval and windoiw setting?

    As far as I tried the scanner could not get the response properly although I can catch the SCAN_REQ and SCAN_RSP packet between node and beacon  frequently from sniffer. 

Children
  • Hi,

    This will always be a tradeoff between how much time do you use for active scanning (that is, how much time is spent in scan window), and how much time do you use for running the Bluetooth mesh stack.

    If you choose scan parameters so that the scan window is 10 % of the scan interval, then you should expect to get the scan response from roughly 10 % of the advertisements. With that setting you should expect the node to receive 90 % of the amount of Bluetooth mesh packets it receives when not concurrently doing active scanning. That is, at any one point in time, your node would either do active scanning or it would be able to receive Bluetooth mesh packets, but not both at the same time.

    You should tune the ratio between scan window and scan interval so that you still get good participation in the Bluetooth mesh network, but also get as many full advertisements as possible.

    What is the advertising interval for the advertisers? You should make sure that scan interval and advertising interval are not chosen in such a way that one perfectly divides the other, as in that case they would be almost perfectly synced and you risk scanning and advertising not to happen at the same time for prolonged periods of time.

    Regards,
    Terje

  • Thanls for clarify that. I'm trying to tune the ratios between two stacks, looks it could work.

    Will nordic include the active scan feature into mesh stack in future?

Related