Install Brother HL-5040

Hello,

i want to install my Brother Hl-5040 in OpenWrt.

I uses this manual:
https://openwrt.org/docs/guide-user/services/print_server/p910ndprinterserver

The first steps bring no problems to me.

ls /dev/usb/lp*
/dev/usb/lp0

My OS is Windows 10.

I get difficults by No. 6 in the Windows 10 section.

2020-04-03_18h42_46

There ist no HL-5040 in the list.

https://support.brother.com/g/b/downloadlist.aspx?c=de&lang=de&prod=hl5040_all&os=10013

says, that there is an built-in-driver for Windows 10 64 bit.

The last option ist the manuel methoded.

root@OpenWrt:~# cupsctl WebInterface=yes
-ash: cupsctl: not found
root@OpenWrt:~# opkg install cupsctl
Unknown package 'cupsctl'.
Collected errors:
 * opkg_install_cmd: Cannot install package cupsctl.
root@OpenWrt:~# opkg install cups
Unknown package 'cups'.
Collected errors:
 * opkg_install_cmd: Cannot install package cups.

I have no idea, what to do, now.

Regards

Bebbi

1 Like

They probably means the driver is on the printer itself. Try connecting the printer using a USB cable and you will probably as virtual CD/DVD with the driver on it (usually packed as an EXE).

After the driver is installed, hopefully when you try adding the printer as a network printer as in the guide you were following, you will find the driver there in step 6.

No.

The built-in driver is already included with Windows® Operating System or is available through Windows® update. The built-in driver supports the basic functions of your Brother machine

https://support.brother.com/g/b/downloadlist.aspx?c=gb&lang=en&prod=hl5040_all&os=10013

The other option on this site is the "Enhanced Generic PCL Driver". It's an *.exe file. You can't open this in the window for installing a printer - see the linked manuel - No 6 .

Solution:
I download the Generic driver https://support.brother.com/g/b/downloadend.aspx?c=de&lang=de&prod=hl5040_all&os=10013&dlid=dlf002166_000&flang=17&type3=428. This is an selfextracting *zip and not a programm. After unzipping, I found an *.inf file. This ist only a small printer driver without special functions, but it seems to work. :slight_smile:

2 Likes

Your router is Linux based. There are two options for an OpenWRT print server; CUPs and p910nd. p910 has a smaller footprint and is easier. If your are using cups, you can download a *ppd for your particular printer at OpenPrinting
https://www.openprinting.org/printer/Brother/Brother-HL-5040

There are multiple ways to do this.

The HL-5040 is PCL5e/PCL6 capable. Per the Openprinting web site, the PCL5e driver is fast and reliable but only goes to 600dpi. When a print job is requested from most applications, it is generated in Postscript: *.ps. For a non-postscript capable printer, say that uses PCL5e, the *.ps file has to be filtered into PCL5e - so the printer will understand it. PCL5 (aka ljet4), PCL5e(xtended), PCL6 (aka pxlmono) are ghostscript based. If your router has the RAM, your router would need cups and ghostscript to act as a print server for raw (unfiltered job) from any computer on your network. In this case, you would select the "raw" print driver in your Windows setup. "Raw" does not filter, it just passes the job through.
Windows *.ps -raw-> router cups filters to PCL5e -> HL-5040 receives PCL5e

You can run into problems if you filter a print job twice; once at the windows machine and again at the routers print sever.

Alternatively you can filter *.ps to PCL5e on the computer and have the router print server pass it "raw" to the printer. If you are using a Windows "printer driver" to filter, then select "raw" in the cups interface on the router.
*.ps -> Windows print filter to PCL5e -> router print server -raw- -> HL-5040 receives PCL5e

A last option is to look into Samba sharing a printer.

1 Like

fwiw, I use p901nd with my 2003 Brother HL-1450 for a few years without any issues.

Windows 10 always errored and couldn't download and install the in-built driver for this printer via Windows Update. I eventually solved it by retrieving and extracting the .CAB file from Microsoft Catalog, to be able to manually install the driver 'from disk'.

I wasn't aware there was a generic PCL5E driver on the Brother website until I saw your post.

Comparing this PCL5E driver to the one I use from Microsoft Catalog, the only obvious difference is the PCL5E driver reports the Hardware ID containing the name HL-2250DN whereas the driver from Microsoft Catalog reports HL-1450. I guess it is not important.

In Windows, The PCL5E driver > Printer Properties > Preferences > Advanced... shows two additional options. eg. 'Density Adjustment'.

If I understand you right, I haven't to change anything.

I have this option, too.

Hi shep,

should I change it oder only change it, when i have a problem?

I was mistaken that p910nd is the same as CUPS. In the documentation, there is no selection of a printer driver in the LuCi interface so I assume p910nd passes the job Raw.

I'm confused by the documentation:
https://openwrt.org/docs/guide-user/services/print_server/p910ndprinterserver
It looks like you filter in the Windows Box but the documentation confusingly calls for you to Select "Raw" and then select a printer driver in Windows Step 5.

There are issues sending a Raw print job in Windows 10
http://www.columbia.edu/~em36/windowsrawprint.html

The issue with double filtering:
https://wiki.debian.org/CUPSPrintQueues#Double_Filtering
The debian wiki mentions that may work but no guarantee.

So, if it is working, I would not change it.

1 Like

Windows send in RAW to OpenWR/p910nd and p910nd in RAW to the printer?

I would follow the OpenWRT documentation and select a Brother PCL5e driver. When you select a driver, you are selecting a filter.If it does not exist, there are other Brother printers that use PCL5e/PCL6. My neighbors HL-2270 uses PCL6 and that driver should work for you.

Per @Hegabo, there are printers with built-in drivers. Printers with that capability are called PostScript printers. They are usually enterprise level printers and more costly. Also faster, no filtering, and easier to set up.
Windows *.ps -raw-> router print server raw -> PostScript printer receives PostScript

Windows is having you make a choice between Raw and LPR. LPR is the Spooler, on your Windows 10 Box, which queues the print job and feeds it to the printer when the printer signifies that it is ready (not out of paper/ink). If it is truly "Raw" there would be no reason to select a printer driver in the next step. I think Microsoft should have label it "Direct" rather than "Raw".

In the LInux/BSD World, You bypass the Spooler by using Direct IP printing.

Correct, just install and use the Brother PCL5e driver as described in openwrt wiki. No other changes required.

When using p910nd use Windows to send RAW. (LPR will NOT work)

1 Like

I uses BHPCL5E.INF out of the generic driver from Brother HL-5040 website.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.