Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions adapter_nrf528xx-full.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ func handleEvent() {
// callback.
scanReportBuffer.len = byte(advReport.data.len)
globalScanResult.RSSI = int16(advReport.rssi)
globalScanResult.Directed = advReport._type.bitfield_directed() != 0
globalScanResult.Address = Address{
makeMACAddress(advReport.peer_addr),
}
Expand Down
3 changes: 3 additions & 0 deletions gap.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,9 @@ type ScanResult struct {
// Signal strength of the advertisement packet.
RSSI int16

// Directed reports a directed advertisement.
Directed bool

// The data obtained from the advertisement data, which may contain many
// different properties.
// Warning: this data may only stay valid until the next event arrives. If
Expand Down
3 changes: 2 additions & 1 deletion gap_hci.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ func (a *Adapter) Scan(callback func(*Adapter, ScanResult)) error {
Address: Address{
NewMACAddress(makeAddress(rep.Address), random),
},
RSSI: int16(rep.RSSI),
RSSI: int16(rep.RSSI),
Directed: rep.Type == 0x01,
AdvertisementPayload: &advertisementFields{
AdvertisementFields: adf,
},
Expand Down
Loading