Skip to content

libusbX.c: addvar() to let users customize USB config/control/interface descriptor numbers to use with their device #2149

@jimklimov

Description

@jimklimov

For clarification, the addvar() idea (raised in the mailing list) regards the way for end-users to set a specific number value via configuration variables their ups.conf sections, if for some reason they don't want to default to 0 but to something else.

Ahh, gotcha! IMO, it's really only useful to have this one be a config var, if the others are too. So that would be

usb_config_index
hid_rep_index
hid_desc_index
hid_ep_in
hid_ep_out

Such user-friendly integration can be addressed separately (more so if this bites someone); so far it is great to have separate (potentially-)manageable values with recognized semantic difference :)

Cool, I'll leave this PR without that then. Doing the above set of value might let someone handle odd hardware without a code change. I think lsusb can be made to output enough information for a user to set those values in a config.

Originally posted by @kellybyrd in #2148 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    USBUSB non-zero interface numbersMost UPSes serve USB interactions on interface 0 which is default. Recent "composite devices" differ

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions