[Nut-upsuser] MGE Nova 1100 using newhidups on netBSD 3.0

Arnaud Quette aquette.dev at gmail.com
Fri Mar 3 07:45:00 UTC 2006


Hi Nevil,

2006/3/2, Nevil Thatcher <NevilTh at nat.com.au>:
> Hi Arnaud,
>
> Well I have built & installed libusb 0.1.11.
>
> No difference in behaviour.
>
> Ran the test suite as suggested and noted still getting the input/output
> error reported on many (but not all) of the usb_control_msg calls.
>
> In looking at this ,always appeared to be on calls with large buffers ?
>
> On looking through the doco's found that there was a setting in the request
> structure passed to ioctl to allow short xfer's. This was not used so
> requests were a larger buffer was provided than the data size returned was
> generating the input/output errors (I think).
>
> Anyway changed the code in bsd.c (libusb) function usb_control_msg
>
> From req.ucr_flags = 0;
> To   req.ucr_flags = USBD_SHORT_XFER_OK;
>
> And now don't get the input/output errors!.

a good catch. Can you forward it to the libusb maintainer?

@Thierry: any news on freeBSD? The same problem should occur as it has
here solved the getstring problem too (for ups.{model,mfr}

> This hasn't solved the fact that I still get stale data until such time as I
> unplug/replug the USB cable but at least after I do that upsc is reporting
> UPS related variables which it wasn't before.

I think this second one is due to the fact that notification do not work
Can you send back a debug (level 3 == "newhidups -DDD") output, also
exporting USB_DEBUG=3

> Ie.
>
> bash-3.1# upsc MGENova at localhost
> battery.charge: 100
> battery.charge.low: 30
> battery.runtime: 1000
> driver.name: newhidups
> driver.parameter.pollinterval: 15
> driver.parameter.port: auto
> driver.version: 2.0.3
> driver.version.data: MGE HID 0.8
> driver.version.internal: 0.28
> outlet.1.switch: 1
> output.voltage: 230.0
> ups.delay.shutdown: -1
> ups.delay.start: -10
> ups.load: 39
> ups.mfr: MGE UPS SYSTEMS
> ups.model: NOVA 1100 AVR
> ups.power.nominal: 1100
> ups.status: OL CHRG
> ...

so, we're on the way to have full *BSD support ;-)

Arnaud
--
Linux / Unix Expert - MGE UPS SYSTEMS - R&D Dpt
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://people.debian.org/~aquette/
OpenSource Developer - http://arnaud.quette.free.fr/



More information about the Nut-upsuser mailing list