SOLUTION: HOWTO run problematic LaserJet printers on DSxxx

Got questions on using your printer with our server? Post it here.
Forum rules
This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:
https://myds.synology.com/support/suppo ... p?lang=enu
efex
Trainee
Trainee
Posts: 16
Joined: Wed May 20, 2009 10:36 pm

SOLUTION: HOWTO run problematic LaserJet printers on DSxxx

Postby efex » Mon Jan 04, 2010 1:36 am

After reading several posts in formus and searching the net, I'm trying to make a HOWTO for solving this problem:
Some HP LaserJets (maybe also other printers - if yes, please note in reply) need to send firmware form PC first. This is working when they are connected thru USB cable, but not thru DiskStation (probably any of them). In this case, if you connect this printer (In my case LaserJet 1020, but same situation is with 1005, 1018, 1022 and others), it simply didn't print.

If you want to test that this HOWTO can help you, try this:
1) Install printer connected with USB cable directly to PC. Install driver, test print.
2) Install printer connected thru diskstation with proper driver in Windows too.
3) Connect printer thru USB directly to PC, print one page
4) Reconnectprinter to DS wihtout powering off printer.
If you are now able to print, this HOWTO can help you.

1.) find proper firmware file on net. Filename should be sihp10xx.dl (for LJ1020 it is sihp1020.dl and I found it here: http://oleg.wl500g.info/hplj/sihp1020.dl)
2.) Go to DS management settings and allow Telnet or SSH
3.) Copy sihp10xx.dl file to some of your shares on DS (for example "Share" root)
4.) connect to DS with telnet or SSH client (you can use putty client for example)
5.) Login as "root", as password put your admin password
6.) copy your firmware file to folder /usr/syno/hotplug/fimrware with command mv /volume1/Share/sihp1020.dl /usr/syno/hotplug/firmware
7.) you need to edit file /usr/syno/hotplug/usb.agent. First make a backup: cp /usr/syno/hotplug/usb.agent /usr/syno/hotplug/usb.agent.old
8.) now copy it to Share to edit it mv /usr/syno/hotplug/usb.agent /volume1/Share/
9.) now open file usb.agent in your Share folder (on File explorer) with notepad or similar editor. You will need to add this lines to end of file:

Code: Select all

# Upload the firmware to the printer
sleep 5
FIRMWARE=/usr/syno/hotplug/firmware/sihp1020.dl
if [ "$PRODUCT" = "3f0/2b17/100" ]
then
      if [ "$ACTION" = "add" ]
      then
         echo "`date` : Sending firmware to printer..." >> /var/log/hp
         cat $FIRMWARE > /dev/usb/lp0
         echo "`date` : done." >> /var/log/hp
      fi
fi

You will need to change name of file from sihp1020.dl to yours. Similar situation is in case of $PRODUCT. Try to search the net to find proper one. For LJ1018 it is "3f0/4117/100" for example...
Save the file back to Share. BE SURE TO SAVE IT WITH LINUX END-OF-LINES (LF only, not CR+LF)!!!
10.) go back to telnet and return edited file to proper place: mv /volume1/Share/usb.agent /usr/syno/hotplug/
11.) change back file attributes to make it working (this took me while to find it): chmod 755 /usr/syno/hotplug/usb.agent

Now just replug your printer and it should work.

Please test. add links to firmware files, $PRODUCT codes and other prooved printers to help others.

WARNING! After DSM update you need to repeat all the steps!!!!
Last edited by efex on Mon Apr 18, 2011 9:58 pm, edited 4 times in total.
User avatar
mikhnal
Trainee
Trainee
Posts: 16
Joined: Wed Nov 25, 2009 8:23 pm
Location: Warsaw, Poland

Re: HOWTO run problematic LaserJet printers on DSxxx

Postby mikhnal » Mon Jan 04, 2010 12:30 pm

$PRODUCT for LJ 1005 is 3ed/2b17/100
Info from this site.

Other firmwares: http://oleg.wl500g.info/hplj/
Synology fanatic user

