diff --git a/infinitime.go b/infinitime.go index 9f25897..0988c4d 100644 --- a/infinitime.go +++ b/infinitime.go @@ -176,6 +176,9 @@ func connectByName(opts *Options) (*Device, error) { if err != nil { return nil, err } + + out.device.Properties.Connected = true + // Resolve characteristics err = out.resolveChars() if err != nil { @@ -232,6 +235,8 @@ func pair(opts *Options) (*Device, error) { // Pair device out.device.Pair() + out.device.Properties.Connected = true + // Set connected to true out.device.Properties.Connected = true @@ -262,6 +267,8 @@ func ConnectByAddress(addr string) (*Device, error) { return nil, err } + out.device.Properties.Connected = true + // Resolve characteristics err = out.resolveChars() if err != nil {