-
-
Notifications
You must be signed in to change notification settings - Fork 351
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
Please document how to run with LIBUSB_DEBUG=x or enable libusb debug output with nut debug options #2616
Comments
As a quick shot with existing builds - does it suffice to export the envvar in USB-capable driver units/init-scripts (commonly via For later iterations, I'd envision something like what's done in recent years for "Per context" here maps to one process's usage of libusb (from init to close), right? |
Yes, if there is a mechanism to set environment variables when executing the driver binaries, that will work. Setting the env var on the command line when launching a program is technically easy but there are syntax differences between operating systems (or rather their shells), and when things e.g. run via systemd it becomes more difficult for many end-users. Per-context refers to the libusb concept of context. You can have multiple libusb contexts in one process without them interfering with each other. They will for instance have their own list of discovered devices and their own set of callbacks for events, their own debug level and so forth. This makes sense e.g. for a larger program with plugins or modules that do USB but operate independently. |
Got it, thanks! |
For starters, linking docs to https://libusb.sourceforge.io/api-1.0/group__libusb__lib.html#ga2d6144203f0fc6d373677f6e2e89d2d2 |
networkupstools#2616] Signed-off-by: Jim Klimov <[email protected]>
Made a quick improvement via docs; a configurable/run-time "knob" may be on the table some time in the future, so I would keep this issue open. |
|
For environment variable setup through
Not |
In nut plugin setup config all settings with spaces, but not a problem I can check both with and without spaces. |
We here are making NUT, not its HA plugin, sorry ;) From what I saw, it is set up by yaml files that NUT AFAIK the plugin uses packaged (or custom-built, per wiki) NUT binaries and scripts etc., so maybe you can inject the And "no", the |
Sure, You are 100% right. |
Oops :) |
To investigate USB issues it is important to see the debug output from libusb. Either the env var LIBUSB_DEBUG must be set to e.g. 4, or the program can call libusb_set_debug() to set debug level per libusb context.
The text was updated successfully, but these errors were encountered: