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

Windows: Try installing libUSB manually. #1145

Open
4SiB opened this issue Oct 25, 2021 · 21 comments
Open

Windows: Try installing libUSB manually. #1145

4SiB opened this issue Oct 25, 2021 · 21 comments

Comments

@4SiB
Copy link

4SiB commented Oct 25, 2021

NUT at windows installed.
copy sbin\libgcc_s_dw2-1.dll bin
Download https://indy.fulgan.com/SSL/Archive/openssl-0.9.8e-i386-win32.zip
extract to NUT\bin and NUT\sbin

bin\nut-scanner.exe
Cannot load USB library (libusb) : Nie mo┐na odnalečŠ okreťlonego modu│u.. USB search disabled.
Cannot load SNMP library (libnetsnmp) : Nie mo┐na odnalečŠ okreťlonego modu│u.. SNMP search disabled.
Cannot load XML library (libneon) : Nie mo┐na odnalečŠ okreťlonego modu│u.. XML search disabled.
Cannot load NUT library (libupsclient) : Nie mo┐na odnalečŠ okreťlonego modu│u.. NUT search disabled.

Add/Remove Programs \ NUT \ Repair button

NUT UPS driver installer.
-------------------------

Searching for known UPS...
Found UPS : vendor ID = 51D - Product ID = 3
Extracting driver files...
  Success
  USB\VID_051D&PID_0003&REV_0001: Installing driver
Requested resource not found
An error occured while installing driver.
Try installing libUSB manually.
Hit enter to continue

At others 3 ISSUE here I not found a solution.
Where is a proper USB LIB package, or not exist ?

@BuxtonCalvin
Copy link

Can someone fix this basic install issue. I see the same errors on a 64bit winpro machine with a USB connection to the APC UPS. Very frustrating.

@jimklimov
Copy link
Member

jimklimov commented Nov 29, 2021 via email

@4SiB
Copy link
Author

4SiB commented Nov 29, 2021

I use https://networkupstools.org/download.html#_binary_packages :
Windows (complete port, Beta): Windows MSI installer 2.6.5-6

@BuxtonCalvin
Copy link

There is only one link that I'm aware of: https://networkupstools.org/download.html#_binary_packages. If there are other builds, it would be great if you could link to them on the download page.

Hello, to help investigate, can you please link to the Windows package of NUT you are trying? AFAIK, there were spin-offs to enable Windows builds, last branched from v2.6.5, so about a decade ago. It would be interesting to revive that ability with modern NUT codebase, but contributors may be needed.

On Sun, Nov 28, 2021, 05:07 Buxton @.***> wrote: Can someone fix this basic install issue. I see the same errors on a 64bit winpro machine with a USB connection to the APC UPS. Very frustrating. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#1145 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMPTFGKBUISEKLI52Z3UWTUOGTGVANCNFSM5GVDB23A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

@4SiB
Copy link
Author

4SiB commented Dec 3, 2021

http://www.networkupstools.org/package/windows/NUT-Installer-2.6.5-6.msi
I not know anything about newer package for windows.

@jimklimov
Copy link
Member

jimklimov commented Dec 4, 2021 via email

@kramttocs
Copy link

Same here. Even messing around with the manual libusb and copying the dlls over doesn't work.
Was trying to follow this guide: https://titanwolf.org/Network/Articles/Article?AID=2ee344ef-6bec-440d-8d1c-d21777ffea12
but couldn't get past the usb search error.

@kramttocs
Copy link

Correction: I just failed to follow the instructions fully and missed renaming one of the dlls. Nut-scanner.exe shows it correctly and the service is running successfully.
Haven't tried connecting a client to it yet.

@kramttocs
Copy link

kramttocs commented Jan 19, 2022

upsc.exe is returning an error of: 'Error: Connection failure: Unknown error' and trying WinNut isn't working either so something is still amiss.

Event Viewer is showing a periodic warning message of:

usbhid-ups - libusb_get_report: libusb0-dll:err [control_msg] sending control message failed, win error: A device attached to the system is not functioning.

@WinterPhoenix
Copy link

WinterPhoenix commented Jun 17, 2022

I'm having the same issue with Windows MSI installer 2.6.5-6:

> C:\Program Files (x86)\NUT\others\wdi-simple.exe

NUT UPS driver installer.
-------------------------

Searching for known UPS...
Found UPS : vendor ID = 764 - Product ID = 501
Extracting driver files...
  Success
  USB\VID_0764&PID_0501&REV_0001: Installing driver
Requested resource not found
An error occured while installing driver.
Try installing libUSB manually.
Hit enter to continue

It does warn that it's a Beta I guess.

Edit: Oh, apparently 2.6.5 is ancient. Why even have that on the Downloads page anymore? It's clearly not a "beta" so much as it is abandoned.

@jimklimov
Copy link
Member

During the past months I've revived an effort to merge that old branch made from NUT 2.6.5 with current codebase, with progress covered in issue #5 abd getting more and more drivers built. I did not touch the installer yet, however, so can't comment on it well. More able hands are welcome =)

@jo-chemla
Copy link

jo-chemla commented Jun 22, 2022

During the past months I've revived an effort to merge that old branch made from NUT 2.6.5 with current codebase,

Thanks for the info @jimklimov, great to hear! Is there any drawback to using nut installed on Windows/Ubuntu via the Windows Subsystem for Linux WSL?

@jimklimov
Copy link
Member

jimklimov commented Jun 22, 2022

Did not try WSL with local-access devices (usb/serial), so no idea if you can pass-through the connections to that VM or how.

A WSL Ubuntu did suffice for me to build NUT (same as for other Linux, no relation to a Windows-binary build). Probably network drivers (snmmp, netxml...) would work and then no quick ideas how to shut down Windows from the Ubuntu session (or if it runs at all until you open a terminal).

@Anutrix
Copy link

Anutrix commented Sep 4, 2022

libwdi code we use to install driver on Windows is from over 11 years ago. I think it's about time we update it.

@jimklimov
Copy link
Member

So far MSI packaging was not re-explored, so practically we don't use that, yet. If something is doable to improve it, and usable on at least modern Windows (XP+?), be our guest to try. Maybe makes sense to revive what allegedly worked first though, might be a simpler stepping stone.

@maxshcherbina
Copy link

I was wondering if there has been progress made on this?

@jimklimov
Copy link
Member

jimklimov commented Jan 3, 2024

Unfortunately, none that I know of. I've tried for a few hours to understand the installer tech used before, and how the template could be extended to cover the many new files and groupings we have in current codebase (they seem to list UUIDs and maybe hashes of the delivered files, so there gotta be some tooling which would collect the info from the built proto-install area), but left not much wiser and had other priorities since.

Generally I summarized the current state of NUT for Windows effort at https://github.com/networkupstools/nut/wiki/NUT-for-Windows

@thisIsNotTheFoxUrLookingFor

Run C:\Program Files (x86)\NUT\others\wdi-simple.exe as administrator, this allows libusb driver to be installed

image

@pHarlock
Copy link

Run C:\Program Files (x86)\NUT\others\wdi-simple.exe as administrator, this allows libusb driver to be installed

This didin't work on my ws2022 install, still the same "install libusb manually".
I know this is a very old build but I'd be running old powerware software if i could find my old downloads or cd.

@jimklimov
Copy link
Member

Just in case, did you have a chance to try the newer builds from https://github.com/networkupstools/nut/wiki/NUT-for-Windows effort? They are not packaged (no MSI) yet, just tarballs with all programs and DLLs in an expected layout, coming straight from the CI build farm... and there would be a bit of trickery about libusb, as documented there. If you walk this path, would be great to hear back (not much feedback so far)!

@dusanhauko
Copy link

Correction: I just failed to follow the instructions fully and missed renaming one of the dlls. Nut-scanner.exe shows it correctly and the service is running successfully. Haven't tried connecting a client to it yet.

Hello kramttocs. You write something about renaming some files to make NUT service working. The link in one your post does not work anymore. Can you please give me name of the files to rename?
Dusan

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

No branches or pull requests