blob: 66273021cb96d6642320116c74fe8ffe8ddb62f7 [file] [log] [blame]
package main
import (
"fmt"
"github.com/go-ble/ble"
)
func advHandler(a ble.Advertisement) {
curr.addr = a.Addr()
if a.Connectable() {
fmt.Printf("[%s] C %3d:", a.Addr(), a.RSSI())
} else {
fmt.Printf("[%s] N %3d:", a.Addr(), a.RSSI())
}
comma := ""
if len(a.LocalName()) > 0 {
fmt.Printf(" Name: %s", a.LocalName())
comma = ","
}
if len(a.Services()) > 0 {
fmt.Printf("%s Svcs: %v", comma, a.Services())
comma = ","
}
if len(a.ManufacturerData()) > 0 {
fmt.Printf("%s MD: %X", comma, a.ManufacturerData())
}
fmt.Printf("\n")
}
// ServiceData() []ServiceData
// OverflowService() []UUID
// TxPowerLevel() int
// SolicitedService() []UUID