USB HID driver?

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Author Message
lutorm
DD-WRT Novice


Joined: 25 May 2008
Posts: 10

PostPosted: Sat Jun 07, 2008 20:42    Post subject: USB HID driver? Reply with quote
Hi all,

I have a Linksys WRT350N running dd-wrt mega 2.4, hooked up to a 1TB usb drive that contains optware and a network backup drive. The equipment is plugged into an APC UPS, and I was hoping to get apcupsd working so that the router will shut itself down (ie mostly unmount the drives) when the ups battery is running low.

I plugged the ups usb cable into the usb hub, and it is recognized. I installed the apcupsd optware package. However, there are no usb hid or hiddev drivers loaded, and they are not in /lib/modules, so it doesn't work. Do I have to recompile the firmware to get these, or are they available in some package?

Btw, it's impossible to fsck a 1TB ext2 file system on this router, e2fsck just uses so much memory that everything grinds to a halt, swapping like crazy, and eventually locking the device up. Make sure you are running ext3 if you do this. (It also makes me more motivated to get proper shutdown working, since if something were to really get screwed up, I have to plug the drive into a linux machine to fsck the fs...)

Thanks,

/Patrik
Sponsor
CaScAdE
DD-WRT Guru


Joined: 18 Jun 2006
Posts: 1110
Location: Kiel (54.4247,10.1721)

PostPosted: Sun Jun 08, 2008 0:01    Post subject: Reply with quote
Quote:
usb.c: registered new driver hiddev
usb.c: registered new driver hid
hid-core.c: v1.8.1 Andreas Gal, Vojtech Pavlik <vojtech@suse.cz>
hid-core.c: USB HID support drivers
hub.c: new USB device 00:02.0-1, assigned address 2
hiddev0: USB HID v10.01 Mouse [Razer Razer Copperhead Laser Mouse] on usb1:2.0
hiddev1: USB HID v10.01 Keyboard [Razer Razer Copperhead Laser Mouse] on usb1:2.1


Only had a mouse for testing... but somehow works Smile
Enabled the hiddev support for you as i think you will need that one, right? Smile



hid-linux-2.4.35-mips.tar.gz
 Description:
USB Human Interface Device (full HID) support
--- Input core support is needed for USB HID input layer or HIDBP
[*] /dev/hiddev raw HID device support

Download
 Filename:  hid-linux-2.4.35-mips.tar.gz
 Filesize:  13.96 KB
 Downloaded:  1779 Time(s)


_________________
DD-WRT F.A.Q.

Webcam Kiel
lutorm
DD-WRT Novice


Joined: 25 May 2008
Posts: 10

PostPosted: Sun Jun 08, 2008 3:52    Post subject: Reply with quote
sweet, thanks dude! It seems works now, the UPS is now bound to the hid driver and shows up as /dev/usb/hid/hiddev0.

Now I just have to figure out how to tell apcupsd what to do when the power goes out, since you can't just switch to runlevel 6...
CaScAdE
DD-WRT Guru


Joined: 18 Jun 2006
Posts: 1110
Location: Kiel (54.4247,10.1721)

PostPosted: Sun Jun 08, 2008 9:48    Post subject: Reply with quote
Write yourself a shellscript and let the daemon execute it?

Something that kills all optware processes and afterwards unmounts the devices... shouldn't be that hard to do...

But glad the stuff works for you Smile
So could you edit the topic so it has an [SOLVED] or something like it in the front? Would be cool...

_________________
DD-WRT F.A.Q.

Webcam Kiel
reflex
DD-WRT Novice


Joined: 07 Jun 2007
Posts: 20

PostPosted: Thu Nov 27, 2008 22:37    Post subject: Reply with quote
Hey,

I'm also interested in hooking up this APC UPS I got via USB. Can you please give me more details on how you got that working?

And the file provided above, where do I put it - how do I use it?


Thank you,
David
trilith
DD-WRT Novice


Joined: 10 Oct 2008
Posts: 20

PostPosted: Thu Dec 18, 2008 23:00    Post subject: Reply with quote
sorry to bump the old thread.

When I tried to copy the hid.o to /lib/modules/2.4.36

I got :

cp: cannot create 'hid.o': Read-only file system

and I login as "root" Sad

anyidea ? thanks,
reflex
DD-WRT Novice


Joined: 07 Jun 2007
Posts: 20

PostPosted: Fri Dec 19, 2008 14:41    Post subject: Reply with quote
Just copy it to /tmp/hid.o and type insmod /tmp/hid.o

You should be fine.. but make sure you are using the mega version and have enabled USB support in the web UI.

For the record I got this to work, had to install a USB and then optware (thanks to dd-wrt wiki on optware).

David
trilith
DD-WRT Novice


Joined: 10 Oct 2008
Posts: 20

PostPosted: Fri Dec 19, 2008 18:39    Post subject: Reply with quote
reflex wrote:
Just copy it to /tmp/hid.o and type insmod /tmp/hid.o

You should be fine.. but make sure you are using the mega version and have enabled USB support in the web UI.

For the record I got this to work, had to install a USB and then optware (thanks to dd-wrt wiki on optware).

David


Thanks David for the reply -- I put it under samba and it works !
trilith
DD-WRT Novice


Joined: 10 Oct 2008
Posts: 20

PostPosted: Sun Dec 21, 2008 0:26    Post subject: Reply with quote
hmm, the default optware installation doesn't come with "-cgi" switch. There is no *.cgi files being installed under /opt/etc/apcupsd/. anyone got it working ?

I am referring to :

http://www.apcupsd.org/manual/Monitoring_Tuning_your_UPS.html#SECTION000164000000000000000
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum