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

How i can implement advertise and scanning at the same time or concurrent?

hello ,

i want to perform advertise and scanning at the same time or concurrent. so, for this task i set advertise interval 90ms and scanning interval 105ms and windows size 100ms. for this value i am losing too many packets. i am using  two beacon same (both beacon having same firmware) type nRF52832 custom board. i also use two timer, SAADC and GPIO interrupt.

My questions :-

1. Any peripheral (like timer , SAADC , GPIO interrupt ) are effected to scanning or advertising.

    - Timer1 - 100ms.

    - Timer2 - 1000ms.

    - SAADC read every 5 sec. 

2.  so, how i choose value of advertise interval and scanning interval for that i get more packets.

please help to solve this problem.

thank you.  

Parents
  • Hi 

    1. No, the use of peripherals should not affect BLE stack activity. The BLE stack has exclusive access to the highest interrupt priorities, and has dedicated peripherals that are not available to the application. 

    2. The simple way to get less conflicts is to increase the advertising interval, but that will obviously reduce the number of advertise packets sent. 

    An alternative is to try to make the scanning interval smaller, so that you don't lose as much scanning time whenever the advertiser gets priority over the scanner. 

    As an example, try to set the scanning interval and scanning window to 20ms, and you should get more overall scanning time compared to the settings you are currently using. 

    Best regards
    Torbjørn

Reply
  • Hi 

    1. No, the use of peripherals should not affect BLE stack activity. The BLE stack has exclusive access to the highest interrupt priorities, and has dedicated peripherals that are not available to the application. 

    2. The simple way to get less conflicts is to increase the advertising interval, but that will obviously reduce the number of advertise packets sent. 

    An alternative is to try to make the scanning interval smaller, so that you don't lose as much scanning time whenever the advertiser gets priority over the scanner. 

    As an example, try to set the scanning interval and scanning window to 20ms, and you should get more overall scanning time compared to the settings you are currently using. 

    Best regards
    Torbjørn

Children
Related