Skip to content

Add hardwareId field to port object #11

Closed
@per1234

Description

@per1234

Describe the request

Add a hardwareId field to the port object returned by the LIST and START_SYNC commands.

🙂 It will be possible for consumers of the discovery data to identify a discovered port as a specific hardware instance in a standardized, universally applicable manner.

Describe the current behavior

Support for a hardwareId field in the discovery output was added recently:

arduino/arduino-cli#2065

This offers a standardized way for pluggable discovery tools to return a unique identifier for the hardware instance that produced the port:

https://arduino.github.io/arduino-cli/dev/pluggable-discovery-specification/#start_sync-command:~:text=hardwareId%20(optional)

dfu-discovery returns a unique hardware instance identifier in the properties.serialNumber field, but it does not also return this via the hardwareId field:

{
  "eventType": "add",
  "port": {
    "address": "1-7.1.4.1",
    "label": "@Internal Flash   /0x08000000/01*128Ka,15*128Kg",
    "properties": {
      "name": "@Internal Flash   /0x08000000/01*128Ka,15*128Kg",
      "pid": "0x035b",
      "serialNumber": "004400283039510237363339",
      "vid": "0x2341"
    },
    "protocol": "dfu",
    "protocolLabel": "DFU"
  }
}

🙁 It is not possible for consumers of data from arbitrary discovery tools to leverage the application-specific properties.serialNumber field data to identify hardware instances.

dfu-discovery version

be1e441

Operating system

Windows

Operating system version

11

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest version
  • My request contains all necessary details

Metadata

Metadata

Labels

topic: codeRelated to content of the project itselftype: enhancementProposed improvement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions