raw payload recieved
This commit is contained in:
parent
4f09fc7873
commit
1957bfdbf1
@ -36,12 +36,11 @@ func Scanners() {
|
|||||||
payload := result.AdvertisementPayload
|
payload := result.AdvertisementPayload
|
||||||
lname := result.LocalName()
|
lname := result.LocalName()
|
||||||
adbytes := payload.Bytes()
|
adbytes := payload.Bytes()
|
||||||
uuids := payload.ServiceUUIDOut()
|
//uuids := payload.ServiceUUIDOut()
|
||||||
rssi := result.RSSI
|
rssi := result.RSSI
|
||||||
|
|
||||||
//Trying to extract the service UUIDs from advertisment packet
|
//Trying to extract the service UUIDs from advertisment packet
|
||||||
|
|
||||||
println(uuids)
|
|
||||||
//srvcPld := device.AdvertisementPayload.HasServiceUUID(projVars.SonosScanTest)
|
//srvcPld := device.AdvertisementPayload.HasServiceUUID(projVars.SonosScanTest)
|
||||||
// ** List of common Service UUIDS to search for **
|
// ** List of common Service UUIDS to search for **
|
||||||
//bluetooth.ServiceUUIDDeviceInformation
|
//bluetooth.ServiceUUIDDeviceInformation
|
||||||
@ -52,13 +51,14 @@ func Scanners() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
//println(result.AdvertisementPayload.Bytes())
|
println(result.AdvertisementPayload.ServiceUUIDOut())
|
||||||
|
|
||||||
|
//println(uuids)
|
||||||
log.Info().Str("address", result.Address.String()).
|
log.Info().Str("address", result.Address.String()).
|
||||||
Str("LocalName", lname).
|
Str("LocalName", lname).
|
||||||
Int16("RSSI", rssi).
|
Int16("RSSI", rssi).
|
||||||
//Ints32("Service UUID", uuids).
|
//Bytes("Service UUID", uuids).
|
||||||
//Str("Device: ", ).
|
Str("Device: ", string(payload.Bytes())).
|
||||||
Msg("new_device")
|
Msg("new_device")
|
||||||
|
|
||||||
var nilcheck bool
|
var nilcheck bool
|
||||||
@ -69,7 +69,7 @@ func Scanners() {
|
|||||||
nilcheck = false
|
nilcheck = false
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Debug().Bytes("AdvertisementPayload_Bytes", adbytes).
|
log.Debug().Str("AdvertisementPayload_Bytes", string(payload.Bytes())).
|
||||||
Int("AdvertisementPayload_Length", len(adbytes)).
|
Int("AdvertisementPayload_Length", len(adbytes)).
|
||||||
Bool("AdvertisementPayload_nil_check", nilcheck).
|
Bool("AdvertisementPayload_nil_check", nilcheck).
|
||||||
Msg("AD_PAYLOAD")
|
Msg("AD_PAYLOAD")
|
||||||
|
Loading…
Reference in New Issue
Block a user