On 5/31/2006 5:43 AM, Stuart Henderson wrote:
On 2006/05/31 08:52, [EMAIL PROTECTED] wrote:
As far as I understand I need either the hidups or the newhidups
driver of nut in order to use the APC Back-UPS XS 1500 (aka BX1500)
with a USB interface cable. [...] Are the hidups and newhidups
only available under Linux?
Not tested, but NUT is probably looking for /usr/local/include/usb.h
from the libusb port/package, not the system /usr/include/dev/usb/usb.h
Programs using libusb should be reasonably portable between OS.
Thanks Stuart. You are right, the libusb-0.1.10ap1 package contains the
needed /usr/local/include/usb.h file. I got it all compiled now but I'm
already stuck again.
The newhidups driver doesn't detect the UPS. I read somewhere [1] that
the uhid device needed to be disabled in order to get the driver to run
in FreeBSD. Apcupsd specifically requires that from OpenBSD [2]. Does
that really mean that a custom build of OpenBSD is required?
Claus
[1]
http://www.mail-archive.com/nut-upsuser@lists.alioth.debian.org/msg00558.html
http://wiki.botka.homeunix.org/bin/view/Main/NetworkUpsToolsUsb
[2]
http://www.apcupsd.org/manual/USB_Configuration.html
Enclosures:
- newhidups debug output
- usbdevs info
- dmesg
- What I did to get nut with newhidups to compile
== newhidups debug output ==
# USB_DEBUG=2 newhidups -u root -DD auto
Network UPS Tools: New USB/HID UPS driver 0.28 (2.0.3)
debug level is '2'
usb_set_debug: Setting debugging level to 2 (on)
usb_os_find_busses: Found /dev/usb0
usb_os_find_busses: Found /dev/usb1
No appropriate HID device found
No matching USB/HID UPS found
== usbdevs info ==
# usbdevs -dv
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000),
VIA(0x1106), rev 1.00
uhub0
port 1 powered
port 2 addr 2: low speed, self powered, config 1, Back-UPS RS 1500
FW:8.g2 .D USB FW:g2(0x0002), American Power Conversion(0x051d), rev 1.06
uhidev0
Controller /dev/usb1:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000),
VIA(0x1106), rev 1.00
uhub1
port 1 powered
port 2 powered
== dmesg ==
OpenBSD 3.9 (GENERIC) #617: Thu Mar 2 02:26:48 MST 2006
[EMAIL PROTECTED]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: AMD Athlon(tm) processor ("AuthenticAMD" 686-class, 256KB L2
cache) 1.40 GHz
cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR
real mem = 536387584 (523816K)
avail mem = 482426880 (471120K)
using 4278 buffers containing 26923008 bytes (26292K) of memory
mainbus0 (root)
bios0 at mainbus0: AT/286+(f1) BIOS, date 07/11/02, BIOS32 rev. 0 @ 0xfb4b0
apm0 at bios0: Power Management spec V1.2
apm0: AC on, battery charge unknown
apm0: flags 70102 dobusy 1 doidle 1
pcibios0 at bios0: rev 2.1 @ 0xf0000/0xdf94
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdee0/176 (9 entries)
pcibios0: PCI Exclusive IRQs: 5 10 11 12
pcibios0: PCI Interrupt Router at 000:07:0 ("VIA VT82C596A ISA" rev 0x00)
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc0000/0xb000
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 "VIA VT8363 Host" rev 0x03
ppb0 at pci0 dev 1 function 0 "VIA VT8363 AGP" rev 0x00
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "ATI AIW Radeon" rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
pcib0 at pci0 dev 7 function 0 "VIA VT82C686 ISA" rev 0x40
pciide0 at pci0 dev 7 function 1 "VIA VT82C571 IDE" rev 0x06: ATA100,
channel 0 configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: <ST360021A>
wd0: 16-sector PIO, LBA, 57241MB, 117231408 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: <MITSUMI, CR-48XCTE, 1.0D> SCSI0 5/cdrom
removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
uhci0 at pci0 dev 7 function 2 "VIA VT83C572 USB" rev 0x16: irq 12
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: VIA UHCI root hub, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1 at pci0 dev 7 function 3 "VIA VT83C572 USB" rev 0x16: irq 12
usb1 at uhci1: USB revision 1.0
uhub1 at usb1
uhub1: VIA UHCI root hub, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
viaenv0 at pci0 dev 7 function 4 "VIA VT82C686 SMBus" rev 0x40
emu0 at pci0 dev 9 function 0 "Creative Labs SoundBlaster Live" rev
0x07: irq 5
ac97: codec id 0x83847608 (SigmaTel STAC9708/11)
ac97: codec features 18 bit DAC, 18 bit ADC, SigmaTel 3D
audio0 at emu0
"Creative Labs PCI Gameport Joystick" rev 0x07 at pci0 dev 9 function 1
not configured
bktr0 at pci0 dev 11 function 0 "Brooktree BT848" rev 0x11: irq 12
bktr0: Intel Smart Video III/VideoLogic Captivator PCI, <no> tuner.
sis0 at pci0 dev 13 function 0 "NS DP83815 10/100" rev 0x00, DP83816A:
irq 11, address 00:09:5b:bc:78:39
nsphyter0 at sis0 phy 0: DP83815 10/100 PHY, rev. 1
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: <PC speaker>
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
biomask f745 netmask ff45 ttymask ffc7
pctr: user-level cycle counter enabled
mtrr: Pentium Pro MTRR support
uhidev0 at uhub0 port 2 configuration 1 interface 0
uhidev0: American Power Conversion Back-UPS RS 1500 FW:8.g2 .D USB
FW:g2, rev 1.10/1.06, addr 2, iclass 3/0
uhidev0: 123 report ids
uhid0 at uhidev0 reportid 1: input=0, output=0, feature=1
uhid1 at uhidev0 reportid 2: input=0, output=0, feature=1
uhid2 at uhidev0 reportid 3: input=0, output=0, feature=1
uhid3 at uhidev0 reportid 4: input=0, output=0, feature=1
uhid4 at uhidev0 reportid 5: input=0, output=0, feature=1
uhid5 at uhidev0 reportid 6: input=3, output=0, feature=3
uhid6 at uhidev0 reportid 7: input=0, output=0, feature=2
uhid7 at uhidev0 reportid 8: input=0, output=0, feature=2
uhid8 at uhidev0 reportid 9: input=0, output=0, feature=2
uhid9 at uhidev0 reportid 10: input=0, output=0, feature=1
uhid10 at uhidev0 reportid 11: input=0, output=0, feature=1
uhid11 at uhidev0 reportid 12: input=3, output=0, feature=3
uhid12 at uhidev0 reportid 13: input=0, output=0, feature=1
uhid13 at uhidev0 reportid 14: input=0, output=0, feature=1
uhid14 at uhidev0 reportid 15: input=0, output=0, feature=1
uhid15 at uhidev0 reportid 16: input=0, output=0, feature=1
uhid16 at uhidev0 reportid 17: input=0, output=0, feature=1
uhid17 at uhidev0 reportid 18: input=0, output=0, feature=1
uhid18 at uhidev0 reportid 19: input=1, output=0, feature=1
uhid19 at uhidev0 reportid 20: input=2, output=0, feature=2
uhid20 at uhidev0 reportid 21: input=0, output=0, feature=2
uhid21 at uhidev0 reportid 22: input=4, output=0, feature=4
uhid22 at uhidev0 reportid 23: input=0, output=0, feature=2
uhid23 at uhidev0 reportid 24: input=0, output=0, feature=1
uhid24 at uhidev0 reportid 28: input=0, output=0, feature=3
uhid25 at uhidev0 reportid 32: input=0, output=0, feature=2
uhid26 at uhidev0 reportid 33: input=1, output=0, feature=1
uhid27 at uhidev0 reportid 34: input=0, output=0, feature=1
uhid28 at uhidev0 reportid 35: input=0, output=0, feature=2
uhid29 at uhidev0 reportid 36: input=0, output=0, feature=2
uhid30 at uhidev0 reportid 37: input=0, output=0, feature=2
uhid31 at uhidev0 reportid 38: input=0, output=0, feature=2
uhid32 at uhidev0 reportid 39: input=0, output=0, feature=1
uhid33 at uhidev0 reportid 40: input=0, output=0, feature=4
uhid34 at uhidev0 reportid 48: input=0, output=0, feature=1
uhid35 at uhidev0 reportid 49: input=0, output=0, feature=2
uhid36 at uhidev0 reportid 50: input=0, output=0, feature=2
uhid37 at uhidev0 reportid 51: input=0, output=0, feature=2
uhid38 at uhidev0 reportid 52: input=0, output=0, feature=1
uhid39 at uhidev0 reportid 53: input=0, output=0, feature=1
uhid40 at uhidev0 reportid 54: input=0, output=0, feature=1
uhid41 at uhidev0 reportid 64: input=0, output=0, feature=1
uhid42 at uhidev0 reportid 65: input=0, output=0, feature=2
uhid43 at uhidev0 reportid 66: input=0, output=0, feature=2
uhid44 at uhidev0 reportid 80: input=0, output=0, feature=1
uhid45 at uhidev0 reportid 81: input=0, output=0, feature=1
uhid46 at uhidev0 reportid 82: input=0, output=0, feature=2
uhid47 at uhidev0 reportid 96: input=0, output=0, feature=2
uhid48 at uhidev0 reportid 97: input=0, output=0, feature=1
uhid49 at uhidev0 reportid 98: input=0, output=0, feature=4
uhid50 at uhidev0 reportid 116: input=0, output=0, feature=4
uhid51 at uhidev0 reportid 117: input=0, output=0, feature=2
uhid52 at uhidev0 reportid 120: input=0, output=0, feature=1
uhid53 at uhidev0 reportid 121: input=0, output=0, feature=1
uhid54 at uhidev0 reportid 122: input=0, output=0, feature=4
uhid55 at uhidev0 reportid 123: input=0, output=0, feature=2
dkcsum: wd0 matches BIOS drive 0x80
root on wd0a
rootdev=0x0 rrootdev=0x300 rawdev=0x302
== What I did to get nut with newhidups to compile ==
- installed libusb-0.1.10ap1 package
- Upgraded /usr/ports/sysutils/nut to current in order to get version 2.0.3
- issued "make" command which will fail to compile
- changed includes "usb.h" to "/usr/local/include/usb.h" in
w-nut-2.0.3/nut-2.0.3/drivers/libhid.h and
w-nut-2.0.3/nut-2.0.3/drivers/libusb.h
- issued "make" in w-nut-2.0.3/nut-2.0.3/drivers/ (not sure if that made
a difference)
- issued "make" followed by "make install" in /usr/ports/sysutils/nut.
"make install" will fail since not everything was build.
- copied /usr/local/bin/newhidups and /usr/local/man/man8/newhidups.8
out of the /usr/ports/sysutils/nut/fake-i386 directory.
- created a clean current /usr/ports/sysutils/nut port (basically the
same thing we had after step 2
- issued "make" followed by "make install" which will install nut-2.0.3
without the newhidups driver.