@@ -127,6 +127,7 @@ call. The format of the response is the following:
127
127
"label": <-- HOW THE PORT IS DISPLAYED ON THE GUI
128
128
"protocol": <-- THE PROTOCOL USED BY THE BOARD
129
129
"protocolLabel": <-- HOW THE PROTOCOL IS DISPLAYED ON THE GUI
130
+ "hardwareId": <-- A STRING THAT UNIQUELY IDENTIFIES A BOARD INSTANCE
130
131
"properties": {
131
132
<-- A LIST OF PROPERTIES OF THE PORT
132
133
}
@@ -147,7 +148,15 @@ Each port has:
147
148
` SSH on 192.168.10.100 ` )
148
149
- ` protocol ` is the protocol identifier (such as ` serial ` or ` dfu ` or ` ssh ` )
149
150
- ` protocolLabel ` is the ` protocol ` in human readable form (for example ` Serial port ` or ` DFU USB ` or ` Network (ssh) ` )
150
- - ` properties ` is a list of key/value pairs that represent information relative to the specific port
151
+ - ` hardwareId ` (optional) a string that uniquely identifies a specific board instance (even among other boards of the
152
+ same model). Different ports with the same ` hardwareId ` must belong to the same board instance. The identifier should
153
+ be sufficiently long to uniquely identify the board instance and reduce the probability of collisions. Good examples
154
+ of ` hardwareId ` values are: Ethernet MAC Address, USB Serial Number, CPU-ID number, etc.
155
+
156
+ This value ** should not** be used to identify the board ** model** (see the
157
+ [ board identification] ( #board-identification ) section for more information about identification of the board model).
158
+
159
+ - ` properties ` is a list of key/value pairs that represent information relative to the specific port.
151
160
152
161
To make the above more clear let's show an example output from the ` serial-discovery ` builtin in the Arduino CLI:
153
162
@@ -160,6 +169,7 @@ To make the above more clear let's show an example output from the `serial-disco
160
169
"label" : " ttyACM0" ,
161
170
"protocol" : " serial" ,
162
171
"protocolLabel" : " Serial Port (USB)" ,
172
+ "hardwareId" : " EBEABFD6514D32364E202020FF10181E" ,
163
173
"properties" : {
164
174
"pid" : " 0x804e" ,
165
175
"vid" : " 0x2341" ,
@@ -175,6 +185,9 @@ In this case the serial port metadata comes from a USB serial converter. Inside
175
185
properties of the port, and some of them may be useful for product identification (in this case only USB VID/PID is
176
186
useful to identify the board model).
177
187
188
+ The ` hardwareId ` field is populated with the USB ` serialNumber ` since this value is useful to identify the board
189
+ instance.
190
+
178
191
The ` LIST ` command performs a one-shot polling of the ports. The discovery should answer as soon as reasonably possible,
179
192
without any additional delay.
180
193
@@ -231,6 +244,7 @@ The `add` event looks like the following:
231
244
"port" : {
232
245
"address" : " /dev/ttyACM0" ,
233
246
"label" : " ttyACM0" ,
247
+ "hardwareId" : " EBEABFD6514D32364E202020FF10181E" ,
234
248
"properties" : {
235
249
"pid" : " 0x804e" ,
236
250
"vid" : " 0x2341" ,
0 commit comments