Saturday, April 20, 2024

Why I love linux

 Linux has an incredibly wide range of useful little applications.  I have a good example of a recent need that was answered by one of them.

Our old Brother HL-5450DN laser printer started having a problem with paper jams.  The troubleshooting guide(s) I went through pointed toward either the toner or fuser components, so I started with replacing the toner -- it's a fast and easy thing to do, plus the old toner cartridge was close to its EOL anyway.  At first that seemed to solve the problem, but not long afterwords the paper jams started again -- and very consistently.  So either we replaced the fuser unit or got a new printer.  Since we try very hard to keep stuff out of the landfill, I went with the first option.  I found a 3rd party fuser on Amazon for a pretty good price (most reviews were positive), and a youtube video on how to R&R the fuser.

The replacement process went very smoothly, and the printer jamming problem appears to have been resolved (fingers crossed).  However, this printer keeps track of the number of prints that go through the machine, and that includes the fuser unit.  At 100,000 pages the printer firmware will start to object to having that "old" fuser unit.  So I needed to tell the computer that the fuser had been replaced.

More online searching revealed references to some utilities that are supposed to do the job:  but I wasn't able to actually FIND any to download.  In addition to that, they are all Windows-centric.  I did find the CDrom that came with the printer, but I didn't find any maintenance-specific applications on it.

My online searching DID find a very useful set of Brother-specific PJL files that are used to perform these kinds of maintenance functions.  PJL stands for "Printer Job Language", and it appears that most network-capable printers understand it.  So what I needed was a way to send the fuser-reset PJL script to our printer.  That's where the "nc" utility came in handy.  nc is linux shorthand for "netcat".  The "cat" command is a linux command that sends text to files or other scripts, so "nc" can send text to networked devices.  This sounded like the ticket.  So I tried sending a little text file to our printer:

nc <ip-address-of--our-printer> 9100 < hello.txt

...and the result was a printed sheet of paper with the words "Hello World!" on it.  BTW 9100 is the port number that's used by most printers for PJL files.

So with this result I substituted the fuser-replacement script I had found for "hello.txt".  I got a "nice" answer from the printer, so I used my browser to access the printer's web page, went to the maintenance section and -- voila! -- the fuser lifetime had been reset to 100%, and the # of replacements had increased from 0 to 1.  It had worked.  And without messing around with any vendor-specific/OS-specific maintenance utility.  If I had actually been able to find it and get it to work under Wine.

No comments:

Post a Comment