DS415+ / DSM 6.0.2-8451 Update 2 / 4x WD Red 6TB RAID5 btrfs / 8GB RAM mod / 2x Noctua A9 FLX fan mod
DS409+ / DSM 4.2-3256 / 4x ST31000528AS 1TB RAID5 / 1GB RAM mod
RT1900ac / SRM 1.1.1-6414 Update 1 / 16GB Sandisk Extreme SDHC U3
dkeusch
Student
Student
Posts: 76
Joined: Mon Nov 16, 2009 5:23 am
Location: Vientiane

Re: SOLUTION: HOWTO run problematic LaserJet printers on DSxxx

Postby dkeusch » Tue Jan 12, 2010 3:54 pm

efex, i will try this!! seems totally arabic language to me, but if i read carefully, i should be able to do it, i will have learned something?

and it works, you can use the printer on the network and if the base pc is shut down?

i was more about looking for a model to buy.

let's see, i'll give it a try
DS210j | 2x3Tb WD30PURX | RAID 0
DS409+ | 4x3Tb WD30EZRX | RAID 5
DS412+ | 4x4Tb ST4000VN000 | RAID 5

APC Back-UPS BR900GI
Kodi
efex
Trainee
Trainee
Posts: 16
Joined: Wed May 20, 2009 10:36 pm

Re: SOLUTION: HOWTO run problematic LaserJet printers on DSxxx

Postby efex » Wed Jan 13, 2010 10:04 pm

maybe it is quite "qeeky" so if somebody can try to translate it to human language some people can like it more. Anyway it is working well - you need no running PC - DiskStation send firmware itself when laserjet is conencted to it.
If you have any question during procces I will ty to help you
znutt
I'm New!
I'm New!
Posts: 1
Joined: Fri Jan 29, 2010 10:32 pm

Re: SOLUTION: HOWTO run problematic LaserJet printers on DSxxx

Postby znutt » Fri Jan 29, 2010 10:37 pm

:D :D :D
Nice it works
A minor bug i couldent get it working with wordpad(added tabs and strange symbols). Couldn't save it apropiate. :roll:
But after som test i downloded EditPad and then it worked nice :mrgreen:
THANK YOU efex, i'm very impressed with the coding
jcotof
I'm New!
I'm New!
Posts: 5
Joined: Mon Feb 01, 2010 4:51 pm

HPLaserJet P1006 not priting when attached to DS210j

Postby jcotof » Mon Feb 01, 2010 5:09 pm

I have trouble using HP Laserjet P1006 printer attached to DS210j.

When I send a print from the Windows client, I can see that the document arrives in the queue but never prints.

You can help me?
jcotof
I'm New!
I'm New!
Posts: 5
Joined: Mon Feb 01, 2010 4:51 pm

Re: SOLUTION: HOWTO run problematic LaserJet printers on DSxxx

Postby jcotof » Mon Feb 01, 2010 5:36 pm

Somebody have the $PRODUCT for HP Laserjet P1006 ?
jcotof
I'm New!
I'm New!
Posts: 5
Joined: Mon Feb 01, 2010 4:51 pm

Re: SOLUTION: HOWTO run problematic LaserJet printers on DSxxx

Postby jcotof » Mon Feb 01, 2010 7:23 pm

efex
Trainee
Trainee
Posts: 16
Joined: Wed May 20, 2009 10:36 pm

Re: SOLUTION: HOWTO run problematic LaserJet printers on DSxxx

Postby efex » Mon Feb 01, 2010 11:38 pm

znutt wrote:i'm very impressed with the coding

it is not mine, i found it somewhere on net :)
User avatar
dialeleven
Student
Student
Posts: 75
Joined: Mon Feb 22, 2010 11:13 am

Re: SOLUTION: HOWTO run problematic LaserJet printers on DSxxx

Postby dialeleven » Tue Feb 23, 2010 6:25 am

Wow, thanks efex. My HP 1020 now prints instead of sending the print job to the spooler, deleting the print job and doing nothing! :D Talk about a hack.

I ended up skipping step 8-11 as I used vi (yuck) to edit the file to avoid the whole copying back and forth thing. I was hoping pico or nano was installed on there, but no luck. I did a quick search on the forum, but didn't find any easy to follow install instructions (anyone?) for pico/nano.

