Description
The ChangePairingParameters command is
responsible for changing the LE Pairing Parameters that are exchanged during the
Pairing procedure. This command returns zero on successful execution and a negative
value on all errors.
Parameters
This command requires five parameters
which are the I/O Capability, the Bonding Type, the MITM Requirement, the SC Enable,
and the P256 debug mode:
- The first parameter must be specified as 0 (for Display Only), 1 (for Display
Yes/No), 2 (for Keyboard Only), 3 (for No Input/Output) or 4 (for
Keyboard/Display).
- The second parameter must be specified as 0 (for No Bonding) or 1 (for Bonding),
when at least one of the devices is set to No Bonding, the LTK won't be
stored.
- The third parameter must be specified as 0 (for No MITM) or 1 (for MITM
required).
- The fourth parameter must be specified as 0 (for SC disabled) or 1 (for SC
enabled), legacy pairing procedure takes place when using SC disable.
- The fifth parameter must be
specified as 0 (for Debug Mode disabled) or 1 (for P256 debug mode enabled), but
only when using SC pairing. P256 debug mode is relevant when set, the values of
the P256 private and public keys are pre-defined according to the Bluetooth
specification instead of random.
Command Call Examples
- "ChangeSimplePairingParameters 3
0 0 0 0" Attempts to set the I/O Capability to No Input/Output, Bonding Type set
to No Bonding, turns off MITM Protection, disable secure connections and disable
debug mode.
- "ChangeSimplePairingParameters 2
0 1 1 0 " Attempts to set the I/O Capability to Keyboard Only, Bonding Type set
to No Bonding, activates MITM Protection, enabling secure connections and
disable debug mode.
- "ChangeSimplePairingParameters 1
1 1 1 1" Attempts to set the I/O Capability to Display Yes/No, bonding type set
to Bonding, activates MITM Protection, enabling secure connections and enabling
debug mode.
Possible Return Values
- (0) Successfully Set Pairability Mode
- (-6) INVALID_PARAMETERS_ERROR
- (-8) INVALID_STACK_ID_ERROR