L2CAP Connection Parameter update request by peripheral

Hello,

I am using nrf52832 as a peripheral and running SD S112, nordic UART Profile and SDK 17.1.0 on it.

I have set the min connection interval to 10ms and max connection interval to 500ms.

When connecting to android initially android is setting interval to 7.5ms during discovery and then switches to 15ms.

However, after few transactions I see that the peripheral is requesting for the connection parameter update.

In my code I am not requesting for the update explicity.

What is the reason for this parameter update request by peripheral?

Parents Reply
  • Hi Karl,

    Removing it is not solving the issue. The parameter update request is still being sent within a second after connection. Looks like removing it initializes the parameter with value zero.

    Can you please check in the soft device code what triggers the parameter update request call ?

    This happens only with the android and not seeing the parameter update request on windows BLE. 

    Thanks,

    Justin

Children
  • Hello Karl,

    Any update on this out be great :)

    Thanks

  • Hello again, Justin

    Thank you for your patience with this - I was out of office last week, but now I am back.

    Justin said:
    Can you please check in the soft device code what triggers the parameter update request call ?

    The peripheral's parameter update request is configured using the following:

        cp_init.first_conn_params_update_delay = FIRST_CONN_PARAMS_UPDATE_DELAY;
        cp_init.next_conn_params_update_delay  = NEXT_CONN_PARAMS_UPDATE_DELAY;
        cp_init.max_conn_params_update_count   = MAX_CONN_PARAMS_UPDATE_COUNT;


    Did you remove all of these when you tested this last?

    An alternative way to stop these updates is just to increase the preferences of the peripheral to span the whole possible range (7.5 ms to 4 s) so that whatever connection parameters the central chooses will be within the peripheral preferences.

    Justin said:
    This happens only with the android and not seeing the parameter update request on windows BLE. 

    Do you have sniffer traces of this? The peripheral does not know if it is connected to an android or a windows PC, so I would assume that this means that the connection to Windows already is using parameters within the preferred range of the peripheral.

    Best regards,
    Karl

  • Thank you for working on this.

    Did you remove all of these when you tested this last?

    Yes I did remove all of these and tested but the connection breaks/disconnects after negotiation.

    An alternative way to stop these updates is just to increase the preferences of the peripheral to span the whole possible range (7.5 ms to 4 s) so that whatever connection parameters the central chooses will be within the peripheral preferences.

    This works and the update parameter request doesn't happen.

    I have set Minimum connection interval to 7.5ms

    #define MIN_CONN_INTERVAL              MSEC_TO_UNITS(7.5, UNIT_1_25_MS)

    Is setting to 7.5ms legal value and soft device recognize it?

  • Justin said:
    Thank you for working on this.

    No problem at all, I am happy to help! :) 

    Justin said:
    Yes I did remove all of these and tested but the connection breaks/disconnects after negotiation.

    What was the reason given for the disconnection? Was it the peripheral that terminated the connection?
    I will check whether the SoftDevice always assumes that an update request will be sent if the parameters used are outside of the specified preference for the peripheral.

    Justin said:

    This works and the update parameter request doesn't happen.

    I have set Minimum connection interval to 7.5ms

    #define MIN_CONN_INTERVAL              MSEC_TO_UNITS(7.5, UNIT_1_25_MS)

    Is setting to 7.5ms legal value and soft device recognize it?

    Great, I'm glad to hear that this negates your issue - there should indeed not be any connection parameter update requests if the connection parameters in use are within the preferences of the peripheral.

    A 7.5 ms connection interval is the shortest legal interval, so this is an acceptable value for the MIN_CONN_INTERVAL.

    Best regards,
    Karl

Related