我使用了app_timer_set method to start a timer on a connection attempt. However, if I am connecting to two devices at the 'same' time there is no way to indicate in the app_timer_set call a parameter that would indicate which connection attempt timed out. Thus if I get a timeout (the app_conn_timer_handler gets signaled), I do not know which device signaled the timeout. Is there a way one can pass some type of application parameter into the timer so I know which timeout was signaled (if any)?
Thanks
Hi Brian,
If you use different timers for different connecting process, then you will be able to know which connecting timeout. If you use one timer for different connecting process, it already conflict when you kick the timer off.
Regards!
PY
As far as I can tell the only control I have over what timer is used is in the APP_CONN_TIMER parameter which must be mapped to a function. So is one to create several such ids mapping each to the same function, for example int app_conn_timer_handler(ke_msg_id_t const msgid, ...) and use a switch statement in the callback using msgid to identify the caller?