Skip to content

Commit c3242ad

Browse files
committed
Transfer ALL port metadata into upload preferences
1 parent 875ce97 commit c3242ad

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

RFCs/0002-pluggable-discovery.md

+17-13
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ myboard.upload.tool.serial=bossac
460460
myboard.upload.tool.network=arduino_ota
461461
```
462462
463-
The selected port address will be provided in the variable `{upload.address}`. Other metadata provided by the discover in the `prefs` section will be provided in the `{upload.port.*}` variables.
463+
The selected port address will be provided in the variable `{upload.port.address}`. In general, all the metadata provided by the discovery in the `port` section will be provided under the `{upload.port.*}` variables.
464464
465465
For backward compatibility we will keep a copy of the address also in `{serial.port}` and in the specific case of a `protocol=serial` we will populate also `{serial.port.file}`.
466466
@@ -487,12 +487,14 @@ For example, the following port metadata coming from a pluggable discovery:
487487
will be available on the recipe as the variables:
488488

489489
```
490-
{upload.address} = /dev/ttyACM0
491-
{upload.protocol} = serial
492-
{upload.port.pid} = 0x8043
493-
{upload.port.vid} = 0x2341
494-
{upload.port.serialNumber} = EBEABFD6514D32364E202020FF10181E
495-
{upload.port.name} = ttyACM0
490+
{upload.port.address} = /dev/ttyACM0
491+
{upload.port.label} = ttyACM0
492+
{upload.port.protocol} = serial
493+
{upload.port.protocolLabel} = Serial Port (USB)
494+
{upload.port.properties.pid} = 0x8043
495+
{upload.port.properties.vid} = 0x2341
496+
{upload.port.properties.serialNumber} = EBEABFD6514D32364E202020FF10181E
497+
{upload.port.properties.name} = ttyACM0
496498
{serial.port} = /dev/ttyACM0 # for backward compatibility
497499
{serial.port.file} = ttyACM0 # only because protocol=serial
498500
```
@@ -518,10 +520,12 @@ Here another example:
518520
that is translated to:
519521

520522
```
521-
{upload.address} = 192.168.1.232
522-
{upload.protocol} = ssh
523-
{upload.port.macprefix} = AA:BB:CC
524-
{upload.port.macaddress} = AA:BB:CC:DD:EE:FF
523+
{upload.port.address} = 192.168.1.232
524+
{upload.port.label} = SSH on my-board (192.168.1.232)
525+
{upload.port.protocol} = ssh
526+
{upload.port.protocolLabel} = SSH Network port
527+
{upload.port.properties.macprefix} = AA:BB:CC
528+
{upload.port.properties.macaddress} = AA:BB:CC:DD:EE:FF
525529
{serial.port} = 192.168.1.232 # for backward compatibility
526530
```
527531

@@ -537,7 +541,7 @@ with:
537541

538542
```
539543
tools.arduino_ota.upload.pattern="{runtime.tools.arduinoOTA.path}/bin/arduinoOTA"
540-
-address {upload.address} -port 65280
544+
-address {upload.port.address} -port 65280
541545
-sketch "{build.path}/{build.project_name}.bin"
542546
```
543547

@@ -559,7 +563,7 @@ tools.arduino_ota.upload.field.username=Username
559563
tools.arduino_ota.upload.field.password=Password
560564
tools.arduino_ota.upload.field.password.secret=true
561565
tools.arduino_ota.upload.pattern="{runtime.tools.arduinoOTA.path}/bin/arduinoOTA"
562-
-address {upload.address} -port 65280
566+
-address {upload.port.address} -port 65280
563567
-username "{upload.user.username}
564568
-password "{upload.user.password}"
565569
-sketch "{build.path}/{build.project_name}.bin"

0 commit comments

Comments
 (0)