2019-08-29 15:56:24 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2019 Freie Universität Berlin
|
|
|
|
*
|
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @ingroup pkg_nimble_autoconn
|
|
|
|
*
|
|
|
|
* @{
|
|
|
|
* @file
|
|
|
|
* @brief Default configuration for the nimble_autoconn module
|
|
|
|
*
|
|
|
|
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef NIMBLE_AUTOCONN_PARAMS_H
|
|
|
|
#define NIMBLE_AUTOCONN_PARAMS_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @name Default parameters used for the nimble_netif_autoconn module
|
|
|
|
* @{
|
|
|
|
*/
|
2020-07-06 15:31:05 +02:00
|
|
|
#ifndef NIMBLE_AUTOCONN_PERIOD_SCAN_MS
|
|
|
|
#define NIMBLE_AUTOCONN_PERIOD_SCAN_MS (2000U) /* 2s */
|
2019-08-29 15:56:24 +02:00
|
|
|
#endif
|
2020-07-06 15:31:05 +02:00
|
|
|
#ifndef NIMBLE_AUTOCONN_PERIOD_ADV_MS
|
|
|
|
#define NIMBLE_AUTOCONN_PERIOD_ADV_MS (10000U) /* 10s */
|
2019-08-29 15:56:24 +02:00
|
|
|
#endif
|
2020-07-06 15:31:05 +02:00
|
|
|
#ifndef NIMBLE_AUTOCONN_PERIOD_JITTER_MS
|
|
|
|
#define NIMBLE_AUTOCONN_PERIOD_JITTER_MS (5000U) /* 0-5s */
|
2019-08-29 15:56:24 +02:00
|
|
|
#endif
|
|
|
|
|
2020-07-06 15:31:05 +02:00
|
|
|
#ifndef NIMBLE_AUTOCONN_ADV_ITVL_MS
|
|
|
|
#define NIMBLE_AUTOCONN_ADV_ITVL_MS (100U) /* 100ms */
|
2019-08-29 15:56:24 +02:00
|
|
|
#endif
|
|
|
|
|
2020-07-06 15:31:05 +02:00
|
|
|
#ifndef NIMBLE_AUTOCONN_SCAN_ITVL_MS
|
|
|
|
#define NIMBLE_AUTOCONN_SCAN_ITVL_MS (1500U) /* 1.5s */
|
2019-08-29 15:56:24 +02:00
|
|
|
#endif
|
2020-07-06 15:31:05 +02:00
|
|
|
#ifndef NIMBLE_AUTOCONN_SCAN_WIN_MS
|
|
|
|
#define NIMBLE_AUTOCONN_SCAN_WIN_MS (110U) /* 110ms */
|
2019-08-29 15:56:24 +02:00
|
|
|
#endif
|
|
|
|
|
2020-07-06 15:31:05 +02:00
|
|
|
#ifndef NIMBLE_AUTOCONN_CONN_TIMEOUT_MS
|
|
|
|
#define NIMBLE_AUTOCONN_CONN_TIMEOUT_MS (3 * NIMBLE_AUTOCONN_SCAN_WIN_MS)
|
2020-01-23 17:18:36 +01:00
|
|
|
#endif
|
2020-07-06 15:31:05 +02:00
|
|
|
#ifndef NIMBLE_AUTOCONN_CONN_ITVL_MS
|
|
|
|
#define NIMBLE_AUTOCONN_CONN_ITVL_MS (75U) /* 75ms */
|
2019-08-29 15:56:24 +02:00
|
|
|
#endif
|
|
|
|
#ifndef NIMBLE_AUTOCONN_CONN_LATENCY
|
|
|
|
#define NIMBLE_AUTOCONN_CONN_LATENCY (0)
|
|
|
|
#endif
|
2020-07-06 15:31:05 +02:00
|
|
|
#ifndef NIMBLE_AUTOCONN_CONN_SVTO_MS
|
|
|
|
#define NIMBLE_AUTOCONN_CONN_SVTO_MS (2500U) /* 2.5s */
|
2019-08-29 15:56:24 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef NIMBLE_AUTOCONN_NODE_ID
|
|
|
|
#define NIMBLE_AUTOCONN_NODE_ID "RIOT-autoconn"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef NIMBLE_AUTOCONN_PARAMS
|
2020-07-06 15:31:05 +02:00
|
|
|
#define NIMBLE_AUTOCONN_PARAMS \
|
|
|
|
{ .period_scan = NIMBLE_AUTOCONN_PERIOD_SCAN_MS, \
|
|
|
|
.period_adv = NIMBLE_AUTOCONN_PERIOD_ADV_MS, \
|
|
|
|
.period_jitter = NIMBLE_AUTOCONN_PERIOD_JITTER_MS, \
|
|
|
|
.adv_itvl = NIMBLE_AUTOCONN_ADV_ITVL_MS, \
|
|
|
|
.scan_itvl = NIMBLE_AUTOCONN_SCAN_ITVL_MS, \
|
|
|
|
.scan_win = NIMBLE_AUTOCONN_SCAN_WIN_MS, \
|
|
|
|
.conn_timeout = NIMBLE_AUTOCONN_CONN_TIMEOUT_MS, \
|
|
|
|
.conn_itvl = NIMBLE_AUTOCONN_CONN_ITVL_MS, \
|
|
|
|
.conn_latency = NIMBLE_AUTOCONN_CONN_LATENCY, \
|
|
|
|
.conn_super_to = NIMBLE_AUTOCONN_CONN_SVTO_MS, \
|
2019-08-29 15:56:24 +02:00
|
|
|
.node_id = NIMBLE_AUTOCONN_NODE_ID, }
|
|
|
|
#endif
|
|
|
|
/**@}*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief nimble_netif_autoconn configuration
|
|
|
|
*/
|
|
|
|
static const nimble_autoconn_params_t nimble_autoconn_params =
|
|
|
|
NIMBLE_AUTOCONN_PARAMS;
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* NIMBLE_AUTOCONN_PARAMS_H */
|
|
|
|
/** @} */
|