Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

USB, genkernel, & apcupsd [SOLVED]

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
10 posts • Page 1 of 1
Author
Message
Garth
n00b
n00b
User avatar
Posts: 35
Joined: Wed Jan 21, 2004 8:12 pm
Location: Michigan

USB, genkernel, & apcupsd [SOLVED]

  • Quote

Post by Garth » Fri Jan 23, 2004 7:12 pm

New Gentoo user (and LOVE it)

I used genkernel 1.8 to compile my 2.4.22-gentoo-r2 kernel. Have emerged hotplug.

I just bought an APC UPS with USB connectivity. I plugged it in and I have no entries in /dev/usb. I want to get 'apcupsd' to work with it. It wants to find the UPS at /dev/usb/hid/hiddev0

How can I tell if USB is working? What can I do to get it to work?

Thanks.
Last edited by Garth on Mon Jan 26, 2004 10:21 pm, edited 3 times in total.
Garth
Top
Vanquirius
Retired Dev
Retired Dev
User avatar
Posts: 1297
Joined: Fri Jun 14, 2002 9:07 pm
Location: Ethereal plains
Contact:
Contact Vanquirius
Website

  • Quote

Post by Vanquirius » Fri Jan 23, 2004 7:32 pm

According to this thread, there is some problem with gentoo-sources and APC UPS. I don't have one myself, so I can't make my word good for it.

Good ways to check if you hardware was detected are using the commands dmesg and lsmod, as root.
Hello.
Top
Garth
n00b
n00b
User avatar
Posts: 35
Joined: Wed Jan 21, 2004 8:12 pm
Location: Michigan

  • Quote

Post by Garth » Fri Jan 23, 2004 7:43 pm

this is snip from dmesg output. I had plugged it and replugged it, then stopped and started hotplug. All looks good to me. Where is it?

Code: Select all

hub.c: new USB device 00:07.2-1, assigned address 2
: USB HID v1.10 Device [American Power Conversion Back-UPS BR  800 FW:9.o2 .D USB FW:o2 ] on usb1:2.0
usb.c: USB disconnect on device 00:07.2-1 address 2
uhci.c: 1080: host controller halted. very bad
hub.c: new USB device 00:07.2-1, assigned address 3
: USB HID v1.10 Device [American Power Conversion Back-UPS BR  800 FW:9.o2 .D USB FW:o2 ] on usb1:3.0
usb.c: USB disconnect on device 00:07.2-1 address 3
hub.c: new USB device 00:07.2-1, assigned address 4
: USB HID v1.10 Device [American Power Conversion Back-UPS BR  800 FW:9.o2 .D USB FW:o2 ] on usb1:4.0
usb.c: USB disconnect on device 00:07.2-0 address 1
usb.c: USB disconnect on device 00:07.2-1 address 4
usb.c: USB bus 1 deregistered
usb.c: deregistering driver hid
usb.c: deregistering driver usb-storage
usb.c: deregistering driver usbdevfs
usb.c: deregistering driver hub
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
uhci.c: USB Universal Host Controller Interface driver v1.1
PCI: Found IRQ 11 for device 00:07.2
uhci.c: USB UHCI at I/O 0x1080, IRQ 11
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
hub.c: new USB device 00:07.2-1, assigned address 2
usb.c: USB device 2 (vend/prod 0x51d/0x2) is not claimed by any active driver.
usb.c: registered new driver hid
: USB HID v1.10 Device [American Power Conversion Back-UPS BR  800 FW:9.o2 .D USB FW:o2 ] on usb1:2.0
hid-core.c: v1.8.1 Andreas Gal, Vojtech Pavlik <vojtech@suse.cz>
hid-core.c: USB HID support drivers
Garth
Top
Garth
n00b
n00b
User avatar
Posts: 35
Joined: Wed Jan 21, 2004 8:12 pm
Location: Michigan

  • Quote

Post by Garth » Sat Jan 24, 2004 3:21 am

ran the following script to forceibly create the inodes:

Code: Select all

#!/bin/sh 
mkdir -p /dev/usb/hid 
mknod /dev/usb/hid/hiddev0 c 180 96 
mknod /dev/usb/hid/hiddev1 c 180 97 
mknod /dev/usb/hid/hiddev2 c 180 98 
mknod /dev/usb/hid/hiddev3 c 180 99 
mknod /dev/usb/hid/hiddev4 c 180 100 
mknod /dev/usb/hid/hiddev5 c 180 101 
mknod /dev/usb/hid/hiddev6 c 180 102 
mknod /dev/usb/hid/hiddev7 c 180 103 
mknod /dev/usb/hid/hiddev8 c 180 104 
mknod /dev/usb/hid/hiddev9 c 180 105 
mknod /dev/usb/hid/hiddev10 c 180 106 
mknod /dev/usb/hid/hiddev11 c 180 107 
mknod /dev/usb/hid/hiddev12 c 180 108 
mknod /dev/usb/hid/hiddev13 c 180 109 
mknod /dev/usb/hid/hiddev14 c 180 110 
mknod /dev/usb/hid/hiddev15 c 180 111
No luck. apcupsd will not recognize the APC USB device. I also find that /proc/bus/usb has no device listing.

I guess my next steps are:
1. find my kernel config file (is there one with genkernel?)
2. check to see if all the USB options are added
3. recompile kernel (use genkernel again?)
4. reboot

