How is a static passkey configured for use in AT Interface Application/Firmware?
Lyra modules must be preloaded with AT Interface firmware, while BL65x modules must be updated to the most current smartBASIC firmware version and programmed with the AT Interface smartBASIC sample application in order to use any AT Interface commands.
To configure a static passkey using AT Interface it is necessary to ensure that the I/O capability of the modules will result in Passkey Entry authentication (per the Bluetooth SIG's IO Capabilities mapping). The Lyra or BL65x module must be configured with the I/O Capability set to Keyboard Only (2) or Keyboard + Display (4), via S Register 107, using the command, ATS 107=x, where x=2 for Keyboard Only or x=4 for Keyboard + Display.
Then the "AT+PKEY " command can be used to issue a static passkey to the underlying stack for use during a pairing procedure in future connections. The passkey must be a 6-digit integer in the range of 000000 – 999999.
The pairing will still use LESC Diffie-Hellman based exchanges. If a randomly generated number is used for the passkey the static passkey will be used.
Note: Pairing using a pre-programmed passkey makes pairing vulnerable to MITM attacks.
For more information on AT Interface configurations please reference the AT Interface User Guide for the specified module series.