NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
penguinny
Oct 26, 2009Aspirant
HP printers firmware uploader
Someone suggested to re-post this here as a request for community add-on.
Several inexpensive (=very common) laser printers from HP do not have firmware on board, these include HP LaserJet 1000, 1005, 1018, 1020, P1005, P1006, P1007, P1008 and P1505. These printers are correctly recognised by ReadyNAS software, so, in principle, it is possible to share on the Windows network a printer connected to a ReadyNAS unit. The Windows computer can use standard HP drivers and send the information in raw mode, so this is not an issue. However, nothing can be printed before firmware has been uploaded to the printer itself. This needs to be done every time the printer is switched on.
This situation can be demonstrated by a simple experiment:
(Step 1) A printer is connected to ReadyNas unit and switched on. My LaserJet 1020 printer is recognised at x.x.x.x:631/printers as HP_LaserJet_. The printer can be added as a network printer on my Windows computer, but sending documents to it results in nothing being printed out. The only indicator that printer jobs are being sent is the message at x.x.x.x:631/printers saying "Sending print file, 71356 bytes...", the file size changing depending on what particular job was sent to the printer.
(Step 2) The printer usb cable is disconnected from ReadyNas unit and connected to a Windows box with the appropriate drivers installed. The printer is successfully recognised by Windows. A test page can be successfully printed. The firmware was uploaded to the printer somewhere in the process of this operation.
(Step 3) The printer usb cable is disconnected from Windows computer and connected to a ReadyNAS unit. It is important to keep the printer switched on in the process of doing this. All of the earlier created network shares become alive. Windows computers can now successfully print documents on the printer connected to ReadyNAS for as long as printer stays switched on.
Obviously, this is not a reasonable solution for using these printers. Fortunately, there is a linux driver that is capable of automatically uploading the firmware to the printer: http://foo2zjs.rkkda.com/ . Hence, on the surface at least, it appears that a port of this driver to ReadyNAS unit would enable compatibility with several fairly common HP printers. Unfortunately, I know nothing about either linux or ReadyNAS programming. Would it be possible for anyone with these skills to assess the complexity of such a port? This could become a very useful plugin for many ReadyNAS users.
I had a look at foo2zjs distribution. As far as my limited understanding goes, bin/sh script "hplj1000" is responsible for firmware uploading (does "hotplug script" mean anything to you?). Of course, this also requires having ready all relevant printer firmware files. I cannot see anything else really necessary for the printers to be initialised in raw mode. I do not think the actual driver even needs compiling!
Several inexpensive (=very common) laser printers from HP do not have firmware on board, these include HP LaserJet 1000, 1005, 1018, 1020, P1005, P1006, P1007, P1008 and P1505. These printers are correctly recognised by ReadyNAS software, so, in principle, it is possible to share on the Windows network a printer connected to a ReadyNAS unit. The Windows computer can use standard HP drivers and send the information in raw mode, so this is not an issue. However, nothing can be printed before firmware has been uploaded to the printer itself. This needs to be done every time the printer is switched on.
This situation can be demonstrated by a simple experiment:
(Step 1) A printer is connected to ReadyNas unit and switched on. My LaserJet 1020 printer is recognised at x.x.x.x:631/printers as HP_LaserJet_. The printer can be added as a network printer on my Windows computer, but sending documents to it results in nothing being printed out. The only indicator that printer jobs are being sent is the message at x.x.x.x:631/printers saying "Sending print file, 71356 bytes...", the file size changing depending on what particular job was sent to the printer.
(Step 2) The printer usb cable is disconnected from ReadyNas unit and connected to a Windows box with the appropriate drivers installed. The printer is successfully recognised by Windows. A test page can be successfully printed. The firmware was uploaded to the printer somewhere in the process of this operation.
(Step 3) The printer usb cable is disconnected from Windows computer and connected to a ReadyNAS unit. It is important to keep the printer switched on in the process of doing this. All of the earlier created network shares become alive. Windows computers can now successfully print documents on the printer connected to ReadyNAS for as long as printer stays switched on.
Obviously, this is not a reasonable solution for using these printers. Fortunately, there is a linux driver that is capable of automatically uploading the firmware to the printer: http://foo2zjs.rkkda.com/ . Hence, on the surface at least, it appears that a port of this driver to ReadyNAS unit would enable compatibility with several fairly common HP printers. Unfortunately, I know nothing about either linux or ReadyNAS programming. Would it be possible for anyone with these skills to assess the complexity of such a port? This could become a very useful plugin for many ReadyNAS users.
I had a look at foo2zjs distribution. As far as my limited understanding goes, bin/sh script "hplj1000" is responsible for firmware uploading (does "hotplug script" mean anything to you?). Of course, this also requires having ready all relevant printer firmware files. I cannot see anything else really necessary for the printers to be initialised in raw mode. I do not think the actual driver even needs compiling!
35 Replies
Replies have been turned off for this discussion
- super_poussinVirtuosoit will require to install :
defoma gs gs-common gs-gpl gsfonts libgimpprint1 libice6 libnewt0.51
libpaper1 libsm6 libx11-6 libxext6 libxt6 slang1a-utf8 ucf whiptail
xfree86-common xlibs-data - penguinnyAspirantThis is not quite true. These dependencies are only needed if you are intending to rasterize your content directly using ReadyNAS (which is probably not a good idea anyway). You don't want to run GhostScript on ReadyNAS, it is slow enough on a proper PC. If you are planning to use ReadyNAS to send raw raster data to the printer (and rasterize from a full-sized PC with a Windows or Linux driver that is readily available), you only need to ensure that the appropriate firmware is loaded into the printer at the beginning.
The actual uploading of firmware, assuming it is in correct binary form, takes just one line of script:cat /usr/share/foo2zjs/firmware/sihp1020.dl > /dev/usb/lp0
(see "INSTALL" in foo2zjs). The rest of the work in bin\sh script "hplj1000" supplied as part of foo2zjs distribution is devoted to ensuring that correct firmware gets uploaded to correct printers and that only the relevant printers are affected. Hence, the lion share of work has already been done, one only needs to ensure that this script does not try to do anything ReadyNAS's shell cannot do and ensure that the paths structure is correct.
Once this is done, one needs to install this script as a "hotplug driver", which is done by the following section of the "makefile" (I omitted some unnecessary details):
USBDIR=/etc/hotplug/usb
UDEVDIR=/etc/udev/rules.d
RULES=hplj10xx.rules
install-hotplug-prog:
if [ -d $(UDEVDIR) ]; then \
$(INSTALL) -c -m 644 $(RULES) $(UDEVDIR)/11-$(RULES); \
fi
[ -d $(USBDIR) ] || $(INSTALL) -d -m 755 $(USBDIR)/
$(INSTALL) -c -m 755 hplj1000 $(USBDIR)/
ln -sf $(USBDIR)/hplj1000 $(USBDIR)/hplj1005
ln -sf $(USBDIR)/hplj1000 $(USBDIR)/hplj1018
ln -sf $(USBDIR)/hplj1000 $(USBDIR)/hplj1020
$(USBDIR)/hplj1000 install-usermap
$(USBDIR)/hplj1005 install-usermap
$(USBDIR)/hplj1018 install-usermap
$(USBDIR)/hplj1020 install-usermap
# modprobe usblp
$(USBDIR)/hplj1000 install-usblp
I do not understand the ways of linux, hence I find it difficult to comprehend exactly what is going on here. Apparently, some command lines involving the bin\sh script are somehow registered. File with "RULES" seems to contain various conditions for recognizing the printers. Whenever one calls hplj1000 with the "magic" parameter "install-usermap", one actually registers the driver in /etc/hotplug/usb.usermap
The only step which may involve compilation is conversion of firmware images into correct binary format. However, this only needs to be done once, can be done on a on a full-sized PC and, frankly, sounds like the least of our concerns. The rest is basically adaptation of an existing script to the somewhat special install of Linux. - super_poussinVirtuosoyou need to compile it on sparc so it will require all this dependencies
- smaskAspirant
super-poussin wrote: you need to compile it on sparc so it will require all this dependencies
I think you're quite wrong there, because I just printed the test page from Windows on a Laserjet 1005.
What I did (from a clean ReadyNAS Duo):
1. Install EnableRootSSH
2. Copy the firmware sihp1005.dl (from a Ubuntu box I've been using) to my c-drive.
3. Log in to the NAS using SSH
4. Copy the firmware to /dev/usb/lp0.cat /CC/sihp1005.dl > /dev/usb/lp0
5. If OK, the printer starts up, LED blinks and then settles down after a second. If not, powercycle the printer and repeat #4.
6. Print the test page from Windows.
You can't print directly from the NAS (unless you install the rasterizing software), but you can print from computers that have the proper drivers installed.
What I and penguinny needs is a way to automatically upload the firmware when the printer comes online. - WhoCares_Mentor
smask wrote: What I and penguinny needs is a way to automatically upload the firmware when the printer comes online.
I whipped together an addon that *should* do what you need: foo2zjs_readynas-0.0.1.bin
Since I don't have any of these printers available I can *not* test this. So feel free to download and test on your own risk ;)
Would be nice if you could give me some feedback on it. In case you need a direct line, contact me via PM to get my Skype name.
-Stefan - smaskAspirant
WhoCares? wrote: Since I don't have any of these printers available I can *not* test this. So feel free to download and test on your own risk ;)
Would be nice if you could give me some feedback on it. In case you need a direct line, contact me via PM to get my Skype name.
I installed the patch. Foo2zjs shows up in the plugin list and the log says that it installed with no problems, but no luck with printing.
Any settings that I've missed? - WhoCares_Mentor
smask wrote: I installed the patch. Foo2zjs shows up in the plugin list and the log says that it installed with no problems, but no luck with printing. Any settings that I've missed?
Was the printer connected when you installed the addon? If so, unplug the printer from the ReadyNAS, wait a couple of seconds and reconnect it. This should load the correct driver and download the matching firmware to the printer.
-Stefan - super_poussinVirtuosocan you reduce your avatar's picture size ?
- smaskAspirant
WhoCares? wrote:
Was the printer connected when you installed the addon? If so, unplug the printer from the ReadyNAS, wait a couple of seconds and reconnect it. This should load the correct driver and download the matching firmware to the printer.
-Stefan
No luck. The NAS noticed that no printers were attached and said so. I reattached the printer and the queue reappeared.
I tried to run the /etc/hotplug/usb/hplj1005 (hplj1000) script and it complained that it couldn't find /usr/share/foo2zjs/firmware/sihp1005.dl. There is a firmware, /usr/share/foo2xqx/firmware/sihp1005.img, that the printer didn't like. Some new folders and a copy of my working fw later, the script runs ok without parameters. With "install-usermap" it stops on line 157. The script needs the ex and ed command.
--
Edit:typo - smaskAspirantUmmm...
Suddenly it just works?!?!?! The only thing I did to the plugin was switching to a working firmware and adding correct folder tree for foo2zjs firmwares.
Stuff I have done to my NAS after I installed the plugin:
Enabled the preinstalled Squeezebox Center.
Installed the full version of Squeezebox Center.
Mounted and unmounted a Matrox Onetouch 250GB disk in the front USB connector.
Related Content
- Jan 27, 2023Retired_Member
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!