Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b7c6120

Browse files
committed
fix(HCI): SetAdvertise only if enabled
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent ab1ea93 commit b7c6120

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/utility/HCI.cpp‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,10 @@ void HCIClass::handleEventPkt(uint8_t /*plen*/, uint8_t pdata[])
832832
ATT.removeConnection(disconnComplete->handle, disconnComplete->reason);
833833
L2CAPSignaling.removeConnection(disconnComplete->handle, disconnComplete->reason);
834834

835-
HCI.leSetAdvertiseEnable(0x01);
835+
if (GAP.advertising())
836+
{
837+
HCI.leSetAdvertiseEnable(0x01);
838+
}
836839
}
837840
else if (eventHdr->evt == EVT_ENCRYPTION_CHANGE)
838841
{

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /