Joined: 18 Jul 2015
|Posted: Mon Sep 23, 2019 20:40 Post subject: USB HID driver for Broadcom K3.X
I'm trying to get APCUPSd to work on a router to share its battery state with all other devices on the network. I already have Entware and the daemon installed and configured just right, however, I cannot find a driver anywhere that will allow communication. I have tried HID related packages from Entware (hidapi and libhid), downloads directly from old forum posts here, and even many kmod packages from different releases of OpenWRT, both for their kernel 3.3.8 and kernel 3.10.49, both from generic and mips74k divisions of the brcm47 branch.
router running DD-WRT v3.0-r40559 giga:
|# uname -a
Linux WNR3500Lv2 3.10.108-d8 #25727 Tue Aug 6 11:02:24 +04 2019 mips DD-WRT
(BTW, why doesn't it say 'mipsel' if it really is...)
UPS is detected, but no driver:
|# cat /proc/bus/usb/devices
T: Bus=01 Lev=02 Prnt=02 Port=03 Cnt=03 Dev#= 6 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=051d ProdID=0002 Rev= 0.90
S: Manufacturer=American Power Conversion
S: Product=Back-UPS ES 850M2 FW:931.a7 .D USB
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 2mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=(none)
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=100ms
every driver I tried results in either:
|# insmod -f hid.o
insmod: cannot insert 'hid.o': invalid module format
(I understand kernels past 2.6 need ".ko" objects)
|# insmod -f usbhid.ko
insmod: cannot insert 'usbhid.ko': unknown symbol in module
and I have tried 'hid.ko' objects too...
I'm at a loss, it seems it just isn't available yet
If I have to compile it myself, I will, but I have no idea where to start...
Should I start with the dd-wrt source?
thanks for reading
You don't have to be a professional, just keep reading...
Joined: 04 Mar 2016
|Posted: Tue Oct 01, 2019 19:19 Post subject:
|I have a TP Link Archer C9 which I wanted to do this very same thing on. Unfortiuantely, to do that, I had to get a whole DD-WRT build environment going in a VM, and then slog through enough of the build to build those modules.
OTOH, once I got the hang of it, getting updated modules to go with new builds has been fairly easy (even if new revs often introduce new build issues, building the 3 necessary modules has been easy enough if you ignore the rest).