/** * @file app_user_config.h * @brief BLE application user configuration (advertising, connection, security, * profile and log switches). Included by the SDK rwip_config.h. */ #ifndef _APP_USER_CONFIG_H_ #define _APP_USER_CONFIG_H_ #include "ns_adv_data_def.h" /* Device name */ #define CUSTOM_DEVICE_NAME "CAIIC-MCM" /* adv configer*/ #define CUSTOM_ADV_FAST_INTERVAL 160 /**< Fast advertising interval (in units of 0.625 ms. This value corresponds to 100 ms.). */ #define CUSTOM_ADV_SLOW_INTERVAL 3200 /**< Slow advertising interval (in units of 0.625 ms. This value corresponds to 2 seconds). */ #define CUSTOM_ADV_FAST_DURATION 0 /**< The advertising duration of fast advertising in units of 1 seconds. maximum is 655 seconds */ #define CUSTOM_ADV_SLOW_DURATION 180 /**< The advertising duration of slow advertising in units of 1 seconds. maximum is 655 seconds */ /* Advertise data: incomplete list of 128-bit service UUIDs. * CLS service UUID 0000CA10-CA11-4B11-8000-CA11CA11CA11, LSB first. */ #define CUSTOM_USER_ADVERTISE_DATA \ "\x11"\ ADV_TYPE_INCOMPLETE_LIST_128BIT_SERVICE_IDS\ "\x10\xCA\x00\x00\x11\xCA\x11\x4B\x00\x80\x11\xCA\x11\xCA\x11\xCA" #define CUSTOM_USER_ADVERTISE_DATA_LEN (sizeof(CUSTOM_USER_ADVERTISE_DATA)-1) // Scan response data: left empty, the stack appends the device name // (attach_name = true in app_ble_adv_init()). #define CUSTOM_USER_ADV_SCNRSP_DATA "" // Scan response data length- maximum 31 bytes #define CUSTOM_USER_ADV_SCNRSP_DATA_LEN (sizeof(CUSTOM_USER_ADV_SCNRSP_DATA)-1) /* connection config */ #define MIN_CONN_INTERVAL 15 /**< Minimum connection interval (15 ms) */ #define MAX_CONN_INTERVAL 30 /**< Maximum connection interval (30 ms). */ #define SLAVE_LATENCY 0 /**< Slave latency. */ #define CONN_SUP_TIMEOUT 5000 /**< Connection supervisory timeout (5000ms). */ #define FIRST_CONN_PARAMS_UPDATE_DELAY (5000) /**< Time of initiating event to update connection params (5 seconds). */ //sec config #define SEC_PARAM_IO_CAPABILITIES GAP_IO_CAP_NO_INPUT_NO_OUTPUT /**< No I/O capabilities. (@enum gap_io_cap) */ #define SEC_PARAM_OOB 0 /**< Out Of Band data not available. */ #define SEC_PARAM_KEY_SIZE 16 /**< Minimum encryption key size. 7 to 16 */ #define SEC_PARAM_BOND 1 /**< Perform bonding. */ #define SEC_PARAM_MITM 1 /**< Man In The Middle protection not required. */ #define SEC_PARAM_LESC 0 /**< LE Secure Connections not enabled. */ #define SEC_PARAM_KEYPRESS 0 /**< Keypress notifications not enabled. */ #define SEC_PARAM_IKEY GAP_KDIST_NONE /**< Initiator Key Distribution. (@enum gap_kdist) */ #define SEC_PARAM_RKEY GAP_KDIST_ENCKEY /**< Responder Key Distribution. (@enum gap_kdist) */ #define SEC_PARAM_SEC_MODE_LEVEL GAP_NO_SEC /**< Device security requirements (minimum security level). (@enum see gap_sec_req) */ //bond conifg #define MAX_BOND_PEER 5 #define BOND_STORE_ENABLE 0 #define BOND_DATA_BASE_ADDR 0x01078000 /**< Reserved flash area (bond store disabled anyway) */ /* profiles config: only the custom link service (SDK rdtss profile engine) */ #define CFG_PRF_RDTSS 1 /* User config: NS_LOG fully disabled (no ns_log sources are compiled) */ #define NS_LOG_ERROR_ENABLE 0 #define NS_LOG_WARNING_ENABLE 0 #define NS_LOG_INFO_ENABLE 0 #define NS_LOG_DEBUG_ENABLE 0 #define NS_LOG_LPUART_ENABLE 0 #define NS_LOG_USART_ENABLE 0 #define NS_TIMER_ENABLE 1 #define FIRMWARE_VERSION "1.0.0" #define HARDWARE_VERSION "1.0.0" #endif // _APP_USER_CONFIG_H_