This commit is contained in:
2017-02-06 20:00:33 +03:00
parent a829a3dd5c
commit 40c834f7e8
5 changed files with 47 additions and 31 deletions
-8
View File
@@ -40,14 +40,6 @@ func (s Scale) OnConnect(p gatt.Peripheral, err error) error {
return nil
}
fmt.Println("Connected")
defer p.Device().CancelConnection(p)
if err := p.SetMTU(500); err != nil {
fmt.Printf("Failed to set MTU, err: %s\n", err)
}
fmt.Printf("Set mtu done.\n")
// Discovery services
services, err := p.DiscoverServices(nil)
fmt.Printf("Services: %v+", services)