Loading printer's firmware in a 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.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License