*** 今日折腾这个小路由器,前几天给它刷了openwrt的固件,做打印服务器挺好,小小的,可以粘在打印机后面(不过技术有限,不会从打印机取5V供电,不然就不用带个小尾巴了)***
打印机是HP的P1008,主机型,需要给打印机固件里传固件。固件放在“/usr/lib/sihpP1008.dl”。
更改启动目录,添加一行命令,放在/etc/hotplug.d/usb/下面,命名“10-hplj1008”。
(固件下载网址http://oleg.wl500g.info/hplj/)
下面是文件内容:
#!/bin/sh
set -e
#change this to the location where you put the .dl file:
FIRMWARE=/usr/lib/sihpP1008.dl
DEVICE=/dev/lp0
LOGFILE=/tmp/hp-fm
if [ "$PRODUCT" = "3f0/4917/100" -a "$ACTION" = "add" -a "$DEVTYPE" = "usb_interface" ]; then
echo "$(date): STARTING" > $LOGFILE
for i in $(seq 30); do
echo "$(date): Attempt number $i on $DEVICE" » $LOGFILE
if [ -c $DEVICE ]; then
echo "$(date): Device $DEVICE found." » $LOGFILE
if [ -z "`usb_printerid $DEVICE | grep FWVER`" ]; then
echo "$(date): No firmware found on $DEVICE" » $LOGFILE
echo "$(date): Sending firmware to printer…" » $LOGFILE
cat $FIRMWARE > $DEVICE
echo "$(date): done." » $LOGFILE
else
echo "$(date): Firmware already there on $DEVICE" » $LOGFILE
fi
echo "$(date): EXITING" » $LOGFILE
exit
fi
sleep 1
done
fi
打不开13信道,是因为固件的限制,需要打补丁,这里有些曲折,网上下载的版本都不行。今天终于找到了。下载地址 https://euer.krebsco.de/extra/reghack/reghack.mips.elf。注意直接搜到的那个Github上的版本是不能用的。(也可能只是我刷的版本上不能用)。
下面就简单了,ssh登录路由器,我用的winscp,拖文件到路由的tmp目录,然后用winscp的命令行执行:
cd /tmp/
wget http://luci.subsignal.org/~jow/reghack/reghack.mips.elf #(这一步不需要了)
chmod +x reghack.mips.elf
./reghack.mips.elf /lib/modules/*/ath.ko
./reghack.mips.elf /lib/modules/*/cfg80211.ko
reboot
需要这个固件可以联系我