Skip to content

Commit 2f5b8c0

Browse files
committed
gap: do not add ADFlags to advertising data for AdvertisingTypeNonConnInd, to leave room for FindMy data
Signed-off-by: deadprogram <ron@hybridgroup.com>
1 parent a211012 commit 2f5b8c0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

gap.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,10 @@ func (buf *rawAdvertisementPayload) reset() {
376376
// before the call) from the advertisement options. It returns true if it fits,
377377
// false otherwise.
378378
func (buf *rawAdvertisementPayload) addFromOptions(options AdvertisementOptions) (ok bool) {
379-
buf.addFlags(0x06)
379+
// do not add flags for non-connectable advertisements
380+
if options.AdvertisementType != AdvertisingTypeNonConnInd {
381+
buf.addFlags(0x06)
382+
}
380383
if options.LocalName != "" {
381384
if !buf.addCompleteLocalName(options.LocalName) {
382385
return false

0 commit comments

Comments
 (0)