Displaying 20 results from an estimated 40 matches for "upsdrv_cleanup".
2008 Jun 28
1
[nut-commits] svn commit r1502 - in trunk: . drivers man
Hi,
When running a driver with "-h" or without parameters, the
upsdrv_cleanup function seems to be called (which caused the warning I
mention in the ChangeLog). This doesn't seem right.
Regards,
On Sat, Jun 28, 2008 at 7:47 PM, Carlos Rodrigues
<carlosefr-guest at alioth.debian.org> wrote:
> Author: carlosefr-guest
> Date: Sat Jun 28 18:47:17 2008
> New...
2007 Jun 21
1
tripplite_usb.c reconnection
...te_usb.c. This is also blocking
> and thereby locking up the communication between driver and server. I
> don't think this is intentional, since the MAX_RECONNECT_TRIES in
> usb_comm_fail() is effectively a no-op then. I also seems to duplicate
> some things in usb_comm_fail(), like upsdrv_cleanup().
Thanks for pointing this out - I had forgotten that this code was
pretty much copied fron usbhid-ups/newhidups, and thus needed to be
fixed as well.
However, I'm not sure I caught the resolution of the problem. Should I
just take out the retry? The retry logic is a little simpler in
trippl...
2007 Oct 31
0
NUT usbhid -- trying to write USB (sub)drivers
...tected a UPS: ?/UPS USB MON V1.4
> upsdrv_initinfo...
> upsdrv_updateinfo...
> Quick update...
> dstate_init: sock /var/state/ups/usbhid-ups-sweex_PP100 open on fd 5
> upsdrv_updateinfo...
> Quick update...
> upsdrv_updateinfo...
> Quick update...
> Signal 2: exiting
> upsdrv_cleanup...
>
> [This keeps repeating to infinity so I Ctrl+C]
>
> The Values stay the same no matter if I turn UPS on/off or
> have it on mains or on battery. UPS comes with some dumb
> Windows software which can only tell as much
> as a contact closure device: on mains, on batter, b...
2018 Jan 10
0
Tripp-Lite BCPERS450 shutdown/restart problems
...614 find_nut_info: unknown info type: shutdown.return
> 0.090624 instcmd(load.on.delay, [NULL])
> 0.090633 find_nut_info: unknown info type: load.on.delay
> 0.090641 instcmd: info element unavailable load.on.delay
>
> 0.090649 instcmd(shutdown.reboot, [NULL])
> 0.091107 upsdrv_cleanup...
Sorry, I missed this part from the "-k" output. This at least seems to explain the 10-second delay. Here's what I think is going on:
NUT looks up the "shutdown.return" ("Turn off the load and return when power is back") command, and finds nothing that matches...
2007 Jun 21
0
tripplite_usb.c
...same name in tripplite_usb.c. This is also blocking
and thereby locking up the communication between driver and server. I
don't think this is intentional, since the MAX_RECONNECT_TRIES in
usb_comm_fail() is effectively a no-op then. I also seems to duplicate
some things in usb_comm_fail(), like upsdrv_cleanup().
Best regards, Arjen
--
Eindhoven - The Netherlands
Key fingerprint - 66 4E 03 2C 9D B5 CB 9B 7A FE 7E C1 EE 88 BC 57
2011 Feb 08
1
Plexus 800VA UPS on ReadyNAS Duo
...00 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00
00 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00
00 00 00 00 01 00 00 00 00 00 00 00
HIDGetEvents: failed to buffer report: Numerical result out of range
Got -34 HID objects...
Quick update...
Signal 2: exiting
upsdrv_cleanup...
this last section keeps repeating ad infinitum
I did also download the source for nut-2.6 and compiled it. Using the
drivers from that version I get a similar result :
nas:/etc/nut# /usr/local/ups/bin/usbhid-ups -a plexus -u root -DDDDDD
Network UPS Tools - Generic HID driver 0.35 (2.6.0)
USB...
2007 Jun 18
1
Megatec - modem control lines
...void upsdrv_initups(void)
{
+ int dtr_bit = TIOCM_DTR;
+ int rts_bit = TIOCM_RTS;
+
upsfd = ser_open(device_path);
ser_set_speed(upsfd, device_path, B2400);
+
+ ioctl(upsfd, TIOCMBIS, &dtr_bit);
+ ioctl(upsfd, TIOCMBIC, &rts_bit);
}
void upsdrv_cleanup(void)
{
+ int dtr_bit = TIOCM_DTR;
+
+ ioctl(upsfd, TIOCMBIC, &dtr_bit);
ser_close(upsfd, device_path);
}
This should be backwards compatible, since we never did anything with
these lines before, so the state would have been 'random' until now.Note
that at powe...
2015 Oct 23
0
I/O errors with usbhid-ups and Tripp Lite SMART1500LCDT
...l driver from USB device: No such file or directory
38.823971 failed to claim USB device: Device or resource busy
38.823982 failed to detach kernel driver from USB device: No such file or directory
38.823991 Can't claim USB device [09ae:3016]: No such file or directory
38.824002 upsdrv_cleanup...
(Those messages are printed at debug level 2, so that's probably all you need for future logs.)
I am curious to see if there is a "sweet spot" in terms of when the driver reconnects (not too early vs. not too late). At one point, I think we had a report of an UPS that needed to s...
2018 Aug 20
2
TrippLite SMX1500LCDT FreeBSD 11.2 trouble
...(Other error).
0.033438 [D3] nut_usb_claim_interface: failed to detach kernel
driver from USB device (Other error).
0.033443 [D3] nut_usb_claim_interface: failed to claim USB
device (Other error).
0.033448 Can't claim USB device 09ae:3016 (Other error).
0.033456 [D1] upsdrv_cleanup...
On Mon, Aug 20, 2018 at 4:33 AM, Charles Lepple <clepple at gmail.com> wrote:
> On Aug 19, 2018, at 3:03 PM, Valentin Merkulov <schnobel at ickis.net> wrote:
>>
>> Here is what I get:
>>
>> # usbconfig -u 1 -a 3 dump_curr_config_desc
>> ugen1.3: <...
2007 May 13
0
No subject
...*/
claim_device();
/*
* Read rubbish data a few times; the UPS doesn't seem to
respond properly
* the first few times after connecting
*/
for (i=0;i<5;i++) {
query_ups(reply);
sleep(1);
}
}
void upsdrv_cleanup(void)
{
upslogx(LOG_ERR, "CLOSING\n");
nutusb_close(upsdev, "USB");
}
void upsdrv_reconnect(void)
{
upslogx(LOG_WARNING, "RECONNECT USB DEVICE\n");
nutusb_close(upsdev, "USB");
upsdev = NULL;
sleep(3);...
2007 May 13
0
No subject
...claim_device();
- Show quoted text -
/*
* Read rubbish data a few times; the UPS doesn't seem to
respond properly
* the first few times after connecting
*/
for (i=0;i<5;i++) {
query_ups(reply);
sleep(1);
}
}
void upsdrv_cleanup(void)
{
upslogx(LOG_ERR, "CLOSING\n");
nutusb_close(upsdev, "USB");
}
void upsdrv_reconnect(void)
{
upslogx(LOG_WARNING, "RECONNECT USB DEVICE\n");
nutusb_close(upsdev, "USB");
upsdev = NULL;
sleep(3);
upsdrv...
2007 May 13
0
No subject
...claim_device();
- Show quoted text -
/*
* Read rubbish data a few times; the UPS doesn't seem to
respond properly
* the first few times after connecting
*/
for (i=0;i<5;i++) {
query_ups(reply);
sleep(1);
}
}
void upsdrv_cleanup(void)
{
upslogx(LOG_ERR, "CLOSING\n");
nutusb_close(upsdev, "USB");
}
void upsdrv_reconnect(void)
{
upslogx(LOG_WARNING, "RECONNECT USB DEVICE\n");
nutusb_close(upsdev, "USB");
upsdev = NULL;
sleep(3);
upsdrv...
2014 Dec 04
0
06da:0002 Phoenixtec Power Co., Ltd UPS
On Dec 3, 2014, at 2:02 PM, janc at telefonica.net wrote:
> USB error: error sending control message: Invalid or incomplete
> multibyte or wide character
This is a wild guess, but what about using the option "langid_fix=0x0409"?
--
Charles Lepple
clepple at gmail
2018 Aug 20
2
TrippLite SMX1500LCDT FreeBSD 11.2 trouble
...2] nut_libusb_open: Eaton device v2.02. Skipping
method 2 for retrieving HID descriptor.
0.043731 [D2] nut_libusb_open: unable to retrieve any HID descriptor.
0.043762 [D2] nut_libusb_open: no appropriate HID device found.
0.043768 No matching HID UPS found
0.043782 [D1] upsdrv_cleanup...
usbconfig commands return the following:
# usbconfig -u 1 -a 3 dump_curr_config_desc
ugen1.3: <Tripp Lite TRIPP LITE UPS> at usbus1, cfg=0 md=HOST spd=LOW
(1.5Mbps) pwr=ON (100mA)
Configuration index 0
bLength = 0x0009
bDescriptorType = 0x0002
wTotalLength = 0x0022
b...
2007 Aug 23
1
[nut-commits] svn commit r1073 - in trunk: . drivers
.../drivers/tripplite_usb.c (original)
> +++ trunk/drivers/tripplite_usb.c Thu Aug 23 19:43:41 2007
> @@ -348,6 +348,7 @@
> static int reconnect_ups(void)
> {
> int ret = 1;
> + int mode = MODE_REOPEN;
>
> if (hd == NULL)
> {
> @@ -357,7 +358,7 @@
>
> upsdrv_cleanup();
>
> - if ((hd = HIDOpenDevice(&udev, &curDevice, reopen_matcher, MODE_REOPEN)) == NULL) {
> + if ((hd = HIDOpenDevice(&udev, &curDevice, reopen_matcher, &mode)) == NULL) {
> upslogx(LOG_INFO, "Reconnecting to UPS failed; will retry later...");
&g...
2007 Feb 01
2
Re: [Nut-upsuser] Ablerex 625L USB version
...SION, DRV_VERSION, progname);
> printf("Carlos Rodrigues (c) 2003-2007\n\n");
> }
>
>
> void upsdrv_initups(void)
> {
> ! upsfd = ser_open(device_path);
> ! ser_set_speed(upsfd, device_path, B2400);
> }
>
>
> void upsdrv_cleanup(void)
> {
> ! ser_close(upsfd, device_path);
> }
>
>
> --- 766,785 ----
>
> void upsdrv_banner(void)
> {
> ! printf("Network UPS Tools - Megatec protocol driver %s[%s]
> (%s)\n", DRV_VERSION, comm->name, UPS_VERSION);
>...
2018 Jul 02
4
No run cmd /usbhid-ups -k !
I used strace and the result is bus is busy:
clock_gettime(CLOCK_MONOTONIC, {8158, 708518222}) = 0
timerfd_settime(11, TFD_TIMER_ABSTIME, {it_interval={0, 0}, it_value={8159,
708518000}}, NULL) = 0
ioctl(12, USBDEVFS_SUBMITURB, 0x40810) = 0
poll([{fd=7, events=POLLIN}, {fd=9, events=POLLIN}, {fd=11, events=POLLIN},
{fd=12, events=POLLOUT}], 4, 60000) = 1 ([{fd=12, revents=POLLOUT}])
ioctl(12,
2017 Dec 20
3
Tripp-Lite BCPERS450 shutdown/restart problems
....return, [NULL])
0.090614 find_nut_info: unknown info type: shutdown.return
0.090624 instcmd(load.on.delay, [NULL])
0.090633 find_nut_info: unknown info type: load.on.delay
0.090641 instcmd: info element unavailable load.on.delay
0.090649 instcmd(shutdown.reboot, [NULL])
0.091107 upsdrv_cleanup...
2018 Aug 19
2
TrippLite SMX1500LCDT FreeBSD 11.2 trouble
Here is what I get:
# usbconfig -u 1 -a 3 dump_curr_config_desc
ugen1.3: <Tripp Lite TRIPP LITE UPS> at usbus1, cfg=0 md=HOST spd=LOW
(1.5Mbps) pwr=ON (100mA)
Configuration index 0
bLength = 0x0009
bDescriptorType = 0x0002
wTotalLength = 0x0022
bNumInterfaces = 0x0001
bConfigurationValue = 0x0001
iConfiguration = 0x0000 <no string>
bmAttributes =
2018 Aug 20
2
TrippLite SMX1500LCDT FreeBSD 11.2 trouble
Attached are config.log and usbhid-ups output with -u root (gzipped).
Now driver output looks a lot like the one from port build.
On Mon, Aug 20, 2018 at 1:42 PM, Charles Lepple <clepple at gmail.com> wrote:
> On Aug 20, 2018, at 1:03 AM, Valentin Merkulov <schnobel at ickis.net> wrote:
>>
>> 0.033412 [D3] nut_usb_claim_interface: failed to claim USB
>>