Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Printing to Brother HL2270DW [Solved]

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
11 posts • Page 1 of 1
Author
Message
justin_brody
Apprentice
Apprentice
User avatar
Posts: 283
Joined: Wed Jan 26, 2005 11:09 pm

Printing to Brother HL2270DW [Solved]

  • Quote

Post by justin_brody » Fri Apr 01, 2011 9:12 pm

Hello,
I'm hoping someone can help me debug a printing problem. I have a Brother HL2270; I followed the installation instructions here: http://forums.gentoo.org/viewtopic-t-86 ... rt-25.html. This worked for me at first but then it didn't!

Currently, when I try to print a test page, what comes out is raw (unrendered) postscript. So I'm guessing one of the filters isn't doing what it should! Can anyone give me some pointers on how to test this. Here are some lines from /var/log/cups/error_log:

Code: Select all

...
D [01/Apr/2011:17:01:38 -0400] [Job 604] envp[17]="LANG=en_US.UTF-8"
D [01/Apr/2011:17:01:38 -0400] [Job 604] envp[18]="PPD=/etc/cups/ppd/HL2270DW.ppd"
D [01/Apr/2011:17:01:38 -0400] [Job 604] envp[19]="RIP_MAX_CACHE=8m"
D [01/Apr/2011:17:01:38 -0400] [Job 604] envp[20]="CONTENT_TYPE=application/postscript"
D [01/Apr/2011:17:01:38 -0400] [Job 604] envp[21]="DEVICE_URI=socket://192.168.10.200"
D [01/Apr/2011:17:01:38 -0400] [Job 604] envp[22]="PRINTER=HL2270DW"
D [01/Apr/2011:17:01:38 -0400] [Job 604] envp[23]="FINAL_CONTENT_TYPE=printer/HL2270DW"
I [01/Apr/2011:17:01:38 -0400] [Job 604] Started filter /usr/libexec/cups/filter/pstops (PID 7320)
I [01/Apr/2011:17:01:38 -0400] [Job 604] Started filter /usr/libexec/cups/filter/brlpdwrapperHL2270DW (PID 7321)
I [01/Apr/2011:17:01:38 -0400] [Job 604] Started backend /usr/libexec/cups/backend/socket (PID 7322)
D [01/Apr/2011:17:01:38 -0400] Discarding unused job-state-changed event...
D [01/Apr/2011:17:01:38 -0400] cupsdProcessIPPRequest: 19 status_code=0 (successful-ok)
...
D [01/Apr/2011:17:01:38 -0400] [Job 604] Connected to 192.168.10.200:9100 (IPv4)...
D [01/Apr/2011:17:01:38 -0400] [Job 604] backendRunLoop(print_fd=0, device_fd=5, use_bc=1, side_cb=0x8049010)
D [01/Apr/2011:17:01:38 -0400] Discarding unused printer-state-changed event...
D [01/Apr/2011:17:01:38 -0400] Discarding unused job-progress event...
D [01/Apr/2011:17:01:38 -0400] [Job 604] Page = 595x842; 18,12 to 577,830
D [01/Apr/2011:17:01:38 -0400] [Job 604] slow_collate=0, slow_duplex=0, slow_order=0
D [01/Apr/2011:17:01:38 -0400] [Job 604] Before copy_comments - %!PS-Adobe-3.0
D [01/Apr/2011:17:01:38 -0400] [Job 604] %!PS-Adobe-3.0
D [01/Apr/2011:17:01:38 -0400] [Job 604] %%BoundingBox: 0 0 612 792
D [01/Apr/2011:17:01:38 -0400] [Job 604] %%Pages: 1
D [01/Apr/2011:17:01:38 -0400] [Job 604] %%LanguageLevel: 1
D [01/Apr/2011:17:01:38 -0400] [Job 604] %%DocumentData: Clean7Bit
D [01/Apr/2011:17:01:38 -0400] [Job 604] %%DocumentSuppliedResources: procset testprint/1.3
D [01/Apr/2011:17:01:38 -0400] [Job 604] %%DocumentNeededResources: font Helvetica Helvetica-Bold Times-Roman
D [01/Apr/2011:17:01:38 -0400] [Job 604] %%Creator: Michael Sweet, Apple Inc.
D [01/Apr/2011:17:01:38 -0400] [Job 604] %%CreationDate: D:20090113092400+0800
D [01/Apr/2011:17:01:38 -0400] [Job 604] %%Title: Test Page
D [01/Apr/2011:17:01:38 -0400] [Job 604] %%EndComments
D [01/Apr/2011:17:01:38 -0400] [Job 604] Before copy_prolog - %%BeginProlog
D [01/Apr/2011:17:01:38 -0400] [Job 604] Before copy_setup - %%Page: 1 1
D [01/Apr/2011:17:01:38 -0400] [Job 604] Before page loop - %%Page: 1 1
D [01/Apr/2011:17:01:38 -0400] [Job 604] Copying page 1...
D [01/Apr/2011:17:01:38 -0400] [Job 604] pagew = 559.0, pagel = 818.0
D [01/Apr/2011:17:01:38 -0400] [Job 604] bboxx = 0, bboxy = 0, bboxw = 595, bboxl = 842
D [01/Apr/2011:17:01:38 -0400] [Job 604] PageLeft = 18.0, PageRight = 577.0
D [01/Apr/2011:17:01:38 -0400] [Job 604] PageTop = 830.0, PageBottom = 12.0
D [01/Apr/2011:17:01:38 -0400] [Job 604] PageWidth = 595.0, PageLength = 842.0
D [01/Apr/2011:17:01:38 -0400] [Job 604] Wrote 1 pages...
D [01/Apr/2011:17:01:38 -0400] PID 7320 (/usr/libexec/cups/filter/pstops) exited with no errors.
D [01/Apr/2011:17:01:38 -0400] [Job 604] Read 4096 bytes of print data...
D [01/Apr/2011:17:01:38 -0400] Discarding unused printer-state-changed event...
D [01/Apr/2011:17:01:38 -0400] [Job 604] Wrote 4096 bytes of print data...
D [01/Apr/2011:17:01:38 -0400] Discarding unused printer-state-changed event...
D [01/Apr/2011:17:01:38 -0400] Discarding unused job-progress event...
D [01/Apr/2011:17:01:38 -0400] [Job 604] Read 4096 bytes of print data...
D [01/Apr/2011:17:01:38 -0400] [Job 604] Wrote 4096 bytes of print data...
D [01/Apr/2011:17:01:38 -0400] [Job 604] Read 4096 bytes of print data...
D [01/Apr/2011:17:01:38 -0400] [Job 604] Wrote 4096 bytes of print data...
D [01/Apr/2011:17:01:38 -0400] [Job 604] Read 8192 bytes of print data...
D [01/Apr/2011:17:01:38 -0400] [Job 604] Wrote 8192 bytes of print data...
D [01/Apr/2011:17:01:38 -0400] [Job 604] Read 8192 bytes of print data...
D [01/Apr/2011:17:01:38 -0400] [Job 604] Wrote 8192 bytes of print data...
...<[i]LOTS more lines like this[/i]
D [01/Apr/2011:17:02:03 -0400] [Job 604] Read 2377 bytes of print data...
D [01/Apr/2011:17:02:03 -0400] [Job 604] Wrote 2377 bytes of print data...
D [01/Apr/2011:17:02:08 -0400] Discarding unused printer-state-changed event...
D [01/Apr/2011:17:02:08 -0400] Discarding unused job-progress event...
D [01/Apr/2011:17:02:08 -0400] Discarding unused printer-state-changed event...
D [01/Apr/2011:17:02:08 -0400] Discarding unused job-progress event...
D [01/Apr/2011:17:02:08 -0400] PID 7322 (/usr/libexec/cups/backend/socket) exited with no errors.
D [01/Apr/2011:17:02:08 -0400] [Job 604] File 0 is complete.
I [01/Apr/2011:17:02:08 -0400] [Job 604] Completed successfully.
D [01/Apr/2011:17:02:08 -0400] Discarding unused printer-state-changed event...
D [01/Apr/2011:17:02:08 -0400] Discarding unused job-completed event...
D [01/Apr/2011:17:02:09 -0400] [Job 604] Unloading...

