DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 23rd June 2012
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default Brother MFC-5895CW driving me crazy

We've had this multifunction device as the family printer for about a year. I'm pleased with everything about it ... except the ability to use it from OpenBSD. I've tried plain text, Postscript, and even GDI via foomatic's hl7x0 driver (via a similar printer's PPD). None of these services print anything, ever. All I ever see is communication with the printer on port 515. The printer lists these LPD queues:
Code:
Local> show service

 * 1 Service Name : BRN001BA967B8D7    Port Name : P1
       Filter=0     BOT=1    EOT=1  Option : BQ
       Protocol :  IP    TCP Port : 9100

   2 Service Name : BINARY_P1      Port Name : P1
       Filter=0     BOT=1    EOT=1  Option : BQ
       Protocol :  IP    TCP Port : 9100

   3 Service Name : TEXT_P1    Port Name : P1
       Filter=1     BOT=1    EOT=11    Option : BQ
       Protocol :  IP    TCP Port : 9100

   4 Service Name : POSTSCRIPT_P1     Port Name : P1
       Filter=0     BOT=10     EOT=4    Option : BQ
       Protocol :  IP    TCP Port : 9100

   5 Service Name : PCL_P1     Port Name : P1
       Filter=0     BOT=9    EOT=4  Option : BQ
       Protocol :  IP    TCP Port : 9100

   6 Service Name : BRN001BA967B8D7_AT       Port Name : P1
       Filter=4     BOT=1    EOT=1  Option : BQ
       Protocol :  IP    TCP Port : 9100
All these test printcap entries have failed to produce any printed output:
Code:
foo|test of MFC8600 hl7x0 driver:\
    :lp=:rm=192.168.2.56:rp=BRN001BA967B8D7:\
    :sd=/var/spool/output/lp:lf=/var/log/lpd-errs:\
    :af=/etc/foomatic/Brother-MFC-8600.ppd:if=/usr/local/bin/foomatic-rip:\
    :sh:

ps|test of PS:\
    :lp=:rm=192.168.2.56:rp=POSTSCRIPT_P1:sd=/var/spool/output/lp:\
    :lf=/var/log/lpd-errs:sh:

text|test of text:\
    :lp=:rm=192.168.2.56:rp=TEXT_P1:sd=/var/spool/output/lp:\
    :lf=/var/log/lpd-errs:sh:

bin|test of MFC8600 hl7x0 driver via another service:\
    :lp=:rm=192.168.2.56:rp=BINARY_P1:\
    :sd=/var/spool/output/lp:lf=/var/log/lpd-errs:\
    :af=/etc/foomatic/Brother-MFC-8600.ppd:if=/usr/local/bin/foomatic-rip:\
    :sh:
All that /var/log/lpd-errs ever shows is that lpd is restarted. Logging of packets with tcpdump(8) shows that there is a conversation, the right queue is requested, the data is sent ... and nothing ever prints.

Every couple of months, I Google this printer to see if anyone has ever had success with the printer without Brother's proprietary software. Nothing, to date.

Any suggestions?

Last edited by jggimi; 23rd June 2012 at 10:57 PM. Reason: typos, as usual.
Reply With Quote
  #2   (View Single Post)  
Old 24th June 2012
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

It looks like you are trying to use the built in wireless for network printing.

The manufacturers spec sheet indicates that it supports hp jet direct on port 9100
Quote:
Supported Network Protocols (IPv4) ARP, RARP, BOOTP, DHCP, APIPA (Auto IP), NetBIOS/WINS, LPR/LPD, Custom Raw Port/Port9100, DNS Resolver, mDNS, FTP Server, TELNET, SNMPv1, TFTP, Scanner Port, LLTD Responder, Web Services (Print)
The printcap syntax that worked for me was
Code:
hp5l|lp|ljet4;r=300x300;q=draft;c=gray;p=letter;m=auto:\
    :lp=9100@192.168.1.2:\
    :rp=raw:\
    :if=/etc/apsfilter/basedir/bin/apsfilter:\
    :sd=/var/spool/lpd/hp5l:\
    :lf=/var/spool/lpd/hp5l/log:\
    :af=/var/spool/lpd/hp5l/acct:\
    :mx#0:\
    :sh:
Other options are to try cups or apsfilter. In gnome/xfce4 network printers can be "discovered' in cups

Last edited by shep; 24th June 2012 at 01:51 AM.
Reply With Quote
  #3   (View Single Post)  
Old 24th June 2012
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,125
Default

Could it be a end of line incompatibility? In other words, it may expect a CR/LF pair (0x0d/0x0a) instead of a single the LF (0x0a). Or horror of horrors maybe it needs a Control-Z.

Just a shot in the dark
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #4   (View Single Post)  
Old 24th June 2012
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Quote:
Originally Posted by shep View Post
It looks like you are trying to use the built in wireless for network printing.
Yes. How could you tell?
Quote:
The manufacturers spec sheet indicates that it supports hp jet direct on port 9100...
Yes. I'd tried 9100@, but not rp=raw and not with apsfilter. Will try later today and report results. Thank you for the printcap example.
Quote:
Other options are to try cups or apsfilter. In gnome/xfce4 network printers can be "discovered' in cups
I dislike CUPS primarily because of lack of diagnositics. I've used it before; if I'm forced to use it again, I will.
Quote:
Originally Posted by J65nko View Post
Could it be a end of line incompatibility? In other words, it may expect a CR/LF pair (0x0d/0x0a) instead of a single the LF (0x0a). Or horror of horrors maybe it needs a Control-Z.

Just a shot in the dark
Thanks, but if Brother did that they'd be violating RFC 1149 and they have other printers that are known to work with LPD just fine. My thought was they might be using one of their standard operating systems for a less than completely functional printer, and that the OS doesn't know the capabilities aren't actually present. For example, nothing in the specs mentions Postscript or BR Script, but the printer lists on operational Postscript service via Telnet.
Reply With Quote
  #5   (View Single Post)  
Old 25th June 2012
roddierod's Avatar
roddierod roddierod is offline
Real Name: Rod Person
VPN Cryptographer
 
Join Date: Apr 2008
Location: Pittsburgh, Pa
Posts: 437
Default

Quote:
Originally Posted by jggimi View Post
Thanks, but if Brother did that they'd be violating RFC 1149 and they have other printers that are known to work with LPD just fine. My thought was they might be using one of their standard operating systems for a less than completely functional printer, and that the OS doesn't know the capabilities aren't actually present. For example, nothing in the specs mentions Postscript or BR Script, but the printer lists on operational Postscript service via Telnet.
I have a brother laser printer (hl-4040cdn), so maybe this doesn't apply to the inkjet...but I had to go into the configuration page and set treat LF as CR/LF to print correctly.

CUPS only worked sometimes for me so I switched to using LPD. I finally got LPD to work by making a custom filter to translate PS to PCL (again, not sure if this applies to the inkjet world). But anyway, here's the link to how I can not print without problem, it's FreeBSD but should work on OpenBSD.

http://www.wonkity.com/~wblock/docs/...dprinting.html
__________________
"The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use the words." -Philip K. Dick
Reply With Quote
  #6   (View Single Post)  
Old 26th June 2012
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Quote:
Originally Posted by roddierod View Post
...but I had to go into the configuration page and set treat LF as CR/LF to print correctly.
My issue is different -- I get no output at all, ever. And it's a guess, but I'm guessing this change you made was for text content, not RFC 1149 LPD commands. Even so, I'll look for a CR/LF setting, just to check.
Quote:
I finally got LPD to work by making a custom filter to translate PS to PCL...
I had been testing PS -> Brother GDI using Ghostscript's HL7x0 driver. I'll retest with Ghostscript's ps2pcl, and report back.

Thank you for the suggestions.
Reply With Quote
  #7   (View Single Post)  
Old 24th June 2012
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Same result, Shep. No output. I'll try CUPS, next. From a test environment. I'm not a fan of it.
Reply With Quote
  #8   (View Single Post)  
Old 24th June 2012
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

CUPS found the "BINARY_P1" interface only. The rest of the services were not found. But after configuring the found printer, CUPS was unable to find the queue to send a test page. I manually set the connetion to socket://192.168.2.56:9100, but that failed to send anything due to format errors.

I hate CUPS.
Reply With Quote
  #9   (View Single Post)  
Old 25th June 2012
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

I utilize a single printer with a parallel port print server. Like you I prefer the simplicity of lpd/printcap. I use Arch linux on a laptop that is not compatible with OpenBSD and access the printer via Cups. In Arch/Cups I do not have to use the HP direct 9100 printer port and use ipp://192.168.1.2/P1 or http://192.168.1.2/P1 or lpd://192.168.1.2/P1.

I would also try 192.168.2.56:9100/P1 and socket://192.168.2.56 from what I read here

Quote:
socket://192.168.2.56:9100
may be redundant since socket automatically "happens" on port 9100

Last edited by shep; 25th June 2012 at 02:21 AM.
Reply With Quote
Old 27th June 2012
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

There's no place to set LF/CRLF from the printer's little interface, nor from Telnet. One can set EOT characters by service, though they appear to be standard (ctrl-A or ctrl-D, as noted in the top post).

Using ljet4 PCL, per the ps2pcl script, had no change in symptoms. No print, printer "receiving data" and the file long since considered sent, and out of spool. Tried with both the BINARY_P1 LPD port, and the 9100@ Jet Direct device.

Bleh.
Reply With Quote
Old 27th June 2012
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

I even tried the proprietary Linux driver; all its binary needs is already in emulators/fedora_base. Same results -- clears spool immediately, nothing printed.

I shall continue to use the device from non-OpenBSD platforms: Windows, Linux, and Android (they have a nice app).
Reply With Quote
Old 27th June 2012
roddierod's Avatar
roddierod roddierod is offline
Real Name: Rod Person
VPN Cryptographer
 
Join Date: Apr 2008
Location: Pittsburgh, Pa
Posts: 437
Default

Did you try changing the device in the ps2pcl script? I had pretty much the same problem as you were the spool would clear...I even got a blinking light on my printer meaning it was warming up to print but nothing ever printed (had this with CUPS and even using the lpd instruction from brother and there binary driver).

my ps2pcl looks like this:
Code:
#!/bin/sh
/usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=pxlcolor -sPAPERSIZE=letter -sOutputFile=- -
Here is my printcap just in case it helps: brother is defined in my /etc/hosts as 192.168.1.3

Code:
lp:\
      :lp=:\
      :rm=brother:\
      :rp=raw:\
      :sd=/var/spool/lpd/brother:\
      :mx#0:\
      :sh:\
      :if=/usr/local/libexec/ps2pcl:\
      :lf=/var/log/lpd-errs:\
__________________
"The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use the words." -Philip K. Dick
Reply With Quote
Old 27th June 2012
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

If you haven't been driven crazy yet you could also break the task into smaller parts:
1. Hook printer directly to usb and work out print cap.
2. Printer via NIC cable to add networking
3. Finally printer via wireless networking - I looked at the online manual which talked about WEP keys for the printer. Did not say anything about WPA

A quick test would be to ping 192.168.2.56 and watch the router lights
My Trendnet print server also has a web interface
From
Code:
lynx 192.168.1.2
   Change IP Address
   
    IP Address:
   (*) Manually Assign
   IP Address      :   192.168.1.2_______
   Subnet Mask     :   255.255.255.0_____
   Default Gateway :   192.168.1.1_______
   ( ) Automatically Assign              
   
       Save   Cancel

Last edited by shep; 27th June 2012 at 01:47 PM.
Reply With Quote
Old 27th June 2012
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Quote:
Originally Posted by roddierod View Post
Did you try changing the device in the ps2pcl script?
I had not. I will try the hl7x0 driver and then the pxlcolor driver. Thank you for that tip.
Quote:
I even got a blinking light on my printer meaning it was warming up to print but nothing ever printed (had this with CUPS and even using the lpd instruction from brother and there binary driver).
Yep. I have an LCD display which either lights up or otherwise displays it is receiving data (forever). Depends on which of the many broken methods I've tried which I get.
Quote:
Originally Posted by shep View Post
If you haven't been driven nuts yet you could also break the task into smaller parts:
1. Hook printer directly to usb and work out print cap.
Thanks. Unfortunately, I am certain that the issue is not networking per se. I can reach the device with Telnet -- the service list in the top post came from a Telnet session. Also, tcpdump shows end to end conversations via TCP port 515 or 9100. All that stated, the problem source could just be a bug in the printer's control program, where incoming WiFi traffic for LPD or Jet Direct is just dropped. We have plenty of systems that print via WiFi connection via proprietary driver or proprietary Android app. Even so, I will attempt a direct connection to rule WiFi out as a possibilty.
Reply With Quote
Old 28th June 2012
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

*&^%$#!!!!

All new tests failed, including USB interface.
Reply With Quote
Old 28th June 2012
roddierod's Avatar
roddierod roddierod is offline
Real Name: Rod Person
VPN Cryptographer
 
Join Date: Apr 2008
Location: Pittsburgh, Pa
Posts: 437
Default

Thats sucks.

The only other suggestion I can possible suggest is try using netcat to print a text file, just to see if it produces any output at all.
__________________
"The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use the words." -Philip K. Dick
Reply With Quote
Old 28th June 2012
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

Did you find this web site?

The site describes linux emulation, installation of the *.rpm based printer drivers from Brother and CUPS. The end result looks bloated and antithetical to OpenBSD but it is reported to work.
Reply With Quote
Old 28th June 2012
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

I've used Telnet with port 515, attempting to print stuff via LPD protocol, to no avail. But that could be due to my misunderstanding of the protocol.
Reply With Quote
Old 28th June 2012
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Shep, no, I used the proprietary LPD driver under compat_linux, not CUPS. That, I suppose, will be my next (and last) attempt.
Reply With Quote
Old 28th June 2012
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

An archived OpenBSD Brother thread with multiple options.

I have a feeling jggimi will eventually pound this into submission.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Freebsd and Brother HL-2032 laser printer da1 FreeBSD General 6 12th March 2009 03:09 AM
torrent clients are driving me nuts graudeejs FreeBSD General 28 9th January 2009 12:43 PM


All times are GMT. The time now is 09:45 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick