Skip to content
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

Stable device path #43

Closed
paragi opened this issue May 30, 2021 · 3 comments
Closed

Stable device path #43

paragi opened this issue May 30, 2021 · 3 comments

Comments

@paragi
Copy link

paragi commented May 30, 2021

Hi Ondrej
Thanks for a handy program.
The path to a device, that has no serial number, is changing depending on other factors than physical connection (linux). This makes it hard to configure for multiple relays, of the same kind.
I need a stable identification to a bunch of relays without serial numbers.

would you accept a pull request, with an alternative path, based on HW bus connection?
I would much prefer to contribute to an existing project, rather then creating a new one.
I imagine it will be a rewrite of the detection logic, using the underlying libusb-1.0
I would be unable to test on windows and mac.
Would that be within you scope for this project?

best regards
Simon Rigét
https://github.com/paragi/

@ondrej1024
Copy link
Owner

Hi Simon,
of course you are welcome to contribute to crelay with a pull request.
But before implementing your changes take a look at issue #26. Looks like @derekatkins has implemented a solution for this in libusb.

For testing on Windows or Mac, this is not in the scope of this project. It is meant to run on Linux.

Regards, Ondrej

@paragi
Copy link
Author

paragi commented Jun 2, 2021

Thank you for the reference issue. That is exactly the issue I'm concerned about.
When there is no serial number, the only way to uniquely identify the device, is via the bus port address.
I think the solution is to obtaining the bus address via libusb, and using the it to identify the device number, used with the hidapi.
But it requires a rewrite of the detection functionality.
I will start writing some code now, it you have no other concerns?

Best regards
Simon

@ondrej1024
Copy link
Owner

No concerns, please go ahead with your modifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants