Description
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 beforeLIST
orSTART_SYNC
.
To me, this indicates that in order to execute a START_SYNC
, I should run the following sequence of commands:
HELLO
START
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 beforeSTART_SYNC
- Specify that
STOP
must be called beforeSTART_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