Any pointers would be GREATLY appreciated!

Thanks!
[/quote]
Last edited by justin_brody on Wed Jun 01, 2011 9:26 pm, edited 2 times in total.
Top
IRQsRFun
Apprentice
Apprentice
Posts: 195
Joined: Fri May 02, 2003 12:59 pm
Location: Somewhere between .3 and .7 Vdd

  • Quote

Post by IRQsRFun » Sun May 01, 2011 3:19 am

From what I was able to get from a very quick skim of the thread, there was only a reference of installing CUPS using rpm. I usually avoid using other package managers with Gentoo since it conflicts with the Gentoo package manager portage (things might break on updates). Perhaps you should look at:

http://www.gentoo.org/doc/en/printing-howto.xml

This uses emerge to install cups so that portage knows about it and will not make changes to other thing that will break cups.
Top
Clad in Sky
l33t
l33t
User avatar
Posts: 900
Joined: Fri May 04, 2007 6:40 am
Location: Germany

  • Quote

Post by Clad in Sky » Sun May 01, 2011 5:44 pm

What do you mean, it worked? Did the printer first work and now all of a sudden it doesn't?

A how to for the HL-2140 can be found here.
http://en.gentoo-wiki.com/wiki/Brother_HL-2140
Should also work for your printer driver.
Kali Ma
Now it's autumn of the aeons
Dance with your sword
Now it's time for the harvest
Top
justin_brody
Apprentice
Apprentice
User avatar
Posts: 283
Joined: Wed Jan 26, 2005 11:09 pm

  • Quote

