From 9c692cfbb3236a1f91e469a1fa61555151513c52 Mon Sep 17 00:00:00 2001 From: Bryan Paluch Date: Mon, 11 Jan 2016 10:22:12 -0500 Subject: [PATCH] add Stop to Device interface that it is possible to call Linux Stop and properly close hci connection --- device.go | 3 +++ device_darwin.go | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/device.go b/device.go index 93d423e..8072673 100644 --- a/device.go +++ b/device.go @@ -72,6 +72,9 @@ type Device interface { // StopScanning stops scanning. StopScanning() + // Stop calls OS specific close calls + Stop() error + // Connect connects to a remote peripheral. Connect(p Peripheral) diff --git a/device_darwin.go b/device_darwin.go index 9504b4b..c0cbeba 100644 --- a/device_darwin.go +++ b/device_darwin.go @@ -142,6 +142,11 @@ func (d *device) StopAdvertising() error { return nil } +func (d *device) Stop() error { + // No Implementation + +} + func (d *device) RemoveAllServices() error { d.sendCmd(12, nil) return nil