But this is not supposed to work this way. I thought genkernel was suppose to include the HID USB support.

Any help would be greatly appreciated. :-)

PS. I don't think it's a gentoo-sources kernel issue either. If anyone has further evidence contrary-wise, then please bring it.
Garth
Top
Garth
n00b
n00b
User avatar
Posts: 35
Joined: Wed Jan 21, 2004 8:12 pm
Location: Michigan

  • Quote

Post by Garth » Sat Jan 24, 2004 7:35 pm

Well, I checked the config, it seems genkernel loads the right support. Rebooted. I now have this:

Code: Select all

 # ll /dev/usb/hid
total 0

 # cat /proc/bus/usb/devices
:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI-alt Root Hub
S:  SerialNumber=1080
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=051d ProdID=0002 Rev= 1.06
S:  Manufacturer=American Power Conversion
S:  Product=Back-UPS BR  800 FW:9.o2 .D USB FW:o2
S:  SerialNumber=QB0344130879
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 24mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=hid
E:  Ad=81(I) Atr=03(Int.) MxPS=   6 Ivl=10ms

 # cat /proc/bus/usb/drivers
         usbdevfs
         hub
         hid
         usb-storage
during boot, apcupsd fails to connect to UPS. I try to start it manually from init.d I get "* WARNING: "apcupsd" has already been started." But it does not show up on a ps -A or in TOP.

Can anyone help me here? I'm dying!
Garth
Top
Drunkula
Apprentice
Apprentice
User avatar
Posts: 257
Joined: Mon Jul 28, 2003 7:20 pm
Location: Denton, TX - USA

  • Quote

Post by Drunkula » Sat Jan 24, 2004 8:09 pm

I've got the same problem. However.... I noticed that if I run /usr/sbin/apcupsd(not the init.d script) it starts fine. I can even run powerflute after that and it sees the UPS.
Top
Garth
n00b
n00b
User avatar
Posts: 35
Joined: Wed Jan 21, 2004 8:12 pm
Location: Michigan

  • Quote

Post by Garth » Mon Jan 26, 2004 12:26 pm

Drunkula- trying the "/usr/sbin/apcupsd" from the command line, I get the message: "apcupsd FATAL ERROR in linux-usb.c at line 678 Cannot open UPS device:"

For anyone who cares: this is my apcupsd.conf file listing (with all but the header comment lines removed)

Code: Select all

## apcupsd.conf v1.1 ##
#
#  for apcupsd release 3.10.8 (28 December 2003) - gentoo
#
# "apcupsd" POSIX config file
#
UPSCABLE usb
UPSTYPE usb
DEVICE /dev/usb/hid/hiddev[0-9]
LOCKFILE /var/lock
ONBATTERYDELAY 6
BATTERYLEVEL 5
MINUTES 3
TIMEOUT 0
ANNOY 300
ANNOYDELAY 60
NOLOGON disable
KILLDELAY 0
NETSERVER on
NISIP 0.0.0.0
NISPORT 3551
EVENTSFILE /var/log/apcupsd.events
EVENTSFILEMAX 10
UPSMODE disable
LOGSTATS off
DATATIME 0
FACILITY DAEMON
Anyone have a clue?
BTW, I've tried the line DEVICE /dev/usb/hid/hiddev[0-9] as /dev/usb/hid/hiddev[0-15] with no luck either.
Garth
Top
Garth
n00b
n00b
User avatar
Posts: 35
Joined: Wed Jan 21, 2004 8:12 pm
Location: Michigan

  • Quote

Post by Garth » Mon Jan 26, 2004 10:20 pm

SOLVED

Genkernel ( 1.8 ) does NOT enable the HIDDEV driver by default. This is REQUIRED for the APCUPSD daemon.
Must be set manually with genkernel --config. (or genkernel --menuconfig in 3.0.1)

This is strange to me since Genkernel is supposed to be so all-inclusive.

if cat /proc/bus/usb/drivers shows no hiddev, then you need to get it.
Garth
Top
kdvgent
Guru
Guru
Posts: 352
Joined: Wed Sep 29, 2004 6:16 pm
Location: Belgium

/proc/bus/usb/drivers file does not exist on my computer

  • Quote

Post by kdvgent » Mon Oct 25, 2004 6:31 pm

I have also problems getting a USB UPS working.

I have the HID and HIDDEV support enabled in the kernel (2.6.9-gentoo-r1).

In this series of messages, the file /proc/bus/usb/drivers is mentioned. I do not find such file on my system.

Any clue
Top
whiskeypriest
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 91
Joined: Thu Feb 05, 2004 6:18 pm

  • Quote

Post by whiskeypriest » Mon Oct 25, 2004 10:27 pm

If you're using an APC UPS unit, you might want to have a look at the HOWTO I wrote on the subject...and if you're not using an APC product, you may find something useful anyway (check the KERNEL CONFIGURATION section).

The first thing that springs to mind from your post is checking to make sure you've built the USB device filesystem into your kernel. I had an initial installation of apcupsd go wonky on me after having compiled a kernel without this feature.

I can't tell from your post if you're using genkernel or not, but I'm afraid I can't be of much assistance if you are...I started compiling my own manually about two weeks after I found Gentoo, and have been a much happier man for it.
Top
Post Reply

10 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic