component/bt: Fix bug of disconnected fail during pairing

This commit is contained in:
baohongde 2017-12-14 20:19:55 +08:00
parent 5401a75bad
commit 1de63e9d90

View file

@ -69,8 +69,12 @@ void smp_l2cap_if_init (void)
fixed_reg.pL2CA_FixedTxComplete_Cb = smp_tx_complete_callback;
fixed_reg.pL2CA_FixedCong_Cb = NULL; /* do not handle congestion on this channel */
fixed_reg.default_idle_tout = 60; /* set 60 seconds timeout, 0xffff default idle timeout */
fixed_reg.default_idle_tout = 0; /* set 0 seconds timeout, 0xffff default idle timeout.
This timeout is used to wait for the end of the pairing
and then make a disconnect request, setting a larger value
will cause the disconnect event to go back up for a long time.
Set to 0 will be disconnected directly, and it will come up
pairing failure, so it will not cause adverse effects. */
L2CA_RegisterFixedChannel (L2CAP_SMP_CID, &fixed_reg);
#if (CLASSIC_BT_INCLUDED == TRUE)
fixed_reg.pL2CA_FixedConn_Cb = smp_br_connect_callback;