GATTS_SetMinEncKeySize

C

uint16_t GATTS_SetMinEncKeySize(uint8_t svcUuidLength, uint8_t *p_svcUuid, uint8_t minKeySize);

Description

Set minimum encryption key length of a service.

Note

This function is used to set minimum key size requirement for accessing attributes in a GATT Service. Some of attributes required encryption permission to be accessed by remote client. Encryption with shorter key will be rejected when accessing those attributes.

Parameters

ParameterDescription
[in] svcUuidLengthLength of the Service UUID.
[in] p_svcUuidPointer to Service UUID buffer. UUID in little endian format.
[in] minKeySizeMinimum encryption key size requirement of the Service.

Return values

Return valueDescription
MBA_RES_SUCCESSSuccessfully set the minimum key size of the Service.
MBA_RES_OOMMemory allocation failure occurred internally.
MBA_RES_INVALID_PARAInvalid Service UUID specified.