Comments (2)
The decoding should have started earlier, with 34 64 00 00 00 00 00 00 d0 12 2d 0b 1b 5d 00 00
line - and it ends the string with 0x00
after two bytes of data ;)
On one hand, it is indeed odd that it returns 512 bytes, using an uninitialized memory block. By content, it was memory that once belonged to the process and was since freed. So the bytes in it are not too much surprising, the length is. Code comments are about broken device report descriptors, so maybe that's just it - many vendors can't read USB specs well.
from nut.
Just some notes as I look at this superficially ;
HIDGetEvents()
has
r = (interrupt_size > 0 && interrupt_size < sizeof(buf))
? interrupt_size : sizeof(buf);
where sizeof(buf)
== SMALLBUF == 512. This would be used if interrupt_size
is <=0; this (global !) variable is set in usbhid-ups.c from (I think) a config key "interruptsize". I wonder if it's set to 0 by default ?
from nut.
Related Issues (20)
- Can't power off ups device from Truenas HOT 10
- CI: `clang-18` complains about a lot of `switch` clauses without a `default` label
- [HCL] TED Electric 3100VA 1800W UPS Line Interactive supported by probably Richcomm HOT 19
- RFE: SHM and/or FUSE to access nut-client information
- [HCL] American Power Conservation Back-UPS NS 1350M2 supported by usbhid-ups
- Need Help with Windows NUT Server install HOT 14
- UPS equipment offline due to unknown reasons HOT 10
- Implement suspend/hibernate handling on Windows for `upsmon`
- Implement suspend/hibernate handling on Solaris/illumos for `upsmon`
- missing input/output voltage variables on APC SMT2200RMI2UC (2U rackmount model) HOT 2
- ups.conf: allow_killpower flag has no effect HOT 2
- Megatec NetAgentA SNMP UPS (Ts Shara 3200VA) invalid ups.status: HOT 9
- APC_MODBUS _apc_modbus_read_registers Timeouts HOT 5
- Service failed to start HOT 25
- Allow configuring fallback and/or preferred langid for USB strings HOT 1
- USB string langid should be cached somewhere (in `USBDevice_t` or a new `USBHandle_t`?) HOT 2
- All drivers and `nut-scanner` should use `nut_usb_get_string` instead of libusb's `*_simple` and `*_ascii` HOT 1
- Please document how to run with LIBUSB_DEBUG=x or enable libusb debug output with nut debug options HOT 5
- [Support] Epyc ION UPS (lsusb listed as cyber power CP1500PFCLCD) connection refused HOT 2
- Eaton UPS with SNMP not changing to LB ups.status on low battery 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.