Skip to content

Add hardwareId field to port object #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
3 tasks done
per1234 opened this issue Feb 24, 2023 · 1 comment · Fixed by #13
Closed
3 tasks done

Add hardwareId field to port object #11

per1234 opened this issue Feb 24, 2023 · 1 comment · Fixed by #13
Assignees
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@per1234
Copy link
Contributor

per1234 commented Feb 24, 2023

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
@cmaglie
Copy link
Member

cmaglie commented Feb 28, 2023

Fixed by #13

@cmaglie cmaglie closed this as completed Feb 28, 2023
@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants