[Nut-upsuser] Tripp Lite OMNI1000 LCD issues
John Darrah
xyllyx at gmail.com
Mon Apr 21 04:54:55 UTC 2008
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 -DDDD
>> 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)
{
char sockname[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
More information about the Nut-upsuser
mailing list