fix: setting BLE device name once services are enumerated

This commit is contained in:
evilsocket 2019-03-17 13:36:59 +01:00
commit d6e6746809
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
2 changed files with 14 additions and 3 deletions

View file

@ -367,6 +367,10 @@ func (mod *BLERecon) showServices(p gatt.Peripheral, services []*gatt.Service) {
data = parseRawData(raw)
}
if ch.Name() == "Device Name" && data != "" && mod.currDevice.DeviceName == "" {
mod.currDevice.DeviceName = data
}
if multi == nil {
char.Data = data
rows = append(rows, []string{