What's new

apcupsd

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

cerebron

New Around Here
Hello. First of all, want to thank you for excellent work RMerlin. Previously I've used dd-wrt on all my routers, and on lynksys wrt610n v1 at home specifically. But I've upgraded to ac66u near one month ago and they still don't have working build for it. Tried your firmware and i like it very much. :)
One thing i miss since dd-wrt is ability to use apcupsd with usb-connected ups-es. I had it connected through usb hub to my router. router acted as a apcupsd network server and i was able to monitor my smart ups from my main windows server and my synology nas. Unfortunately i cant do it now. If i understand it right, there is no usbhid drivers in this firmware. And i cant find them myself for it. I'm not so familiar with nix systems.
So my question is: is it possible to add this drivers in the future versions, or how can i install them myself?
Thanks, and sorry for my bad english. :rolleyes:
 
Did you try installing apcupsd through Optware? Not sure if it provides everything required, but give it a shot first.

If USB drivers are still missing, they would have to be compiled from the GPL tree- assuming they are part of the old kernel used by Asuswrt.
 
Did you try installing apcupsd through Optware? Not sure if it provides everything required, but give it a shot first.

If USB drivers are still missing, they would have to be compiled from the GPL tree- assuming they are part of the old kernel used by Asuswrt.

I have installed optware, but unfortunately still got this:

Cerebron@(none):/tmp/home/root# lsusb
Bus 001 Device 005: ID 13fe:4100
Bus 001 Device 003: ID 051d:0002
Bus 001 Device 002: ID 058f:6254
Bus 002 Device 001: ID 1d6b:0001
Bus 001 Device 001: ID 1d6b:0002


Cerebron@(none):/tmp/home/root# cat /proc/bus/usb/devices

T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 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= 0.06
S: Manufacturer=American Power Conversion
S: Product=Smart-UPS 1500 FW:601.3.I USB FW:1.5
S: SerialNumber=AS0335131364
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 30mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=(none)
E: Ad=81(I) Atr=03(Int.) MxPS= 6 Ivl=100ms
 
The drivers will have to be compiled then. Not sure how big they would be, if they are small enough I'd be willing to include them in the firmware, otherwise you would have to compile them yourself, then copy them to the router, and manually load them with insmod.

I'll try to take a look at it, might be a while tho since I've been pretty busy lately.
 
The drivers will have to be compiled then. Not sure how big they would be, if they are small enough I'd be willing to include them in the firmware, otherwise you would have to compile them yourself, then copy them to the router, and manually load them with insmod.

I'll try to take a look at it, might be a while tho since I've been pretty busy lately.

Thank you.
 
Thank you so much! I've searched for them so long!
If only we can have them built in to firmware..
We can't include all available modules to firmware, a flash memory size is limited. But we may put it into a separate archive, like DD-WRT, wl500g, TomatoUSB do.

Merlin?
 
That's something I have been thinking about for quite some time. I already have the xfs kernel module for example gathering dust on my website.

It mostly amounts to having the time to compile, package and distribute additional modules - which I lack at the moment.

ryzhov_al, if you have such module packages you'd like to distribute just send them my way - I can host them on Mediafire alongside firmwares. The interesting ones I can think at the moment are more filesystems (xfs and reiserfs mostly), additional USB modules, soundcore/alsa (I had a request for these last year, can't remember exactlt why).
 
ryzhov_al, if you have such module packages you'd like to distribute just send them my way - I can host them on Mediafire alongside firmwares. The interesting ones I can think at the moment are more filesystems (xfs and reiserfs mostly), additional USB modules, soundcore/alsa (I had a request for these last year, can't remember exactlt why).
Ok, fast and dirty way: modules-mipsel.tgz (4,5MB)
Code:
$ cat ./modules.sh
#!/bin/sh

mkdir -p ./modules
# Gather all modules, unstripped first, to overwrite them later
find ./asuswrt-merlin/release/src-rt/linux/linux-2.6 -name *.ko -print0 | xargs -I{} -0 cp -vf {} ./modules/
find ./asuswrt-merlin/release/src/router/mipsel-uclibc/extras -name *.ko -print0 | xargs -I{} -0 cp -vf {} ./modules/

# Remove those are already in firmware
find ./asuswrt-merlin/release/src/router/mipsel-uclibc/target -name *.ko -print0 | xargs -I{} -0 basename {} > already_included.txt
for f in $(cat already_included.txt)
do
    rm -f ./modules/$f
done
rm ./already_included.txt

# Pack it! I assuming there was just one f\w target has been compiled
tar --remove-files -cvzf ./$(find ./asuswrt-merlin/release/src-rt/image/ -name *.trx | xargs -I{} -0 basename {}).modules.tgz ./modules/*.ko
rmdir ./modules/
Script packs all kernel modules, which is compiled, but absent in firmware image.

That's something I have been thinking about for quite some time. I already have the xfs kernel module for example gathering dust on my website.
Ah, the _only_ fs except ext4, which supports POSIX_FALLOCATE feature. Please, be careful with it, looks like it's quite unstable. Here is my tests on wl500g firmware. You may reproduce those bug by copying large file to XFS partititon and checking it after then:

Code:
$ dd if=/dev/zero of=/tmp/downloads/bigfile.tmp bs=1024k count=4096
4096+0 records in
4096+0 records out
4294967296 bytes (4.0GB) copied, 165.891152 seconds, 24.7MB/s
$ umount /tmp/downloads/
$ xfs_repair -v /dev/discs/disca/part2
Phase 1 - find and verify superblock...
        - block cache size set to 4480 entries
Phase 2 - using internal log
        - zero log...
zero_log: head block 1257 tail block 1129
ERROR: The filesystem has valuable metadata changes in a log which needs to
be replayed.  Mount the filesystem to replay the log, and unmount it before
re-running xfs_repair.  If you are unable to mount the filesystem, then use
the -L option to destroy the log and attempt a repair.
Note that destroying the log may cause corruption -- please attempt a mount
of the filesystem before doing this.
$ mount /tmp/downloads/
$ umount /tmp/downloads/
$ xfs_repair -v /dev/discs/disca/part2
Phase 1 - find and verify superblock...
        - block cache size set to 4480 entries
Phase 2 - using internal log
        - zero log...
zero_log: head block 1259 tail block 1193
ERROR: The filesystem has valuable metadata changes in a log which needs to
be replayed.  Mount the filesystem to replay the log, and unmount it before
re-running xfs_repair.  If you are unable to mount the filesystem, then use
the -L option to destroy the log and attempt a repair.
Note that destroying the log may cause corruption -- please attempt a mount
of the filesystem before doing this.
$ mount /tmp/downloads/
Segmentation fault
$ mount /tmp/downloads/
XFS module just hangs in kernel memory, only reboot helps.

PPS XFS utilities (xfs-{fsck,mkfs,growfs}) is in the Entware. Should I add the reiserfsprogs?
 
Last edited:

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top