Skip to content

START_SYNC errors after command sequence indicated by pluggable discovery specification #1653

Closed
@per1234

Description

@per1234

Describe the bug

From the Pluggable Discovery Specification:

https://arduino.github.io/arduino-cli/dev/pluggable-discovery-specification/#start-command

The START command initializes and starts the discovery internal subroutines. This command must be called before LIST or START_SYNC.

To me, this indicates that in order to execute a START_SYNC, I should run the following sequence of commands:

  1. HELLO
  2. START
  3. START_SYNC

🐛 The sequence of commands indicated by the specification results in an error from the START_SYNC command.

To Reproduce

$ git clone https://github.com/arduino/pluggable-discovery-protocol-handler

$ cd pluggable-discovery-protocol-handler/dummy-discovery/

$ go build

$ ./dummy-discovery
HELLO 1 "arduino-cli"
{
  "eventType": "hello",
  "message": "OK",     
  "protocolVersion": 1 
}
START
{
  "eventType": "start",
  "message": "OK"      
}
START_SYNC
{
  "eventType": "start_sync",
  "message": "Discovery already STARTed, cannot START_SYNC",
  "error": true
}

Expected behavior

Specification to be corrected if the behavior of the github.com/arduino/pluggable-discovery-protocol-handler/v2 module is what is intended, which would entail one of the following:

  • Remove the statement that START is required before START_SYNC
  • Specify that STOP must be called before START_SYNC

-OR-

The github.com/arduino/pluggable-discovery-protocol-handler/v2 module to support the command sequence indicated in the specification.

Desktop

  • OS: Windows 10, Ubuntu 20.04
  • github.com/arduino/pluggable-discovery-protocol-handler/v2@a0d87f340f91cef6454ea0601f55d1119a5a8bb7

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions