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

Reduce current of peripheral thru latency setting?

Hi,

our device has current limitations in the range of 1mA. We were examining several ways to limit the actual connection parameters to keep current consumption low. But one will find always central devices which do not do it the "expected" way.

So the current idea is to catch current peaks thru omitting connection intervals thru slave latency.

Unfortunately the communication is bidirectional, so the mice example does not really fit.

I'm wondering now, if the following setup is legal, because documentation is not very clear about this and tests showed that it might work:

  • establish the connection with e.g. connection interval=7.5ms and latency=0
  • if current/capacitors are ok, allow communication
  • if there is a current peak detected, delay communication

"allow communication" is done by "sd_ble_opt_set( BLE_GAP_OPT_LOCAL_CONN_LATENCY, latency=0 )", "delay communication" is done by "sd_ble_opt_set( BLE_GAP_OPT_LOCAL_CONN_LATENCY, latency=3 )".

Comments / suggestions are highly welcome!

Hardy

Parents Reply Children
  • The picture below shows connection establishment done with LightBlue Explorer.  With our application the graph is quite similar except that the actual communication starts on the right side.

    But as already said, our problem is connection establishment.  Android (>=7) switches to high speed during GATT queries and there is nothing we can do about it, how it sets the connection interval and how the softdevice is responding.

    For the record: for the high speed interval in the center and the right part, local slave latency was set to 4.

    Image shows module current measured on an in series 200R.  There are some capacitors on the module, so one does not see the actual current consumption but the recharging current.

    Another note: this connection is successful but the 1mA limit is close.  And there is really no margin for CPU activity.

    My idea would be to solve the situation thru a force local slave latency, which skips some connection events even if there are pending packets in the queue.

    Any suggestions are welcome.

    Hardy

    PS: peak on the left shows BLE_CONNECT, in the center of the image connection setup is (6,6,0,2000), on the right side it is at ~(32,32,0,2000)

  • I understand. Seems like the local slave latency is overridden during the service discovery procedure, so it will not help your application. Unfortunately there are no option to enforce local slave latency. I think the last possible solution to this would be to use the timeslot api in an effort to block ble communication. Could you try setting up a timeslot event with high priority and see if this helps to limit ble traffic?

    See sd_radio_request , sd_radio_session_open,

  • thanks for the suggestion.  Do you have an easy to use example for doing this?

  • Unfortunately we do not have an example in the SDK anymore. But you can look at the example in nRF5_SDK_11.0.0_89a8197\examples\ble_peripheral\experimental_ble_app_multiactivity_beacon. Much have changed in the SD, but I am pretty sure the timeslot api is the same.

Related