Comments (7)
So this essentially helps for systems that do not serve a device (on bus) number, but serve a port number?
I think the relatively recent fix to actually handle the device number tried in fact a port number method in earlier iterations.
Can you please re-post this as an actual github pull request, with attribution, CI tests and everything? Dpcs would need an update for example. If this is not implemented with libusb-0.x (or is it?), some ifdef's are due or at least log messages for skipped unsupported-by-this-build config option, etc.
I'm concerned about those "NO NO NO" abortive returns in particular. I guess they remained from some experiment to balance mge/liebert HIDs and do not directly relate to this proposed feature?
from nut.
So this essentially helps for systems that do not serve a device (on bus) number, but serve a port number?
Yes, if the hardware supports it
Can you please re-post this as an actual github pull request, with attribution, CI tests and everything?
It takes time. I added a new variable portno because according to the documentation, port is only used for COM ports. Does it make sense to use this parameter for COM and USB ports in different senses? Such a solution may simplify configuration and description in the future.
Dpcs would need an update for example. If this is not implemented with libusb-0.x (or is it?), some ifdef's are due or at least log messages for skipped unsupported-by-this-build config option, etc.
In libusb 0.1 this is also possible. Not in the usual way, but it is possible.
I'm concerned about those "NO NO NO" abortive returns in particular. I guess they remained from some experiment to balance mge/liebert HIDs and do not directly relate to this proposed feature?
I'm the one who couldn't handle the diff. I didn't want to use liebert-hid, which doesn't show the temperature on some devices.
I'll be back when I finish working on the integration requirements and prepare a correct patch.
from nut.
Well, port
could historically be for (path to device of) serial ports. But eventually it became an ubiquitous required parameter, such as hostname (+ maybe :portnum
) for snmp and other networked protocols, path to resource files for dummy-ups in emulator mode, or the currently neutered auto
for USB. There were comments that libusb1 can actually allow to use devfs paths (/dev/usb/0
or /system/char/something
- some such) so adding that ability would be welcome by some people (number-based IDs are subject to enumeration changes).
from nut.
I have prepared a patch with pre-installed define.
There is no cross-platform solution for finding the hardware port number for libusb-0.1, and I really don't want to complicate the code for the sake of old solutions.
The parameter portno
had to be renamed to busport
so that one could guess the behavior features without reading the libusb documentation.
Used define WITH_USB_BUS PORT
to enable support for the new filter.
Unfortunately, this is my first time writing code for c and I am not familiar with automake at all, so I need help in solving a specific task: it is necessary to arrange the inclusion of the flag by condition:
#if defined(LIBUSB_API_VERSION) && (LIBUSB_API_VERSION >= 0x01000102)
DEFINE WITH_USB_BUSPORT
#endif
Thank you very much
0001-Update-blazer_usb.c-libusb0.c-and-7-more-files.patch.zip
from nut.
NOTE: Found what seems to be the previous experience in this area: #1819
from nut.
Thanks! I've snow-balled this a bit and made a PR #2054 starting from your patch-file :)
Also extended nut-scanner
with this ability:
$ ./tools/nut-scanner/nut-scanner
Scanning USB bus.
No start IP, skipping SNMP
Scanning XML/HTTP bus.
No start IP, skipping NUT bus (old connect method)
Scanning NUT bus (avahi method).
Scanning IPMI bus.
Failed to create Avahi client: Daemon not running
[nutdev1]
driver = "usbhid-ups"
port = "auto"
vendorid = "0463"
productid = "FFFF"
product = "Ellipse ECO"
serial = "000000000"
vendor = "EATON"
bus = "003"
device = "007"
busport = "002"
###NOTMATCHED-YET###bcdDevice = "0100"
# WARNING: all-same character "serial" with 9 copies of '0' (0x30) reported in some devices: nutdev1
from nut.
Thank you very much, you have done a lot of work that I would not be able to cope with to some extent.
All the additions that I could not take into account are very clearly visible.
from nut.
Related Issues (20)
- riello_usb NPW1000 errors HOT 11
- `ups.status` reports `OB` several times (NUT v2.8.0/.1 at least)
- Implement missing WIN32 bits for `nutconf` (library, test and tool)
- Support new NUT vocabulary in `nutconf` HOT 1
- Avoid `tmpnam()` in `nutconf`
- Issue - stoping working with 2 similar Eaton HOT 2
- is it supported? Network UPS Tools upsstats 2.8.0 - energenie - [error: Driver not connected] on myups2@localhost HOT 1
- A great new way to display NUT data
- Beeper status is muted instead of enabled when beeper is working HOT 2
- Add support for AEG UPS Protect D series, like model D3000, using USB connection HOT 20
- SNMP: delta_ups-mib.c: is "splite-phase" a real word? HOT 1
- SNMP: eaton-ups-pwnm2-mib.c: two same numeric IDs in a lookup table HOT 2
- SNMP: raritan-px2-mib.c: string "NULL" instead of a sentinel with a NULL pointer HOT 3
- Fry's Electronic China UPS HOT 8
- Problem with Eaton PW9130 - ConnectedUPS Web/SNMP Card V4.38 HOT 10
- nutdrv_qx: memory leak HOT 8
- Want to update `docs/configure.txt` about developer-oriented options
- CI: `nutconf` tests occasionally fail `NutIPCUnitTest::testSignalSend`
- [HCL] APC Back-UPS NS 1500M2 (BN1500M2-CA) supported by usbhid-ups
- UPS Model "Powerwalker Basic VI 800 STL" not recognized - Driver startup issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nut.