This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

INVALID PARAMS when migrating to security mode 1 level 4

I am attempting to migrate my BLE project to a higher security level with bonding.  Was mode 1 level 2 and am upgrading to mode 1 level 4.  When I change the configuration to the following:

#define SEC_PARAM_BOND                  1                                       /**< Perform bonding. */
#define SEC_PARAM_MITM                  0                                       /**< Man In The Middle protection not required. */
#define SEC_PARAM_LESC                  1                                       /**< LE Secure Connections not enabled. */
#define SEC_PARAM_KEYPRESS              0                                       /**< Keypress notifications not enabled. */
#define SEC_PARAM_IO_CAPABILITIES       BLE_GAP_IO_CAPS_NONE                    /**< No I/O capabilities. */
#define SEC_PARAM_OOB                   0                                       /**< Out Of Band data not available. */
#define SEC_PARAM_MIN_KEY_SIZE          7                                       /**< Minimum encryption key size. */
#define SEC_PARAM_MAX_KEY_SIZE          16                                      /**< Maximum encryption key size. */

I get [NRF ERROR INVALID PARAM] errors when adding my second service and even when trying to sd_ble_gap_device_name_set.  I'm not sure where I should be looking for the problem and how to find out what which parameter is invalid.

I'm very new to this so any help would be great.  Thanks

  • Hi Bloq, 

    Good question. It is certainly not how it should be used. I do not see how this would be better than just works. If only the iOS has input or output device, then this does not give you any benefit. There is no way to know if you have connected to the device you intend to or an attacker.

    So this just gives an illusion of security, but that is all. It is better to use just works then in my opinion.

    -Amanda H.

Related