diff --git a/pkg/v2/command/command.go b/pkg/v2/command/command.go index eb6d508..07b5f0f 100644 --- a/pkg/v2/command/command.go +++ b/pkg/v2/command/command.go @@ -51,7 +51,6 @@ type RemoteData struct { // recreate a complete protobuf message from multiple chunks // each new message is sent to handleData func (c *Command) processData(read_size int, size_to_read int, buffer *[]byte, total_data *[]byte) int { - if read_size < size_to_read { // not enough data size_to_read -= read_size @@ -154,6 +153,9 @@ func (c *Command) Connect() error { c.sendConfiguration() + // wait for the device to be ready + time.Sleep(time.Millisecond * 500) + return nil }