Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
Use the following at your own risk!!!
Some people here failed to get their GDI-printers to work with the DNS-323 as a print server.
Some explanation:
GDI-printers get part their operting system (i.e. firmware) uploaded by the hosts operating system. Either at the printer's or the Windows PC's starting time. Using the DNS-323 as a print server normally the printer doesn't get fed with it's firmware. That's what we need to change to make GDI-printers work.
1. Get the firmware from some place
You need to get the firmware file for your printer. Google is your best friend. For my Laserjet 1018 I found it here:
http://foo2zjs.rkkda.com/. The file is named sihp1018.dl for my printer. Copy it to /mnt/HD_a2/.
2. Change the hotplug scripts so it uploads the file to the printer once the printer starts.
Backup /etc/hotplug/usb.agent first.
Hotplug is a kernel-functionality that enables Linux to perform stuff when usb- (and other) devices get attached or detached from the system.
For the DNS-323 (using original firmware V1.04) the kernel calls the /sbin/hotplug script whenever a hotpluggable device is attached or detached. We need to make the kernel aware of our device. For USB-devices /sbin/hotplug calls the file /etc/hotplug/usb.agent. That's the file we need to change.
After the first few comments add the following to the file:
# start of printer-specific code if [ "$PRODUCT" = "3f0/4117/100" ]; then if [ "$ACTION" = "add" ]; then echo HP Laserjet 1018 detected >> /mnt/HD_a2/hotplug.log sleep 10 echo Uploading firmware assuming /dev/usblp0 >> /mnt/HD_a2/hotplug.log cat /mnt/HD_a2/sihp1018.dl > /dev/usblp0 echo Firmware uploaded successfully >> /mnt/HD_a2/hotplug.log fi fi # end of printer specific-coce
What does it do? It checks the variable PRODUCT for a string that is specific to the HP Laserjet 1018. You need to change that string for your printer (google for USB product code <your printer>). Then it checks if the printer was attached (added) to the system (we don't want to upload the firmware when the printer is removed). Then it waits 10 seconds for the printer to fully start. Then we upload the firmware by writing it to the usb device (/dev/usblp0).
4. Create log file
touch /mnt/HD_a2/hotplug.log
3. Test.
Type
tail -f /mnt/HD_a2/hotplug.log
Restart your printer and wait until the console says "Firmware uploaded successfully".
Print something.
Hope it helps.
Offline
It was a real torture to get working my HP LaserJet 1000w without turning on the desktop. I've tried several print servers and I realized that this is a host based printer: it won't work without uploading firmware. And I've bought a DNS-323 and finally found this thread. Thank you for the solution! It took me at least 5 years to get working this printer outside the desktop PC...
HP LaserJet 1000w specific info: product ID is 3f0/517/120
HP firmwares for 1000, 1005, 1018, 1020: http://oleg.wl500g.info/hplj
Mod:
My problem is when you switch off the printer and DNS-323 too (i.e. power failure) and turn on again simultaneously, the firmware hasn't been fed to printer yet. Is there any way to upload the firmware before the first print job (i.e. using a flag to know that firmware has been uploaded)? It's not such a big problem, I'm happy to see my printer working with a print server...
Last edited by Rival (2008-03-15 16:53:50)
Offline
Rival wrote:
My problem is when you switch off the printer and DNS-323 too (i.e. power failure) and turn on again simultaneously, the firmware hasn't been fed to printer yet. Is there any way to upload the firmware before the first print job (i.e. using a flag to know that firmware has been uploaded)? It's not such a big problem, I'm happy to see my printer working with a print server...
It's not a nice solution, but I've put the line "cat /mnt/HD_a2/fun_plug.d/etc/sihp1000.dl > /dev/usblp0" to the end of fun_plug script, so my problem solved. It forces firmware upload after the dns-323 restarts. I don't use any other USB devices so it's a working solution to me...
Offline
oxygen wrote:
Uhm. wierd. I have a HP Laserjet 1010, which perfectly fits by it's number in that line, but it does not need such workarounds.
I think HP LJ 1010 is slightly "better" than 1000w. You have USB2.0 capability and 8MB of RAM. These are not in the same product line. 1000w has been discontinued long ago. I'm not sure but 1010 has it's own firmware, and the "host-based" term means that the driver rasterizes the data to print not the printer itself. I think host-based might also mean "firmwareless" in my case.
From somewhere on Internet: "A printer that has built-in support for Windows Graphical Device Interface (GDI). GDI is used by most Windows applications to display images on a monitor, so when printing from a Windows application to a GDI printer, there is no need to convert the output to another format such as PostScript or PCL.
GDI printers are sometimes called host-based printers because they rely on the host computer to rasterize pages."
So If I'm right there are dumb and dumber host-based printers. You have the smarter one...
Offline
I realised that after turning on the printer the DNS-323 doesn't want to go to standby mode. I checked the HDD usage, and found that the lpd daemon reads its .lpd directory on /mnt/HD_a4. I made some changes to usb.agent file so the lpd daemon starts and stops with turning the printer on and off. It looks like this:
-----
if [ "$PRODUCT" = "3f0/517/120" ]; then
if [ "$ACTION" = "add" ]; then
echo "Printer detected" >>/mnt/HD_a2/fun_plug.d/log/hotplug.log
sleep 5
echo "Uploading firmware assuming /dev/usblp0..." >>/mnt/HD_a2/fun_plug.d/log/hotplug.log
cat /mnt/HD_a2/fun_plug.d/etc/sihp1000.dl > /dev/usblp0
echo "Starting lpd..." >>/mnt/HD_a2/fun_plug.d/log/hotplug.log
lpd
fi
if [ "$ACTION" = "remove" ]; then
echo "Printer removed" >>/mnt/HD_a2/fun_plug.d/log/hotplug.log
echo "Killing lpd..." >>/mnt/HD_a2/fun_plug.d/log/hotplug.log
kill `pidof lpd`
fi
fi
-----
The "3f0/517/120" is my HP 1000w product ID. I also had to add a line to fun_plug too:
-----
echo "* Killing lpd..." >>${LOGFILE}
kill `pidof lpd` >>${LOGFILE}
-----
After these modifications my DNS-323 spins down the HDDs after turning off the printer, so there is peace and silence at home...
Mod.: It's working fine connected to a 4 port USB HUB...
Last edited by Rival (2008-04-09 16:43:42)
Offline
Great work!
For my case, the printer prints fine without injecting GDI firmware, and I just want the unit to sleep properly. Let's assume I'm only connecting the printer to the USB port. I assume I can remove product identification and simplify the script to do the following?
if [ "$ACTION" = "add" ]; then
echo "USB Device (Printer?) detected" >>/mnt/HD_a2/fun_plug.d/log/hotplug.log
sleep 5
lpd
fi
if [ "$ACTION" = "remove" ]; then
echo "USB Device (Printer?) removed" >>/mnt/HD_a2/fun_plug.d/log/hotplug.log
echo "Killing lpd..." >>/mnt/HD_a2/fun_plug.d/log/hotplug.log
kill `pidof lpd`
fi
Will this work?
An alternative solution would be to create the .lpd on a USB key and bypass the hard disk for printing purposes all together. Of course that involves using a USB hub.
Offline
blahsome wrote:
Will this work?
Yes, I think so. You simply just start lpd daemon when turning on the printer and kill when turning off (or unplug). If you would like this, it's fine. For me this must be the solution to the spin-down problem (I'm testing it).
Offline
oxygen wrote:
For me, a connected printer does not prevent that the unit goes to sleep mode.
I think it depends on the printer model, firmware and fun_plug version. Mine is v1.04b84, fun_plug v0.3 (modified, ctorrent client).
Offline
Unfortunately, I can't have my laserjet 1000 (connected to the DNS-323) work from XP : each time I try to print something, the document stays in the Windows printer queue with an "error" status...
Is there anything I can do on the DNS side to check what's wrong (logs, debug level...) ? (I've got firmware 1.05 + fun_plug)
May I, for instance, try to print something from the DNS-323 so that I would be sure everything is ok from the printer point of view ?
Thanks in advance !
Offline
Ok, I've just solved it ! (I notice one often finds the answer just after having asked the question...)
I simply disabled the "bidirectional mode" in the printer setup window...
I don't really understand why, but it works (better than "It does not work but I perfectly know why"...)
Nevertheless, thank you for everything else !!
Offline
Hello everyone:
Got a DNS-323 with 1.6 firmware and a HP 1018 printer.
I followed all the steps described here (at least that's what I think and I'm very new to Linux) but my printer doesn't work.
Can someone help me?
Thanks in advance.
Offline
Hello,
Just a reminder that's not easy to find the USB code for your printer around. However, there is a simple way to do that. If you already have your printer, include the following line on your usb.agent file (instead of suggested at beginning of this thread:
echo $PRODUCT >> /mnt/HD_a2/hotplug.log
Follow the touch part and then plug your printer. Do the tail and it sould show your USB printer ID. Change the code provided on the script with this one. And follow everything else here.
This may be the problem with phosphato, for instance.
Enjoy!
Last edited by hricardo (2009-05-25 03:50:29)
Offline
For fun plug v0.5 you should edit /etc/hotplug/usb.agent file and insert the "if [ "$PRODUCT" = "xxx/xxx/xxx" ]..." lines to it's add) and remove) sections.
Last edited by Rival (2009-07-31 15:18:09)
Offline
How to make this work on NSA-220 with fun_plug 0.5?
There is no "/etc/hotplug/usb.agent" file and I can see no calls to it in hotplug script ((
Offline