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 5855ec1

Browse files
authored
Merge pull request #395 from fpistm/advertising_enabled
fix(HCI): SetAdvertise only if enabled
2 parents aa57b0e + b7c6120 commit 5855ec1

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 によって変換されたページ (->オリジナル) /