Is the connection idle timeout settable in runtime?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi,

The connection timeout is set at power up in the create function:

1. Our definition:

#define CONN_TIMEOUT     5          // In seconds

2. In  config array const BLE_PROFILE_CFG my_app_cfg:

...

/*.con_idle_timeout               =*/      CONN_TIMEOUT,   // In seconds

...

My question is:

Is there an API to change it later, when the code is already running?  If so, what is the call that I have to use to set it to the new value?

Thanks!

Cheers,

Gil

0 Likes
1 Solution
Anonymous
Not applicable

This is how you do it:

Maximum is 255 seconds:

UINT8 timeout;                    // Set it to any value <= 255

Example:

timeout = 10;

Code:

bleprofile_StopConnIdleTimer();

bleprofile_StartConnIdleTimer(timeout, bleprofile_appTimerCb);

The "stop" call is needed if the timer has been previously started.

Cheers,

Gil

View solution in original post

5 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

I've asked jamesle1​ on the applications team to take a look at this and respond.

Anonymous
Not applicable

Hi mwf_mmfae,

Any news from him?

Thanks.

Gil

0 Likes

No.  I am out of the office till next week, so I need to check his schedule.

0 Likes
Anonymous
Not applicable

This is how you do it:

Maximum is 255 seconds:

UINT8 timeout;                    // Set it to any value <= 255

Example:

timeout = 10;

Code:

bleprofile_StopConnIdleTimer();

bleprofile_StartConnIdleTimer(timeout, bleprofile_appTimerCb);

The "stop" call is needed if the timer has been previously started.

Cheers,

Gil

Thanks Gil.

jamesle1

0 Likes