Skip to content

Add product property to PortInfo #2695

@jasoneer

Description

@jasoneer

💥 Proposal

What feature you'd like to see

I would like to add a product property to PortInfo to provide the USB device's product/model string.

Motivation

I would like to get this value separately instead of parsing it out of pnpId on Mac/Linux.

Pitch

I created the following PRs to implement this change:
Typings: serialport/bindings-interface#43
Implementation: serialport/bindings-cpp#138

The PRs have been tested on both Mac and Linux with a few USB serial devices. Was unsure about Windows so left its implementation alone. Also on Linux, I used ID_MODEL instead of ID_MODEL_ENC as the escaped characters were getting in the way of parsing/display.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions