Re: [Nut-upsuser] Why are LAN ports not standard on UPSs these days?

2017-06-25 Thread John Darrah

On 6/25/2017 8:33 AM, Manuel Wolfshant wrote:

On 06/25/2017 05:52 PM, Philip Rhoades wrote:

Larry,


On 2017-06-25 23:26, Larry Fahnoe wrote:

Hi Phil,

I don't have an answer to your question about the lack of LAN ports,



I think it is weird - with everything else being connected to LANs 
like fridges etc . . why not UPSs?
because probably an UPS port ( or even RS232-to-USB adapter ) is 
cheaper to implement than a LAN port ( & everything associated with 
it, like IP stack, SNMP and so on )


A LAN port is also an enterprise feature and companies don't like their 
lesser expensive products competing with the enterprise stuff.


-- john


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Setup of upssched on opensuse 11

2008-09-16 Thread John Darrah
On Tue, Sep 16, 2008 at 03:12:22PM -0400, tarbeite wrote:
Hi all
.
.
stuff
.
.
 
case $(1) in
onbattwarn)
WALL UPS is down fix me please
echo TIM_UPS is on Battery for more then 10 seconds \
| mailx -r [EMAIL PROTECTED] -sTim_ups on Battery
[EMAIL PROTECTED]
;;
esac

In the above `case $(1) in' should be `case ${1} in' or just 
`case $1 in', because the shell would elicit an error otherwise. 

Insert `exec  /tmp/errors.log 21' at the begining of the 
script to save error messages to the file noted for debugging.



-- 
John

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Tripp Lite OMNI1000 LCD issues

2008-04-22 Thread John Darrah
On Tue, Apr 22, 2008 at 11:15:27AM +0200, Arjen de Korte wrote:
  Attached is approx 30 sec of output from the following command:
 

[...]

 
   /* Get HID notifications on Interrupt pipe first */
   /* TODO: cap number of times we check for events? */
   while ((evtCount = HIDGetEvents(udev, event, MAX_EVENT_NUM))  0) {
 
 If you replace the 'while' with 'if', you'll probably be fine. Having said
 that, it makes sense to upgrade to nut-2.2.2-pre2 as well (this has the
 same bug), since that also fixed some other issues with the 'usbhid-ups'
 driver.

I changed the 'while' to an 'if'.

I now responds to Ctl-C.
The socket is being created.
Nothing more to fix... now i'm bored ;-)

Thanks

-- 
John

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Tripp Lite OMNI1000 LCD issues

2008-04-21 Thread John Darrah
On Mon, Apr 21, 2008 at 09:36:07AM +0200, Arjen de Korte wrote:
 John Darrah wrote:
 I have determined that the the socket is never created because the program
 never reaches dstate_init().

 It *must* reach this, otherwise it would never reach the part where it  
 continuously loops through upsdrv_updateinfo().

 [...]

 The following is a section of upsdrv_initups() that i places printf's and
 noted that it never makes it to the second one shown below. Is stdout being
 closed somewhere?

 Yes, but only when running in not running in debug mode. Please run the  
 driver with debug level '-DD' (not higher!) and post the *full* output  
 of the first 30 seconds after that here.


Attached is approx 30 sec of output from the following command:

# /usr/src/nut-2.2.1/drivers/usbhid-ups -u root -DD -a trippy  poop.out 21

No extra code or printf's are in the the above exec.

Note that dstate_init: sock... does not appear in the output.


FYI: In one test, add the following to dstate_init... It's almost as if 
it is not even being called???

void dstate_init(const char *prog, const char *port)
{
charsockname[SMALLBUF];

fprintf(stderr, @@@2 i made it here!\n); --- i never see this
exit(1); --- this does not cause it to exit???

/* do this here for now */
signal(SIGPIPE, SIG_IGN);

fprintf(stderr, @@@3 i made it here!\n);

if (port != NULL)
snprintf(sockname, sizeof(sockname), %s/%s-%s,
dflt_statepath(), prog, port);
else
snprintf(sockname, sizeof(sockname), %s/%s,
dflt_statepath(), prog);

sockfd = open_sock(sockname);

upsdebugx(2, dstate_init: sock %s open on fd %d, sockname, sockfd); 
--- not in the debug output???
}

-- 
John


usbhid.out.gz
Description: Binary data
___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser

Re: [Nut-upsuser] Tripp Lite OMNI1000 LCD issues

2008-04-20 Thread John Darrah
On Mon, Mar 31, 2008 at 09:16:03AM +0200, Arjen de Korte wrote:
 John Darrah wrote:

 I have determined that the socket is not being created. Even with - 
 the following is never executed:

 upsdebugx(2, dstate_init: sock %s open on fd %d, sockname, sockfd)

 With the driver running if did a find /var /usr /lib /tmp -type s and
 no sockets were found with the appropriate name you noted above.

[...snip...]


 See lines 416-435 in 'drivers/main.c' where we setup the signal handler  
 for these signals. Basically all that happens, is that we set a flag  
 that tells the driver to break from a loop. There is nothing wrong here  
 and similar like the socket code mentioned above, this hasn't changed in  
 at least three years.

 Best regards, Arjen

 Sorry it's taken so long to get back to this (see previous posts).
 
I have determined that the the socket is never created because the program
never reaches dstate_init(). The following is from printf()'s inserted at
specific places to track progress with the following command:

# /usr/src/nut-2.2.1/drivers/usbhid-ups -u root -D -a trippy

.
.
.
Warning: This is an experimental driver.  i printed this as a marker
Some features may not function correctly.

main@@@3 i made it here.
main@@@4 i made it here.
main@@@5 i made it here.
main@@@6 i made it here.
main@@@7 i made it here.
main@@@8 i made it here.
main@@@9 i made it here.
main@@@10 i made it here.
main@@@11 i made it here.
usbhid-ups@@@2
usbhid-ups@@@3 -- this is the last one printed
Detected a UPS: Tripp Lite /TRIPP LITE UPS 
Can't retrieve Report 49: Value too large for defined data type
HIDGetDataValue: Value too large for defined data type
upsdrv_initinfo...
upsdrv_updateinfo...
Got 8 HID objects...
NUT doesn't use this HID object
NUT doesn't use this HID object
NUT doesn't use this HID object
.
.
.

The following is a section of upsdrv_initups() that i places printf's and
noted that it never makes it to the second one shown below. Is stdout being
closed somewhere?

#endif /* SHUT_MODE */

printf(usbhid-ups@@@3\n); - this is the last one printed (see 
above)


/* Search for the first supported UPS matching the
   regular expression (USB) or device_path (SHUT) */
ret = comm_driver-open(udev, curDevice, subdriver_matcher, 
callback);
if (ret  1)
fatalx(EXIT_FAILURE, No matching HID UPS found);

printf(usbhid-ups@@@4\n); - it never makes it here

hd = curDevice;

upsdebugx(1, Detected a UPS: %s/%s, hd-Vendor ? hd-Vendor : 
unknown,
 hd-Product ? hd-Product : unknown);

if (hid_ups_walk(HU_WALKMODE_INIT) == FALSE) {
fatalx(EXIT_FAILURE, Can't initialize data from HID UPS);
}

printf(usbhid-ups@@@5\n);  or here
}


The following is dstate_init() none of the printf()'s are reached.

void dstate_init(const char *prog, const char *port)
{
charsockname[SMALLBUF];

printf(@@@start - dstate_init\n);

/* do this here for now */
signal(SIGPIPE, SIG_IGN);

printf(@@@end1 - dstate_init\n);

if (port != NULL)
snprintf(sockname, sizeof(sockname), %s/%s-%s,
dflt_statepath(), prog, port);
else
snprintf(sockname, sizeof(sockname), %s/%s,
dflt_statepath(), prog);

printf(@@@end2 - dstate_init\n);

sockfd = open_sock(sockname);

printf(@@@end3 - dstate_init\n);
}


Any pointers on the above?

-- 
John


___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] Tripp Lite OMNI1000 LCD issues

2008-03-29 Thread John Darrah
On Sat, Mar 29, 2008 at 06:28:38PM +0100, Arjen de Korte wrote:
 
 You may also want to checkout that you didn't do something 
 weird to the STATEPATH (the directory where this socket is 
 created). After starting up the driver, you should be able 
 to see a listening socket being created there.
 

# strings /lib/nut/usbhid-ups

.
.
/var/run/nut
NUT_STATEPATH
NUT_CONFPATH
/etc/nut
.
.

It looks like the socket is supposed to be built in 
/var/run/nut. This directory exists, but when i run 
/lib/nut/usbhid-ups (as root) I do not see a socket there. I 
did a chmod 777 to be sure perms on the directory were ok.

What is the socket filename?


Does the following strace segment mean any thing.

.
.
socket(PF_FILE, SOCK_STREAM, 0) = 4
fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(4, {sa_family=AF_FILE, path=/var/run/nscd/socket}, 110) = -1 ENOENT 
(No such file or directory)
close(4)= 0
socket(PF_FILE, SOCK_STREAM, 0) = 4
fcntl64(4, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
connect(4, {sa_family=AF_FILE, path=/var/run/nscd/socket}, 110) = -1 ENOENT 
(No such file or directory)
close(4)= 0
.
.

-- 
john

___
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser


Re: [Nut-upsuser] usbhid-ups looping and unresponsive after update

2008-02-08 Thread John Darrah
On Thu, Feb 07, 2008 at 08:24:13AM +0100, Arjen de Korte wrote:
  The previous driver would stop by typing a CTRL-C when
  running interactively in debug mode. The new driver will not
  respond to a CTRL-C. It does not respond to a kill -1,
  kill -2 or a kill -15 either (Which may or may not be
  OK).
 
 It *will* respond to CTRL-C, but due to the increased debug output, it
 behaves very sluggish, so you may need to try a couple of times before it
 gets it.
 

Even without the -D switch it does not quit with CTRL-C, even when I try
typing CTRL-C many times. I tried in a virtual console just in case there
was somthing weird about an xterm that didn't work either.

This may be something with specific to the debian(testing) package I'm using.


The following output is without a debug switch:


# /lib/nut/usbhid-ups -u root -a trippy
Network UPS Tools: 0.29 USB communication driver - core 0.32 (2.2.1-)

Using subdriver: TrippLite HID 0.2 (experimental)
HIDGetDataValue: Value too large for defined data type
Killed


Here is a dump from the following command:

/lib/nut/usbhid-ups -u root -DDD -a trippy  hid.out 21


debug level is '3'
upsdrv_initups...
Checking device (/) (004/001)
- VendorID: 
- ProductID: 
- Manufacturer: Linux 2.6.22-3-686 ehci_hcd
- Product: EHCI Host Controller
- Serial Number: :00:03.3
- Bus: 004
Trying to match device
Device does not match - skipping
Checking device (/) (002/001)
- VendorID: 
- ProductID: 
- Manufacturer: Linux 2.6.22-3-686 ohci_hcd
- Product: OHCI Host Controller
- Serial Number: :00:03.1
- Bus: 002
Trying to match device
Device does not match - skipping
Checking device (046D/C50E) (003/002)
- VendorID: 046d
- ProductID: c50e
- Manufacturer: Logitech
- Product: USB RECEIVER
- Serial Number: unknown
- Bus: 003
Trying to match device
Device does not match - skipping
Checking device (/) (003/001)
- VendorID: 
- ProductID: 
- Manufacturer: Linux 2.6.22-3-686 ohci_hcd
- Product: OHCI Host Controller
- Serial Number: :00:03.2
- Bus: 003
Trying to match device
Device does not match - skipping
Checking device (09AE/2005) (001/003)
- VendorID: 09ae
- ProductID: 2005
- Manufacturer: Tripp Lite 
- Product: TRIPP LITE UPS 
- Serial Number: 692195 B 
- Bus: 001
Trying to match device
Device matches
HID descriptor, method 1: (9 bytes) = 09 21 10 01 00 01 22 cb 01
HID descriptor, method 2: (9 bytes) = 09 21 10 01 00 01 22 6a 02
Warning: two different HID descriptors retrieved (Reportlen = 459 vs. 618)
HID descriptor length 618
Report Descriptor size = 618
Report Descriptor: (618 bytes) = 05 84 09 04 a1 01 09 24 a1 02 05 84 85 28
09 fe 75 08 95 01 26 ff 00 15 00 b1 03 85 29 09 ff b1 03 85 2b 09 fd b1 03
09 1a a1 02 09 40 85 30 b1 83 c0 75 08 95 01 26 ff 00 85 11 09 5a b1 82 05
85 95 01 75 08 26 ff 00 15 00 85 2a 09 89 b1 03 85 33 09 2c b1 03 25 64 85
34 09 66 81 a2 85 34 09 66 b1 a2 85 37 09 67 b1 03 05 84 09 02 a1 02 25 01
75 01 85 32 05 84 95 01 09 69 81 a2 09 d0 81 a2 95 03 09 44 09 45 09 4b 81
a2 95 03 81 01 85 32 05 84 75 01 95 01 09 69 b1 a2 05 85 09 d0 b1 a2 95 03
09 44 09 45 09 4b b1 a2 95 03 b1 01 c0 c0 05 84 09 10 a1 02 09 12 a1 02 85
04 09 40 75 10 95 01 27 ff ff 00 00 b1 02 75 08 05 84 09 02 a1 02 85 23 05
85 75 01 25 01 95 03 09 44 09 45 09 4b b1 82 95 05 b1 01 c0 c0 05 84 95 01
75 08 26 ff 00 09 58 85 10 b1 82 c0 05 84 09 1e a1 02 95 01 75 08 26 ff 00
85 01 09 40 b1 03 85 02 09 42 b1 03 05 84 85 03 09 43 75 10 95 01 27 ff ff
00 00 b1 03 c0 05 84 95 01 75 08 15 00 26 ff 00 09 18 a1 02 09 20 a1 02 75
08 15 00 25 01 95 01 75 10 27 ff ff 00 00 15 00 85 15 09 57 b1 82 75 08 15
00 26 ff 00 06 ff ff 85 51 09 91 b1 82 85 52 09 92 b1 82 85 b6 09 c7 b1 82
c0 c0 06 ff ff 09 10 a1 81 75 10 95 01 27 ff ff 00 00 85 6c 09 7d b1 03 c0
06 ff ff 09 15 a1 81 75 08 95 01 26 ff 00 15 00 85 96 09 c0 b1 02 75 20 85
b4 09 d2 b1 02 75 10 85 97 09 c1 b1 02 75 08 85 98 09 c2 b1 02 75 10 85 99
09 c3 b1 02 85 9b 09 c5 b1 02 75 20 85 9a 09 c4 b1 02 c0 05 84 09 24 a1 02
85 31 09 30 75 08 95 01 26 ff 00 15 00 b1 03 c0 09 10 a1 02 09 12 a1 02 85
20 09 30 75 10 27 ff ff 00 00 b1 02 c0 c0 09 16 a1 02 09 1a a1 02 85 18 55
0f 09 30 b1 82 85 19 09 32 b1 82 c0 55 00 85 22 09 02 a1 02 75 01 95 03 25
01 05 84 09 63 09 6f 09 6e b1 82 95 01 b1 03 09 65 b1 82 09 6d 95 01 b1 03
09 67 09 62 95 02 b1 82 95 06 b1 03 95 01 09 72 b1 82 95 01 b1 03 c0 c0 05
84 09 18 a1 02 09 20 a1 02 75 10 95 01 15 00 27 ff ff 00 00 85 17 09 55 b1
82 c0 c0 c0
Using subdriver: TrippLite HID 0.2 (experimental)
Report[get]: (2 bytes) = 28 01
Path: UPS.PowerSummary.iProduct, Type: Feature, ReportID: 0x28, Offset: 0, 
Size: 8, Value: 1.00
Report[get]: (2 bytes) = 29 02
Path: UPS.PowerSummary.iSerialNumber, Type: Feature, ReportID: 0x29, Offset: 0, 
Size: 8, Value: 2.00
Report[get]: (2 bytes) = 2b 03
Path: UPS.PowerSummary.iManufacturer, Type: Feature, ReportID: 0x2b, Offset: 0, 
Size: 8, Value: 3.00
Report[get]: (2 bytes) = 30 78
Path: 

[Nut-upsuser] USBDEVFS_CONTROL error ?

2008-01-26 Thread John Darrah

Does the following error message have a specific meaning:

usb 1-1: usbfs: USBDEVFS_CONTROL failed cmd usbhid-ups rqt 161 rq 1 len 2 ret 
-75


I get two of these messages every time I run the following:

/lib/nut/usbhid-ups -u root -DDD -a trippy



The following is the output from the above command:

debug level is '3'
Checking device (/) (004/001)
- VendorID: 
- ProductID: 
- Manufacturer: Linux 2.6.22-3-686 ehci_hcd
- Product: EHCI Host Controller
- Serial Number: :00:03.3
- Bus: 004
Trying to match device
Device does not match - skipping
Checking device (09AE/2005) (001/003)
- VendorID: 09ae
- ProductID: 2005
- Manufacturer: Tripp Lite 
- Product: TRIPP LITE UPS 
- Serial Number: 692195 B 
- Bus: 001
Trying to match device
Device matches
HID descriptor, method 1: (9 bytes) = 09 21 10 01 00 01 22 cb 01
HID descriptor, method 2: (9 bytes) = 09 21 10 01 00 01 22 6a 02
Warning: two different HID descriptors retrieved (Reportlen = 459 vs. 618)
HID descriptor retrieved (Reportlen = 618)
Report descriptor retrieved (Reportlen = 618)
Found HID device
Network UPS Tools: 0.28 USB communication driver 0.28 - core 0.30 (2.2.0-)

Report Descriptor size = 618
Report Descriptor: (618 bytes) = 05 84 09 04 a1 01 09 24 a1 02 05 84 85 28
09 fe 75 08 95 01 26 ff 00 15 00 b1 03 85 29 09 ff b1 03 85 2b 09 fd b1 03
09 1a a1 02 09 40 85 30 b1 83 c0 75 08 95 01 26 ff 00 85 11 09 5a b1 82 05
85 95 01 75 08 26 ff 00 15 00 85 2a 09 89 b1 03 85 33 09 2c b1 03 25 64 85
34 09 66 81 a2 85 34 09 66 b1 a2 85 37 09 67 b1 03 05 84 09 02 a1 02 25 01
75 01 85 32 05 84 95 01 09 69 81 a2 09 d0 81 a2 95 03 09 44 09 45 09 4b 81
a2 95 03 81 01 85 32 05 84 75 01 95 01 09 69 b1 a2 05 85 09 d0 b1 a2 95 03
09 44 09 45 09 4b b1 a2 95 03 b1 01 c0 c0 05 84 09 10 a1 02 09 12 a1 02 85
04 09 40 75 10 95 01 27 ff ff 00 00 b1 02 75 08 05 84 09 02 a1 02 85 23 05
85 75 01 25 01 95 03 09 44 09 45 09 4b b1 82 95 05 b1 01 c0 c0 05 84 95 01
75 08 26 ff 00 09 58 85 10 b1 82 c0 05 84 09 1e a1 02 95 01 75 08 26 ff 00
85 01 09 40 b1 03 85 02 09 42 b1 03 05 84 85 03 09 43 75 10 95 01 27 ff ff
00 00 b1 03 c0 05 84 95 01 75 08 15 00 26 ff 00 09 18 a1 02 09 20 a1 02 75
08 15 00 25 01 95 01 75 10 27 ff ff 00 00 15 00 85 15 09 57 b1 82 75 08 15
00 26 ff 00 06 ff ff 85 51 09 91 b1 82 85 52 09 92 b1 82 85 b6 09 c7 b1 82
c0 c0 06 ff ff 09 10 a1 81 75 10 95 01 27 ff ff 00 00 85 6c 09 7d b1 03 c0
06 ff ff 09 15 a1 81 75 08 95 01 26 ff 00 15 00 85 96 09 c0 b1 02 75 20 85
b4 09 d2 b1 02 75 10 85 97 09 c1 b1 02 75 08 85 98 09 c2 b1 02 75 10 85 99
09 c3 b1 02 85 9b 09 c5 b1 02 75 20 85 9a 09 c4 b1 02 c0 05 84 09 24 a1 02
85 31 09 30 75 08 95 01 26 ff 00 15 00 b1 03 c0 09 10 a1 02 09 12 a1 02 85
20 09 30 75 10 27 ff ff 00 00 b1 02 c0 c0 09 16 a1 02 09 1a a1 02 85 18 55
0f 09 30 b1 82 85 19 09 32 b1 82 c0 55 00 85 22 09 02 a1 02 75 01 95 03 25
01 05 84 09 63 09 6f 09 6e b1 82 95 01 b1 03 09 65 b1 82 09 6d 95 01 b1 03
09 67 09 62 95 02 b1 82 95 06 b1 03 95 01 09 72 b1 82 95 01 b1 03 c0 c0 05
84 09 18 a1 02 09 20 a1 02 75 10 95 01 15 00 27 ff ff 00 00 85 17 09 55 b1
82 c0 c0 c0
Detected a UPS: Tripp Lite /TRIPP LITE UPS 
Using subdriver: TrippLite HID 0.1 (experimental)
Report[r]: (2 bytes) = 28 01
Path: UPS.PowerSummary.iProduct, Type: Feature, ReportID: 0x28, Offset: 0, 
Size: 8, Value: 1.00
Report[r]: (2 bytes) = 29 02
Path: UPS.PowerSummary.iSerialNumber, Type: Feature, ReportID: 0x29, Offset: 0, 
Size: 8, Value: 2.00
Report[r]: (2 bytes) = 2b 03
Path: UPS.PowerSummary.iManufacturer, Type: Feature, ReportID: 0x2b, Offset: 0, 
Size: 8, Value: 3.00
Report[r]: (2 bytes) = 30 78
Path: UPS.PowerSummary.Input.ConfigVoltage, Type: Feature, ReportID: 0x30, 
Offset: 0, Size: 8, Value: 120.00
Report[r]: (2 bytes) = 11 02
Path: UPS.PowerSummary.AudibleAlarmControl, Type: Feature, ReportID: 0x11, 
Offset: 0, Size: 8, Value: 2.00
Report[r]: (2 bytes) = 2a 18
Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, ReportID: 0x2a, Offset: 
0, Size: 8, Value: 24.00
Report[r]: (2 bytes) = 33 02
Path: UPS.PowerSummary.CapacityMode, Type: Feature, ReportID: 0x33, Offset: 0, 
Size: 8, Value: 2.00
Report[r]: (2 bytes) = 34 64
Path: UPS.PowerSummary.RemainingCapacity, Type: Input, ReportID: 0x34, Offset: 
0, Size: 8, Value: 100.00
Path: UPS.PowerSummary.RemainingCapacity, Type: Feature, ReportID: 0x34, 
Offset: 0, Size: 8, Value: 100.00
Report[r]: (2 bytes) = 37 64
Path: UPS.PowerSummary.FullChargeCapacity, Type: Feature, ReportID: 0x37, 
Offset: 0, Size: 8, Value: 100.00
Report[r]: (2 bytes) = 32 06
Path: UPS.PowerSummary.PresentStatus.ShutdownImminent, Type: Input, ReportID: 
0x32, Offset: 0, Size: 1, Value: 0.00
Can't find object UPS.PowerSummary.PresentStatus.TLACPresent
Path: UPS.PowerSummary.PresentStatus.TLACPresent, Type: Input, ReportID: 0x32, 
Offset: 1, Size: 1
Can't find object UPS.PowerSummary.PresentStatus.TLCharging
Path: UPS.PowerSummary.PresentStatus.TLCharging, Type: Input, ReportID: 0x32, 
Offset: 2, Size: 1
Can't