SWRA770 august 2023 CC2564C
The SetPairabilityMode command is responsible for setting the Pairability Mode of the local Device. This command returns zero on successful execution and a negative value on all errors. A Bluetooth Stack ID must exist before attempting to call this function.
This command requires only one parameter which is an integer value that represents a Pairability Mode. This value must be specified as 0 (for Non-Pairable), 1 (for Pairable), or 2 (for Secure Simple Pairing).
GAP_Set_Pairability_Mode(BluetoothStackID, PairabilityMode)
int BTPSAPI GAP_Set_Pairability_Mode(unsigned int BluetoothStackID, GAP_Pairability_Mode_t GAP_Pairability_Mode)
This function is provided to set the pairability mode of the local Bluetooth Device. The second parameter specifies the pairability mode to place the local Bluetooth Device into. If secure simple pairing (SSP) pairing mode is specified, then SSP *MUST* be used for all pairing operations. The device can be placed into non pairable mode after this, however, if pairing is re-enabled, than the device *MUST* be set to pairable with SSP enabled.