diff --git a/command/device/provision.go b/command/device/provision.go index b955d439..9baa8cbb 100644 --- a/command/device/provision.go +++ b/command/device/provision.go @@ -78,7 +78,10 @@ func (p provision) run() error { return err } defer p.ser.Close() - logrus.Infof("%s\n\n", "Connected to board") + + // Wait some time before using the serial port + time.Sleep(2000 * time.Millisecond) + logrus.Infof("%s\n\n", "Connected to the board") // Send configuration commands to the board err = p.configBoard() diff --git a/internal/serial/serial.go b/internal/serial/serial.go index 235ed1f7..d6c9e7d3 100644 --- a/internal/serial/serial.go +++ b/internal/serial/serial.go @@ -55,7 +55,7 @@ func (s *Serial) Connect(address string) error { } s.port = port - s.port.SetReadTimeout(time.Millisecond * 2000) + s.port.SetReadTimeout(time.Millisecond * 2500) return nil }