]> granicus.if.org Git - esp-idf/commitdiff
component/bt: Added the lmp_verion default value to 4.0.
authorYulong <huangyulong@espressif.com>
Thu, 15 Jun 2017 06:13:31 +0000 (02:13 -0400)
committerYulong <huangyulong@espressif.com>
Thu, 15 Jun 2017 06:13:31 +0000 (02:13 -0400)
components/bt/bluedroid/stack/btm/btm_acl.c

index 4ed5f1936251086198a1a89580786ee06e3839a1..c128510d2be85e11a8bc1e4e471c570190b2922e 100644 (file)
@@ -230,7 +230,10 @@ void btm_acl_created (BD_ADDR bda, DEV_CLASS dc, BD_NAME bdn,
             p->link_role         = link_role;
             p->link_up_issued    = FALSE;
             memcpy (p->remote_addr, bda, BD_ADDR_LEN);
-
+            /* Set the default version of the peer device to version4.0 before exchange the version with it.
+               If the peer device act as a master and don't exchange the version with us, then it can only use the
+               legacy connect instead of secure connection in the pairing step. */
+            p->lmp_version = HCI_PROTO_VERSION_4_0;
 #if BLE_INCLUDED == TRUE
             p->transport = transport;
 #if BLE_PRIVACY_SPT == TRUE