From bdd9e44e2b50289b8062963848fa3dda273fa729 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens <hauke@hauke-m.de> Date: Mon, 30 Dec 2019 13:51:53 +0100 Subject: [PATCH] fix(ble): Improve timeout values Instead of setting these values to 0, use the same settings as used in lib/sdk/Libraries/BTLE/stack/ble-host/sources/stack/cfg/cfg_stack.c from the Cordio SDK instead of 0. In my small test these value sare not use in the normal pairing process, so I think this is not fixing any problem. Fixes: 4107bd22d34e ("hack(ble): Temporarily silence a warning") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> --- epicardium/ble/ble_main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/epicardium/ble/ble_main.c b/epicardium/ble/ble_main.c index 3fec7ce4..2fda1fd7 100644 --- a/epicardium/ble/ble_main.c +++ b/epicardium/ble/ble_main.c @@ -122,11 +122,9 @@ static const smpCfg_t bleSmpCfg = 16, /*! Maximum encryption key length */ 3, /*! Attempts to trigger 'repeated attempts' timeout */ DM_AUTH_MITM_FLAG, /*! Device authentication requirements */ - - /* TODO: The following three parameters should probably get proper values */ - 0, /*! Maximum 'Repeated attempts' timeout in msec */ - 0, /*! Time msec before attemptExp decreases */ - 0, /*! Exponent to raise attemptTimeout on maxAttempts */ + 64000, /*! Maximum 'Repeated attempts' timeout in msec */ + 64000, /*! Time msec before attemptExp decreases */ + 2, /*! Exponent to raise attemptTimeout on maxAttempts */ }; /* Configuration structure */ -- GitLab