BTW, it wasn't mentioned in your instructions, but when doing this procedure, make sure you don't delete the modified usb.agent and restore the original one after printing works for the first time! I did that and turned the printer off & on and tried printing again which didn't work. Seems like the driver needs to be copied/installed every time the printer is turned on and detected by the DSxxx. :oops:
DS410j
efex
Trainee
Trainee
Posts: 16
Joined: Wed May 20, 2009 10:36 pm

Re: SOLUTION: HOWTO run problematic LaserJet printers on DSxxx

Postby efex » Tue Feb 23, 2010 4:01 pm

dialeleven wrote:BTW, it wasn't mentioned in your instructions, but when doing this procedure, make sure you don't delete the modified usb.agent and restore the original one after printing works for the first time! I did that and turned the printer off & on and tried printing again which didn't work. Seems like the driver needs to be copied/installed every time the printer is turned on and detected by the DSxxx. :oops:

Hack we did sends FIRMWARE to laserjet. It is requested - firmware is first thing Laserjet waits for and without it it is not working. It ie very effective way how to upfate firmware, but make network use problem. So our hack sends firmware to laserjet form DiskStation as first "job" after Laserjet was detected.
sala_sana
I'm New!
I'm New!
Posts: 1
Joined: Sun Mar 28, 2010 2:02 pm

Re: SOLUTION: HOWTO run problematic LaserJet printers on DSxxx

Postby sala_sana » Sun Mar 28, 2010 2:08 pm

thanks a lot. Works perfectly with HP 1018 on DS210j
emerc
I'm New!
I'm New!
Posts: 2
Joined: Fri Apr 02, 2010 1:46 pm

Re: SOLUTION: HOWTO run problematic LaserJet printers on DSxxx

Postby emerc » Fri Apr 02, 2010 2:14 pm

Hello,
I'm totally newby in changing code in my DS106e, but I've bought a new HP Laserjet P1006 and I want to follow the instructions.
But I'm stuck on
"3.) Copy sihp10xx.dl file to some of your shares on DS (for example "Share" root)"
Can someone explain me in (step by step) how I can copy the file which is on my local computer now to the root directory of my DS106e?
Thanks a lot.
efex
Trainee
Trainee
Posts: 16
Joined: Wed May 20, 2009 10:36 pm

Re: SOLUTION: HOWTO run problematic LaserJet printers on DSxxx

Postby efex » Fri Apr 02, 2010 6:44 pm

emerc wrote:"3.) Copy sihp10xx.dl file to some of your shares on DS (for example "Share" root)"
Can someone explain me in (step by step) how I can copy the file which is on my local computer now to the root directory of my DS106e?

Hi. If you use your NAS for storing the data, just place mentioned file to any NAS "drive" root (network drive like Z:\ or folder like \\MYNAS\SHARE_NAME or \\192.168.1.25\SHARE_NAME ). Don't put it to any subfolder - just to drive's root).
Important is just to know name of this "share folder" when you was connecting it as Network drive (e.g. SHARE_NAME) - you will need this name in next steps.
emerc
I'm New!
I'm New!
Posts: 2
Joined: Fri Apr 02, 2010 1:46 pm

Re: SOLUTION: HOWTO run problematic LaserJet printers on DSxxx

Postby emerc » Sun Apr 04, 2010 9:15 pm

I've executed carefully all of the 11 steps of the howto. The code that I've added to the end of the usb.agent file is the following

# Upload the firmware to the printer
sleep 5
FIRMWARE=/usr/syno/hotplug/firmware/sihpP1006.dl
if [ "$PRODUCT" = "3f0/3e17/100" ]
then
if [ "$ACTION" = "add" ]
then
echo "`date` : Sending firmware to printer..." >> /var/log/hp
cat $FIRMWARE > /dev/usb/lp0
echo "`date` : done." >> /var/log/hp
fi
fi

The proper firmware file I've used is coming from
http://oleg.wl500g.info/hplj/sihpP1006.dl

and $PRODUCT I've used is 3f0/3e17/100 ( Which I found on http://cateee.net/sources/lkddb/usb.list )
But the printer on my DS still doen't work. When I want to print something the printjob stays in the que.Can anyone help me?

Thanks a lot.
Last edited by emerc on Tue Apr 06, 2010 2:46 pm, edited 1 time in total.

Return to “Printer Server”

Who is online

Users browsing this forum: No registered users and 1 guest