Post by justin_brody » Sun May 01, 2011 9:19 pm

Hi,
Thanks for the thought! I am actually getting cups out of portage; what comes through rpm is "cupswrapper" and the brother print driver, which unfortunately don't seem to exist in portage.

I've borrowed a big book on CUPS from my library; going to have a debugging party soon. Woot woot!
Top
IRQsRFun
Apprentice
Apprentice
Posts: 195
Joined: Fri May 02, 2003 12:59 pm
Location: Somewhere between .3 and .7 Vdd

  • Quote

Post by IRQsRFun » Mon May 02, 2011 12:43 pm

I have a different model than you.

My cups has been working for a long time though I only print a few times a year. I do not remember using a cups wrapper. I think I just imported the cups driver using the GUI when I created a printer.

Anyway, you got yourself a book which is more than what I had when I got this working.

Best of luck.
Top
justin_brody
Apprentice
Apprentice
User avatar
Posts: 283
Joined: Wed Jan 26, 2005 11:09 pm

  • Quote

Post by justin_brody » Thu May 19, 2011 12:39 pm

Still can't get the beast working; I do have some extra information though.

I've managed to collect the output of the various filters that CUPS sends the file through. It seems like the chain is:
1. Application converts whatever the file is to postscript.
2. PS file is sent through /usr/libexec/cups/filter/pstops. This handles pagination and that kind of thing.
3. Output of that is sent through /usr/libexec/cups/filter/brlpdwrapperHL2270DW. This converts postscript to PCL.
4. PCL file is sent to /usr/libexec/cups/backend/socket

What I'm getting is postscript output, which made me think it wasn't being converted. I think it IS actually being converted, but it's writing the postscript text in PCL, rather than "rendering" it. I'm guessing the problem is then in whatever happens in step 3.

I've tried reinstalling the stuff from Brother a few times, but that hasn't helped.

A couple questions:

a. Can anyone tell me the right way to use the "rpm" command to force a reinstall?
b. Does anyone on the forum know enough about the Brother drivers to know if there's some switch it needs to be passed to tell it that what's coming in postscript which needs to be rendered rather than just plain text?

