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

scanning and connection establishment parameters

Hi,

I have a question about scan window and interval [I'm using nrf51822aa with s130 2.0.1... I performing some tests and I find a use case: If I set both of them (scan interval and window) to 0x140 - 200ms then radio scans all the time, after that I stop the scanning and create connection...

Once I get event that connection is established (with connection interval 20ms) I would like to start scanning once again - with same scanning params (interval 200ms and window 200ms) - What is from my perspective not possible because scanning procedure could not use radio for 100% if connection is established... but softdevice allows me to use such params (I get NRF_SUCCESS) - even it's not possible to work with such params or am I wrong? Of course none of device is found - once I use a bit more reasonable params (interval 200ms, window 50ms) everything works just fine

Now I am wondering how is this solved/protected in softdevice that user can set such things for scanning or creating connection params?

I expose softdevice functions to end user via API with all supported params, but I see that user could also enter/trigger some strange behaviour... Should I limited user at entering params considering on number of established connections?

Thank you for info.

Best regards, Matej

Parents
  • Yes, the SoftDevice will accept such parameters even though it has a connection. It will schedule connection and scanning events. See this for more information about scheduling.

    The SoftDevice does not protect against this, it expect the user to select paramters that make sense.

    I absolutely think it makes sense to limit the parameters the user can enter.

  • Hm, ok... in that case is doxygen comment maybe a bit misleading.

    We have configured SoftDevice to support 1 peripheral link and 2 central links... We ( your SoftDevice ;) ) also support observing and broadcasting and we expose all of that to end customer. It's a bit hard to say how to limit user with those params; some of customers need just observer, other needs advertising + peripheral link and of course some of them need whole package (1+2, Observer or Broadcaster). Your SoftDevice is amazing and I somehow expected that you also have check for configuration which is actuall not possible from timeslot perspective.

    Probably you have some reason that this is done in that way and you not limiting end user... What about priorities, why peripheral link gets on hold and observer gets higher priority?

    Thank you

Reply
  • Hm, ok... in that case is doxygen comment maybe a bit misleading.

    We have configured SoftDevice to support 1 peripheral link and 2 central links... We ( your SoftDevice ;) ) also support observing and broadcasting and we expose all of that to end customer. It's a bit hard to say how to limit user with those params; some of customers need just observer, other needs advertising + peripheral link and of course some of them need whole package (1+2, Observer or Broadcaster). Your SoftDevice is amazing and I somehow expected that you also have check for configuration which is actuall not possible from timeslot perspective.

    Probably you have some reason that this is done in that way and you not limiting end user... What about priorities, why peripheral link gets on hold and observer gets higher priority?

    Thank you

Children
No Data
Related