From cf16e482042932bf91cc9280fc7e70394970bf8b Mon Sep 17 00:00:00 2001 From: Jack Thomasson <4302889+jkt628@users.noreply.github.com> Date: Tue, 16 Sep 2025 07:54:44 -0400 Subject: [PATCH 1/2] fix some minor inconsistency --- device.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/device.go b/device.go index ced686eb..8b893ae1 100644 --- a/device.go +++ b/device.go @@ -14,10 +14,10 @@ type Device interface { // It removes all currently added services, if any. SetServices(svcs []*Service) error - // Stop detatch the GATT server from a peripheral device. + // Stop detaches the GATT server from a peripheral device. Stop() error - // Advertise advertises a given Advertisement + // Advertise advertises a given Advertisement. Advertise(ctx context.Context, adv Advertisement) error // AdvertiseNameAndServices advertises device name, and specified service UUIDs. @@ -25,13 +25,13 @@ type Device interface { // If name doesn't fit in the advertising packet, it will be put in scan response. AdvertiseNameAndServices(ctx context.Context, name string, uuids ...UUID) error - // AdvertiseMfgData avertises the given manufacturer data. + // AdvertiseMfgData advertises the given manufacturer data. AdvertiseMfgData(ctx context.Context, id uint16, b []byte) error - // AdvertiseServiceData16 advertises data associated with a 16bit service uuid + // AdvertiseServiceData16 advertises data associated with a 16bit service uuid. AdvertiseServiceData16(ctx context.Context, id uint16, b []byte) error - // AdvertiseIBeaconData advertise iBeacon with given manufacturer data. + // AdvertiseIBeaconData advertises iBeacon with given manufacturer data. AdvertiseIBeaconData(ctx context.Context, b []byte) error // AdvertiseIBeacon advertises iBeacon with specified parameters. From 6710c9c5f8b2523aee6e4ac1ddef868defea19f0 Mon Sep 17 00:00:00 2001 From: Jack Thomasson <4302889+jkt628@users.noreply.github.com> Date: Tue, 16 Sep 2025 07:55:54 -0400 Subject: [PATCH 2/2] expose Device Address **currently only linux** --- device.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/device.go b/device.go index 8b893ae1..f2ec478c 100644 --- a/device.go +++ b/device.go @@ -4,6 +4,9 @@ import "context" // Device ... type Device interface { + // MAC address of the local device. + Address() Addr + // AddService adds a service to database. AddService(svc *Service) error