From ad193342fb8e8fc45bc4a1a11992a52f2e07e15d Mon Sep 17 00:00:00 2001 From: kayos Date: Sun, 9 May 2021 14:43:54 -0700 Subject: [PATCH] improving debug options for advertisement payload --- src/scanStuff/scanStuff.go | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/scanStuff/scanStuff.go b/src/scanStuff/scanStuff.go index 4407625..98b2eeb 100644 --- a/src/scanStuff/scanStuff.go +++ b/src/scanStuff/scanStuff.go @@ -42,17 +42,28 @@ func Scanners() { //bluetooth.ServiceUUIDGenericAttribute if lname == projVars.ScanList[device.Address.String()] { - log.Debug().Str("lname", lname).Str("device_address", projVars.ScanList[device.Address.String()]).Msg("Skipping existing device") + //log.Debug().Str("lname", lname).Str("device_address", projVars.ScanList[device.Address.String()]).Msg("Skipping existing device") return } log.Info().Str("address", device.Address.String()). Str("LocalName", lname). Int16("RSSI", rssi). - Bytes("AdvertisementPayload", adbytes). Bool("Service UUID", srvcPld). Msg("new_device") + var nilcheck bool + + if adbytes == nil { + nilcheck = true + } else { + nilcheck = false + } + + log.Debug().Bytes("AdvertisementPayload_Bytes", adbytes). + Int("AdvertisementPayload_Length", len(adbytes)). + Bool("AdvertisementPayload_nil_check", nilcheck).Msg("AD_PAYLOAD") + //println(srvcPld) //places captured devices into the eros DB