Skip to content

Expose metadata about the device #114

Description

@krokosik

I would like to store some device metadata, like the unique ID or firmware version. While I could just use endpoints for that, they are stored anyway in the USB device config and read when initializing the HostClient. In the HostClient::new_raw_nusb method, I can access the DeviceInfo struct within the closure that picks a device and I use it to extract the information I want. This is a bit hacky and can only be done on startup.

I imagine this design is caused by the generic aspect of Postcard RPC? I guess the metadata would be completely different when using CDC ACM right? If so, I will close the issue as my workaround works, but having it exposed would make life easier

Metadata

Metadata

Assignees

No one assigned

    Labels

    Q2 '25 TriageItems tracked as part of https://github.com/jamesmunns/postcard/issues/241

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions