Giter Site home page Giter Site logo

Comments (3)

jimklimov avatar jimklimov commented on September 26, 2024

Cheers, your question got me to revise the few hits of "openwrt" in this issue tracker, and labeling them for easier search later.

It seems your best shot would be to start from the official packaging recipes, substitute newer sources (eventually some results of your own experiments) and try to get that built. Also can ask that community for more points of view :)

That said, maybe you can just get away with a cross-build (or a build with qemu-backed container or VM "natively" running the CPU of your router - probably some MIPS, RISC or ARM chip), and copying the binaries and libraries involved. I did something like this to build newer e2fsck utilities for an Android phone, on Windows (well, WSL2 Ubuntu) of all places, and it worked.

I had a write-up about LXC container setup for NUT CI at https://github.com/networkupstools/nut/blob/master/docs/ci-farm-lxc-setup.txt and there are some hints about using qemu-static for non-native CPU builds, but there's really not much to it after registering the binary handler in the host. Maybe Debian buildroots (or Dockerfiles people float around) would do most of the same for you, without the need for a fully-fledged container, but I did not follow those paths myself. Then there's also Termux project, to use your Android phone as a native non-x86 Linux system ;)

It may be easier however, for the first shot, to build and run NUT on your workstation/laptop/... e.g. following https://github.com/networkupstools/nut/wiki/Building-NUT-for-in%E2%80%90place-upgrades-or-non%E2%80%90disruptive-tests and connect the USB cable from your UPS there, and check if it offers the beeper control. This ability may depend on the "subdriver" involved (currently not choosable manually, depends on USB IDs built into NUT subdriver sources) and on the USB HID endpoints that the particular device exposes. If it is not currently supported for yours, you can trawl the driver debug logs (bump verbosity) and/or use usbhid-ups -x explore to try discovering if there are reports that your device shouts and the current mapping table in the subdriver does not consider yet (alas, for many data points and commands, there are several ways to pass them) - see https://github.com/networkupstools/nut/blob/master/docs/hid-subdrivers.txt for general suggestions.

from nut.

Voidstranger avatar Voidstranger commented on September 26, 2024

Unfortunaly, I'm far from that UPS and router now. So I can't just connect UPS to laptop.

I will try to ask this question on OpenWRT forums. It seems, OpenWRT repository has pretty outdated usbhid-ups driver.
Here, for example, I can see, that NUT uses MGE HID driver (or is it "subdriver"?), which has beeper disabling function and supports instant commands: https://github.com/networkupstools/nut/issues/1853 But there guy is using 2.7.4 NUT. I'm using 2.8.0 and I have no instant commands at all.

My NUT is using Phoenixtec/Liebert HID driver, which lacks most of the functions.

from nut.

jimklimov avatar jimklimov commented on September 26, 2024

Those two are a known "problem", since some devices by either have same USB VID:PID and are differentiated by string (manufacturer) or similar clues to pick one or another subdriver. This was supposed to be based on vendor info, but for most cases was a loose guess and the default catch-all varied between NUT releases (and a motivator to get a subdriver config keyword there). On the master branch there was recently a PR adding many data-points to one of those...

from nut.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.