diff --git a/components/bt/host/bluedroid/stack/include/stack/hcidefs.h b/components/bt/host/bluedroid/stack/include/stack/hcidefs.h
index fdce44d804..8d27ed7dd7 100644
--- a/components/bt/host/bluedroid/stack/include/stack/hcidefs.h
+++ b/components/bt/host/bluedroid/stack/include/stack/hcidefs.h
@@ -800,7 +800,7 @@
#define HCI_ERR_SCO_AIR_MODE 0x1D
#define HCI_ERR_INVALID_LMP_PARAM 0x1E
#define HCI_ERR_UNSPECIFIED 0x1F
-#define HCI_ERR_UNSUPPORTED_LMP_FEATURE 0x20
+#define HCI_ERR_UNSUPPORTED_LMP_PARAMETERS 0x20
#define HCI_ERR_ROLE_CHANGE_NOT_ALLOWED 0x21
#define HCI_ERR_LMP_RESPONSE_TIMEOUT 0x22
#define HCI_ERR_LMP_ERR_TRANS_COLLISION 0x23
diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/ESP32_SSP.md b/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/ESP32_SSP.md
new file mode 100644
index 0000000000..68a168a599
--- /dev/null
+++ b/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/ESP32_SSP.md
@@ -0,0 +1,179 @@
+# ESP32 Classic Bluetooth Security - Secure Simple Pairing
+
+This document briefly describes how the device io capability and security mask affect the process of the Secure Simple Pairing. It will help you figure out how to set the parameter when calling `esp_bt_gap_set_security_param`, or the parameter `sec_mask` when you want to establish a connection associate a certain profile, for example, an SPP connection.
+
+## IO Capability
+Input and output capabilities of a device are combined to generate its IO capabilities. The input capabilities are described in Table 1 The output capabilities are described in Table 2. Table 3 shows the combination of Input and Output Capability, which are defined as `ESP_BT_IO_CAP_OUT`, `ESP_BT_IO_CAP_IO`, `ESP_BT_IO_CAP_IN` and `ESP_BT_IO_CAP_NONE` in `esp_gap_bt_api.h`.
+
+| Input Capability | Description |
+| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| No input | Device does not have the ability to indicate 'yes' or 'no' |
+| Yes / No | Device has at least two buttons that can be easily mapped to 'yes' and 'no' or the device has a mechanism whereby the user can indicate either 'yes' or 'no' (see note below). |
+| Keyboard | Device has a numeric keyboard that can input the numbers '0' through '9' and a confirmation. Device also has two buttons that can be easily mapped to 'yes' and 'no' or the device has a mechanism whereby the user can indicate either 'yes' or 'no' (see Note below). |
+*Table 1 User Input Capability*
+**Note**: 'yes' could be indicated by pressing a button within a certain time limit otherwise 'no' would be assumed.
+
+| Output Capability | Description |
+| ----------------- | ----------------------------------------------------------------------------------- |
+| No output | Device does not have the ability to display or communicate a 6 digit decimal number |
+| Numeric output | Device has the ability to display or communicate a 6 digit decimal number |
+*Table 2 User Output Capability*
+
+| | No Output | Numeric Output |
+| -------- | -------------------------------------- | --------------------------------- |
+| No input | NoInputNoOutput (`ESP_BT_IO_CAP_NONE`) | DisplayOnly (`ESP_BT_IO_CAP_OUT`) |
+| Yes / No | NoInputNoOutput (`ESP_BT_IO_CAP_NONE`) | DisplayYesNo (`ESP_BT_IO_CAP_IO`) |
+| Keyboard | KeyboardOnly (`ESP_BT_IO_CAP_IN`) | DisplayYesNo (`ESP_BT_IO_CAP_IO`) |
+*Table 3 IO Capability Mapping*
+
+## Secure Simple Pairing
+The primary goal of Secure Simple Pairing is to simplify the pairing procedure for the user. Secondary goals are to protect against passive eavesdropping and man-in-the-middle (MITM) attacks (active eavesdropping). It uses four association models referred to as Numeric Comparison, Just Works, Out Of Band, and Passkey Entry.
+* Numeric Comparison: both devices are capable of displaying a six digit number and both are capable of having the user enter "yes" or "no"
+* Just Works: at least one of the devices does not have a display capable of displaying a six digit number nor does it have a keyboard capable of entering six decimal digits
+* Out Of Band: use Out of Band mechanism to discover the devices and transfer cryptographic numbers
+* Passkey Entry: one device has input capability but does not have the capability to display six digits and the other device has output capabilities.
+
+**Note**: Just Works can be considered as a special kind of Numeric Comparison with automatic accept allowed.
+
+There are four stages defined in the Secure Simple Pairing LM process:
+* IO Capability exchange
+* Public key exchange
+* Authentication stage 1
+* Authentication stage 2
+
+### IO Capability Exchange
+The IO_Capability_Request_Reply command is used to reply to an IO Capability Request event from the controller, and specifies the current I/O capabilities of the host. The content of this command is shown as Table 4.
+| Command | OCF | Command Parameters | Return Parameters |
+| ------------------------------- | ------ | ------------------------------------------------------------------------------ | ------------------ |
+| HCI_IO_Capability_Request_Reply | 0x002B | BD_ADDR,
IO_Capability,
OOB_Data_Present,
Authentication_Requirements | Status,
BD_ADDR |
+*Table 4 IO_Capability_Request_Reply command*
+
+### Authentication Requirements
+If an authenticated link key is not required by the Host, the Authentication Requirements parameter may be set to one of the following:
+* MITM Protection Not Required – No Bonding
+* MITM Protection Not Required – Dedicated Bonding
+* MITM Protection Not Required – General Bonding
+
+**Note**: If both Hosts set the Authentication_Requirements parameter to one of the above values, the Link Managers shall use the numeric comparison authentication procedure and the hosts shall use the Just Works Association Model.
+
+If an authenticated link key is required by the Host, the Authentication Requirements parameter shall be set to one of the following:
+* MITM Protection Required – No Bonding
+* MITM Protection Required – Dedicated Bonding
+* MITM Protection Required – General Bonding
+
+**Note**: In addition, the following requirements apply:
+1. If one or both hosts set the Authentication Requirements parameter to one of the above values, the Link Managers shall use the IO_Capability parameter to determine the authentication procedure.
+2. A Host that sets the Authentication_Requirements parameter to one of the above values shall verify that the resulting Link Key type meets the security requirements requested.
+
+### IO Capability and Authentication Procedure Mapping
+If one or both devices have set the Authentication_Requirements parameter to one of the MITM Protection Required options, the IO capabilities are mapped to the authentication method as defined in the following table. A host has set the MITM Protection Required options shall verify that the resulting Link Key is an Authenticated Combination Key.
+
+ | Responder | +|||
---|---|---|---|---|
Initiator | +DisplayOnly | +DisplayYesNo | +KeyboardOnly | +NoInputNoOutput | +
DisplayOnly | +Just Works Unauthenticated |
+ Just Works Unauthenticated |
+ Passkey Entry Authenticated |
+ Just Works Unauthenticated |
+
DisplayYesNo | +Just Works Unauthenticated |
+ Numeric Comparison Authenticated |
+ Passkey Entry Authenticated |
+ Just Works Unauthenticated |
+
KeyboardOnly | +Passkey Entry Authenticated |
+ Passkey Entry Authenticated |
+ Passkey Entry(both need enter) Authenticated |
+ Just Works Unauthenticated |
+
NoInputNoOutput | +Just Works Unauthenticated |
+ Just Works Unauthenticated |
+ Just Works Unauthenticated |
+ Just Works Unauthenticated |
+
Security Level Required for Service | +Link Key type required for remote devices | +Comments | +IO Capability & Security Mask Setting | +
---|---|---|---|
Level 4(not support) * MITM protection required * Encryption required * User interaction acceptable |
+ Authenticated (P-256 based Secure Simple Pairing and Secure Authentication) | +Highest Security Only possible when both devices support Secure Connections | +/ | +
Level 3 * MITM protection required * Encryption required * User interaction acceptable |
+ Authenticated | +High Security | +IO: >= DisplayYesNo Mask: ESP_SPP_SEC_MITM | BTA_SEC_ENCRYPT |
+
Level 2 * MITM protection not necessary * Encryption desired |
+ Unauthenticated | +Medium Security | +IO: >= DisplayYesNo Mask: BTA_SEC_ENCRYPT |
+
Level 1 * MITM protection not necessary * Encryption desired * Minimal user interaction desired |
+ Unauthenticated | +Low Security | +IO: >= NoInputNoOutput Mask: BTA_SEC_ENCRYPT |
+
Level 0 * MITM protection not necessary * Encryption not necessary * No user interaction desired |
+ None | +Permitted only for SDP and service data sent via either L2CAP fixed signaling channels or the L2CAP connectionless channel to PSMs that correspond to service class UUIDs which are allowed to utilize Level 0. | +/ | +