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

Quick connection parameters update

Hello everyone,

I'm currently trying to change the connection parameters to be quick(100ms 0 slave latency) on a button press and after a timer timeout I go back to the low connection parameters.

I'm also sending a notification to an android application at the same time and then send back 2 characteristic ( LED toggle and a string for a LCD) .

It's working but it take quite a long time (10s) for my application to change the connection parameters so the 2 characteristic are not sent at quick connection parameters the first time but if I press a second time it's then updated and send it quickly.

Do you guys know a workaround this problem ?

  • Can you tell me how to check the return code please ? Is it the err_code=function(); APP_ERROR_CHECK(err_code);

  • Then you can use the slow connection parameters always and never change them. Empty LL packets ("keep-alive") will only be sent every (n + 1)'th connection interval if slave latency is n. If you do a notification, it can be sent in any connection interval.

  • When I use 100-200ms cnnnection parameters and slave latency of 40 . It's really slow to write a characteristic( maybe 2-3s).

    Edit : I tried with 4 slave latency .It's kinda quick but every 5 second I have a little burst in the current consumption.is It because of NEXT_CONN_PARAMS_UPDATE_DELAY(It's 5s for me ) ?

    Edit 2 : Nope , I changed it and it's not because of NEXT_CONN_PARAMS_UPDATE_DELAY

  • Ok I fell like i'm on the right path ! So I'm still doing the connection parameter update because I really need a good reponse of the device from the smartphone. So my problem now is that the change seems to work only once( the first time I click on the button) then no response .

    I got that [13:41:29.1] Received Connection Parameter Update Request [13:41:29.1] ConnectionParameterUpdateResponse sent with ACCEPTED response [13:41:29.1] Connection Parameters Update sent. ConnInterval:100.0ms, SlaveLatency:0, SupervisionTimeout:4000.0ms [13:41:29.5] Received a HandleValueNotification on handle 000E with value 01 [13:41:35.2] Received Connection Parameter Update Request [13:41:35.2] ConnectionParameterUpdateResponse sent with ACCEPTED response [13:41:35.2] Connection Parameters Update sent. ConnInterval:200.0ms, SlaveLatency:5, SupervisionTimeout:10000.0ms [13:41:38.7] Received Connection Parameter Update Request [13:41:38.7] ConnectionParameterUpdateResponse sent with ACCEPTED respons

  • [13:41:38.7] ConnectionParameterUpdateResponse sent with ACCEPTED response [13:41:38.7] Connection Parameters Update sent. ConnInterval:200.0ms, SlaveLatency:5, SupervisionTimeout:10000.0ms [13:42:33.9] Received a HandleValueNotification on handle 000E with value 01

    the last line is when I reclick on the button.

Related