From 020d471b959527f3b141f927b62a5b06b2229186 Mon Sep 17 00:00:00 2001 From: evilsocket Date: Fri, 1 Mar 2019 11:31:10 +0100 Subject: [PATCH] fix: fixed a bug which caused BLE handles to be displayed incorrectly (fixes #465) --- modules/ble/ble_show_services.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/ble/ble_show_services.go b/modules/ble/ble_show_services.go index c0d4c1a5..2ecbbfa1 100644 --- a/modules/ble/ble_show_services.go +++ b/modules/ble/ble_show_services.go @@ -353,7 +353,7 @@ func (mod *BLERecon) showServices(p gatt.Peripheral, services []*gatt.Service) { if multi == nil { rows = append(rows, []string{ - fmt.Sprintf("%04x", ch.Handle()), + fmt.Sprintf("%04x", ch.VHandle()), name, strings.Join(props, ", "), data, @@ -362,7 +362,7 @@ func (mod *BLERecon) showServices(p gatt.Peripheral, services []*gatt.Service) { for i, m := range multi { if i == 0 { rows = append(rows, []string{ - fmt.Sprintf("%04x", ch.Handle()), + fmt.Sprintf("%04x", ch.VHandle()), name, strings.Join(props, ", "), m, @@ -373,6 +373,8 @@ func (mod *BLERecon) showServices(p gatt.Peripheral, services []*gatt.Service) { } } } + // blank row after every service, bleah style + rows = append(rows, []string{"", "", "", ""}) } if wantsToWrite && !foundToWrite {