|
楼主 |
发表于 2016-9-9 21:09
|
显示全部楼层
参考教程:http://tomatousb.org/tut:loading ... ware-hotplug-script
Some printers (based on ZjStream or XQX stream protocol) - mostly manufactured by HP, i.e. HP LaserJet 1018/1020/1022/P2035/P1005/P1006/P1007/P1008/P1505/P1505n/P2014/P2014n, HP LaserJet Pro P1102/P1102w/P1566/P1606dn and some others - require a firmware to be loaded on the power up. You can configure the Tomato router to automatically upload firmware to the printer using Hotplug script.
Download the firmware for your printer from here, or go to http://foo2zjs.rkkda.com/ or http://foo2xqx.rkkda.com/, and follow instructions to build the firmware yourself.
Store the firmware file on JFFS partition on your router, or on the attached USB drive. Then configure the router to automatically upload firmware to the printer using Hotplug script.
First of all you will have to grab your printer's Product ID. Go to 'USB and NAS'->'USB Support' and paste this script in the 'Hotplug script' section:
echo $(date)" Action: "$ACTION" Product: "$PRODUCT" Interface: "$INTERFACE >> /var/log/hotplug
Press 'Save' and plug your printer into the USB port.
Log in to your router's console and display hotplug log:
cat /var/log/hotplug
Now you will have to change previous script to:
if [ $PRODUCT = "previously_grabbed_product_id" ]; then
if [ $ACTION = "add" ]; then
sleep 1
cat path_to_your_printers_firmware > /dev/usb/lp0
fi
fi
Remember to update product id and path to your printer's firmware.
当中提到将固件保存在jffs中,就是不知如何操作 |
|