I think I'm probably gettting to the point where I need to take it up with the "Brother" people; hopefully their Linux support is official!

Thanks for all the responses so far, and any additional help anyone can provide!
Top
justin_brody
Apprentice
Apprentice
User avatar
Posts: 283
Joined: Wed Jan 26, 2005 11:09 pm

  • Quote

Post by justin_brody » Thu May 19, 2011 11:06 pm

O.k. - I've been tracing through the scripts and I think I've figured out the problem! :P

The final filter uses the "file" command to figure out whether or not what's coming in is PostScript.

Here's the beginning of the file:

Code: Select all

citta HL2270DW # head /tmp/br_input_ps.W5Uf7t 
%!PS-Adobe-3.0
%%LanguageLevel: 1
%%DocumentData: Clean7Bit
%%DocumentSuppliedResources: procset testprint/1.3
%%DocumentNeededResources: font Helvetica Helvetica-Bold Times-Roman
%%Creator: Michael Sweet, Apple Inc.
%%CreationDate: D:20090113092400+0800
%%Title: Test Page
%%For: (anonymous)
%RBINumCopies: 1
But:

Code: Select all

citta HL2270DW # file /tmp/br_input_ps.W5Uf7t 
/tmp/br_input_ps.W5Uf7t: [b]data[/b]
So the "file" command isn't recognizing the file as postscript.

Anyone know what I need to do to change that?
Top
Raptor85
Apprentice
Apprentice
Posts: 208
Joined: Sat Dec 29, 2007 12:21 am

  • Quote

Post by Raptor85 » Fri May 20, 2011 12:33 am

I never used the RPM commands to install my Brother laser printer, it was a long time ago but it was pretty much

1. Install CUPS
2. Install foomatic-filters
3. Install PPD file


Have you installed anything since then maybe? Since you did it outside the package manager there's a good chance portage could have overwritten anything installed and you could have version conflicts in scripts (potentially the filters?)
Top
justin_brody
Apprentice
Apprentice
User avatar
Posts: 283
Joined: Wed Jan 26, 2005 11:09 pm

  • Quote

Post by justin_brody » Fri May 20, 2011 1:30 am

Hi Raptor85,

Thanks for the note! I poked around, and it looks like you can install this with foomatic. I'll definitely go that route if I can't get this to work.

In the meantime, I've found some confirmation here: https://bbs.archlinux.org/viewtopic.php?id=113962. So I'm guessing it's exactly an upgrade of the file command that broke things. I tried upgrading file to 5.07 but no go. Unfortunately downgrading isn't an option in the current portage :(

I'll try a bug report!
Top
justin_brody
Apprentice
Apprentice
User avatar
Posts: 283
Joined: Wed Jan 26, 2005 11:09 pm

  • Quote

Post by justin_brody » Wed Jun 01, 2011 9:26 pm

So I filed a bug-report for sys-apps/file. It should be fixed in a future version. For anyone else who has this problem (starts with file-5.05 I think), I added to the following lines to /usr/local/Brother/Printer/HL2270DW/lpd/filterHL2270DW:

Code: Select all


#Hack until the "file" command gets fixed
if [ `head -1 $INPUT_TEMP1 | grep "%!PS"` ] ; then
    FILE_TYPE="PostScript"

fi
I put this right after the line that says:

Code: Select all

FILE_TYPE=`file $INPUT_TEMP1 | sed -e 's/^.*:[ ]*//' -e 's/[ ].*//'`
This does the trick so far!
Top
mrpdaemon
Tux's lil' helper
Tux's lil' helper
Posts: 134
Joined: Mon Aug 23, 2004 1:03 am

  • Quote

Post by mrpdaemon » Fri Oct 19, 2012 4:30 am

I've written e-builds for the drivers of this printer in case anyone is interested:
https://bugs.gentoo.org/show_bug.cgi?id=432166
Top
Post Reply

11 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic