Discussion:
[Nut-upsuser] Belkin unk ups
Gene Heskett
2014-10-13 00:28:15 UTC
Permalink
Greetings;

Its unk because whats plugged in seems to be blocking the rear name plate.
About all I can recall is that its big, 3 battery unit, rated somewhere
north ob 1250 VA.

Its an 050D:0751 Belkin.

What driver should I use, and what file is that set in?

The nut version presently and freshly installed is from the Ubuntu 10.04.4
LTS repo's. Probably old, but IIRC it also worked with the Ubu 8.04 LTS
version.

Thanks.

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
US V Castleman, SCOTUS, Mar 2014 is grounds for Impeaching SCOTUS
Charles Lepple
2014-10-14 12:19:02 UTC
Permalink
Post by Gene Heskett
Its unk because whats plugged in seems to be blocking the rear name plate.
About all I can recall is that its big, 3 battery unit, rated somewhere
north ob 1250 VA.
Its an 050D:0751 Belkin.
What driver should I use, and what file is that set in?
Looks like it is in usbhid-ups.

If you're asking what file should you specify the driver in, it's ups.conf (probably still located in /etc/nut; I don't think it has moved much in Ubuntu/Debian over the years).

If you are curious where the USB ID list is in the source, for usbhid-ups, there are several files named drivers/*-hid.c, and they all have macros of the form USB_DEVICE(VID, PID) which will match the hex VID:PID.
Post by Gene Heskett
The nut version presently and freshly installed is from the Ubuntu 10.04.4
LTS repo's. Probably old, but IIRC it also worked with the Ubu 8.04 LTS
version.
A quick check shows that your UPS's ID was added in 2006 (NUT v2.0.3 and later) so your version should be new enough.
--
Charles Lepple
http://ghz.cc/charles/
Gene Heskett
2014-10-14 13:07:36 UTC
Permalink
On Tuesday 14 October 2014 08:19:02 Charles Lepple did opine
Post by Charles Lepple
usbhid-ups
Added that, but only get this at "sudo service nut start"
gene at coyote:/etc/init.d$ sudo service nut start
* Starting Network UPS Tools
[ OK ]

Broadcast Message from nut at coyote
(somewhere) at 8:37 ...

Communications with UPS myups at coyote.coyote.den lost



Broadcast Message from nut at coyote
(somewhere) at 8:37 ...

UPS myups at coyote.coyote.den is unavailable

service nut stop
* Stopping Network UPS Tools

I haven't checked cabling, but AFAIK its still plugged in, but not sure if
its usb or serial cabling. I'll check that once I get both eyes open
simultaneously and report back.

Found the cable, a D type usb, unplugged it and replugged it, and it
appears now to be /dev/usb/hiddev3. dmesg, ever so helpful, and lsusb
equally helpful, do not tell what the /dev/usbdevice is assigned to the
newly discovered plugin. dmesg just reports:

[136319.530160] usb 1-10: USB disconnect, device number 2
[136322.641716] usb 1-10: new low-speed USB device number 3 using ohci-pci
[136322.929480] usb 1-10: New USB device found, idVendor=050d,
idProduct=0751
[136322.929486] usb 1-10: New USB device strings: Mfr=4, Product=20,
SerialNumber=0
[136322.929489] usb 1-10: Product: Belkin UPS
[136322.929491] usb 1-10: Manufacturer: Belkin
[136323.695058] hid-generic 0003:050D:0751.0008: hiddev0,hidraw6: USB HID
v1.11 Device [Belkin Belkin UPS] on usb-0000:00:02.0-10/input0

So is this usb-0000:00:02.0-10/input0 a valid way to give nut a path to
it, and if so, what file do I add that too?

I also note that in the original bootup discovery it was hiddev0/hidraw6,
the same as the latest plug in report, so that also appears stable.

But ls -l /dev/usb:
crw-rw---- 1 root root 180, 0 2014-10-12 18:51 hiddev0
crw-rw---- 1 root root 180, 1 2014-10-12 18:51 hiddev1
crw-rw---- 1 root root 180, 2 2014-10-12 18:51 hiddev2
crw-rw---- 1 root root 180, 3 2014-10-14 08:44 hiddev3
crw-rw---- 1 root lp 180, 4 2014-10-13 05:50 lp4
crw-rw---- 1 root lp 180, 5 2014-10-13 05:50 lp5

shows that hiddev3 is the one created by my cable unplug/replug.
Call me confused at best.

Guidance needed yet, obviously. I've had several birthdays since we last
conversed, so I am now 80yo, and definitely seeing the effects of poorer
short term memory. Darnit...


Thanks Charles

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
US V Castleman, SCOTUS, Mar 2014 is grounds for Impeaching SCOTUS
Charles Lepple
2014-10-15 00:23:46 UTC
Permalink
Post by Gene Heskett
On Tuesday 14 October 2014 08:19:02 Charles Lepple did opine
Post by Charles Lepple
usbhid-ups
I apologize, I should have just mentioned the whole ups.conf:

[myups]
driver = usbhid-ups
port = auto

The usbhid-ups driver (as with the others based on libusb) don't actually use the "port =" line, but the NUT internals still need a placeholder.

There is a whole complicated set of filters that let you match on the USB Vendor or ProductID, but if you only have one UPS plugged in at a time, you can ignore them. They default to matching anything that "looks like an UPS".
Post by Gene Heskett
I haven't checked cabling, but AFAIK its still plugged in, but not sure if
its usb or serial cabling. I'll check that once I get both eyes open
simultaneously and report back.
Found the cable, a D type usb, unplugged it and replugged it, and it
appears now to be /dev/usb/hiddev3. dmesg, ever so helpful, and lsusb
equally helpful, do not tell what the /dev/usbdevice is assigned to the
[136319.530160] usb 1-10: USB disconnect, device number 2
[136322.641716] usb 1-10: new low-speed USB device number 3 using ohci-pci
I think we take the first digit after " usb " (1) and the "device number 3", pad them with zeroes, and check here:

ls -l /dev/bus/usb/001/003

(Note that the NUT driver doesn't care about this path directly, but we still need to check permissions.)
Post by Gene Heskett
[136322.929480] usb 1-10: New USB device found, idVendor=050d,
idProduct=0751
[136322.929486] usb 1-10: New USB device strings: Mfr=4, Product=20,
SerialNumber=0
[136322.929489] usb 1-10: Product: Belkin UPS
[136322.929491] usb 1-10: Manufacturer: Belkin
[136323.695058] hid-generic 0003:050D:0751.0008: hiddev0,hidraw6: USB HID
v1.11 Device [Belkin Belkin UPS] on usb-0000:00:02.0-10/input0
So is this usb-0000:00:02.0-10/input0 a valid way to give nut a path to
it, and if so, what file do I add that too?
Nope, see previous comments about "port = auto"
Post by Gene Heskett
I also note that in the original bootup discovery it was hiddev0/hidraw6,
the same as the latest plug in report, so that also appears stable.
Actually, if things work right, the hiddev*/hidraw* devices should disappear when usbhid-ups starts, leaving only the /dev/bus/usb/*/* device.
--
Charles Lepple
clepple at gmail
Loading...