No Portrait prints from Brother printer on Solaris

Hi,

We are running Solaris 8 and are having problems printing with certain Brother printers. The prints come out fine in when sent to the landscape queue, but when sending a print to the portrait queue, the data light on the printer just flashes once, then nothing comes out.

We have checked the script for this specific queue in /etc/lp/interfaces, but everything looks fine. We used the same method for setting up the printer and queue as we do with all our printers and they all have no problems printing from both landscape and portrait.

The printers having the problems are all the same make and model (Brother HL6050).

I've tried changing the emulation settings etc but with no joy (it's currently set at auto (epson), but have tried hp and all the other options).

I've tried just abouit everything I can think of from the manual but still with no joy.

Any ideas?

Cheers.
Grass-hopperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

tfewsterCommented:
> We used the same method for setting up the printer and queue as we do with all our printers

What method was that? Admintool/running lpadmin/editing printcap/Epson supplied tool?

And how are you generating the prints? Are they Postscript or "text"; Have you tried printing from the command line with
lp -d printername -o portrait     # Assuming the printer driver recognises the options "portrait" & "landscape"
0
Grass-hopperAuthor Commented:
Thanks for the reply.................

> What method was that? Admintool/running lpadmin/editing printcap/Epson supplied tool?

Using command line, i.e..................

# >/dev/remote_name
# chmod 666 /dev/remote_name# lpsystem -t bsd remote_name
# lpadmin -p remote_name -s remote_name\!lpaf
# accept remote_name
# enable remote_name

Then setup queues........

# lpadmin -p new_portrait_queue -v /dev/remote_name -m netbasic_port -D "HL6050 portrait"
# vi /etc/lp/interfaces/new_portrait_queue (add remote_name at SEND QUEUE=...........)
# enable new_portrait queue
# accept new_portrait_queue

same done for landscape apart from substituting new_portrait_queue name and also netbasic_port for netbasic_land.

Tried using admintool - setup fine but same problem. Although didnt have this epson supplied tool - what is this and is it freely available?


> And how are you generating the prints? Are they Postscript or "text"
text.

>Have you tried printing from the command line with # lp -d printername -o portrait
yes - still no joy.

Cheers.
0
tfewsterCommented:
OK, you have a straightforward setup - Using a remote system as a print server, so the formatting/encoding for the printer model is done on that printer.  Is the remote system a Unix system? i.e. Can you log into that and check that the `lp .. -o port ...`  works?  If so, there isn't a problem with the printer or driver on the print server.   If it's not a Unix box, what is it?  If it's Windows, you may need to enable Passthrough printing.

The next thing I would try is `lp -d new_landscape_queue -o portrait` to see if the script "netbasic_land" passes the options through.  If not, try creating a queue using the "netstandard" model and see if that passes the options.

You should also look at the model scripts in /etc/lp/model; I'd expect  netbasic_land and netbasic_port to be almost identical scripts, except they may have defaults hardcoded in them - i.e. Landscape & Portrait respectively. (Or look at the "copies" you've made in /etc/lp/interfaces - new_portrait_queue and new_landscape_queue)

What I meant about Epson setup tools (actually, I should have said Brother) was that some printer manufacturers (e.g. HP and Lexmark) supply their own "interface" that calls lpadmin - Which is usually an unnecessary complication, but they will also supply model scripts that take advantage of all the printer features, e.g. fonts, duplex printing.  I don't know if your netbasic_land and netbasic_port scripts were supplied by Brother - I've not seen them before

Incidentally, do those printer scripts work for _other_ Brother printer models?  I'll look for some info on the HL6050 just in case it has any funnies...

I should also have asked if the print job remains in the queue (`lpstat -t`) or disappeared...
0
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

Grass-hopperAuthor Commented:
It's a Network printer, used for both printing from the Unix system and users desktops (windows).

here is the new_landscape_queue script...............

#! /usr/bin/ksh
#
# This interface script was written to be used when printing to network
# printers which have predefined queues. Script allows for escape sequences
# to be sent as part of print, e.g toggle to landscape, change font, etc.
# Note, it does not do anything fancy like banners since it was primarily
# written for a system which does not request printer options.

# set up paths and variables
SEND_QUEUE=remote_name
TEMPPATH=/tmp
ORIGID=$1
COPIES=$4
BANNER=nobanner
PRE_PRINT_FILE=${TEMPPATH}/${SEND_QUEUE}_pre_esc
POST_PRINT_FILE=${TEMPPATH}/${SEND_QUEUE}_post_esc

>${PRE_PRINT_FILE}
echo "\033&l1O\033(s13H\033&a05L\c" > ${PRE_PRINT_FILE}
>${POST_PRINT_FILE}
echo "\033&l0O\033(s10H\033&a0L" > ${POST_PRINT_FILE}

# move to first FILE to print
shift; shift; shift; shift; shift
FILES="$*"
for NXTFILE in $FILES
do
   # echo ""
   # FILENAM=`basename $NXTFILE`
   # MSGLOG=${TEMPPATH}/${FILENAM}.`echo $ORIGID`.log
   # LPLOG=${TEMPPATH}/${FILENAM}.`echo $ORIGID`.lplog
   MSGLOG=${TEMPPATH}/`echo $ORIGID`.log
   LPLOG=${TEMPPATH}/`echo $ORIGID`.lplog
   rm $MSGLOG $LPLOG >/dev/null 2>&1
   cnt=1
   while [ $cnt -le $COPIES ]
   do
      cat ${PRE_PRINT_FILE} $NXTFILE ${POST_PRINT_FILE}  | lp -d${SEND_QUEUE} -o
 ${BANNER} >>$LPLOG 2>&1
      LPHEAD=`head -1 $LPLOG`
      DUM1=`echo $LPHEAD | cut -f1 -d" "`
      if [ "$DUM1" = "request" ]
      then
         REQID=`echo $LPHEAD | cut -f4 -d" "`
         echo "`date '+%T %D'`: $ORIGID\t$NXTFILE\t$REQID"
         cnt=`expr $cnt + 1`
      else
         cat $LPLOG >> $MSGLOG
         echo "`date '+%T %D'`: $ORIGID\t$NXTFILE"
         cnt=`expr $COPIES + 1`
      fi
   done
   if [ -s $MSGLOG ]
   then
      cat $MSGLOG
   fi
   rm $PRE_PRINT_FILE $POST_PRINT_FILE $MSGLOG $LPLOG >/dev/null 2>&1
done
exit 0


The new_portrait_queue script.............

#! /usr/bin/ksh
#
# This interface script was written to be used when printing to network
# printers which have predefined queues. Script allows for escape sequences
# to be sent as part of print, e.g toggle to landscape, change font, etc.
# Note, it does not do anything fancy like banners since it was primarily
# written for a system which does not request printer options.


# set up paths and variables
SEND_QUEUE=remote_name
TEMPPATH=/tmp
ORIGID=$1
COPIES=$4
BANNER=nobanner
PRE_PRINT_FILE=${TEMPPATH}/${SEND_QUEUE}_pre_esc
POST_PRINT_FILE=${TEMPPATH}/${SEND_QUEUE}_post_esc

>${PRE_PRINT_FILE}
echo "\033&l0O\033(s15H\033&a0L\c" > ${PRE_PRINT_FILE}
#echo "\033&l0O\c" > ${PRE_PRINT_FILE}
>${POST_PRINT_FILE}
# echo "\033(s10H" > ${POST_PRINT_FILE}

# move to first FILE to print
shift; shift; shift; shift; shift
FILES="$*"
for NXTFILE in $FILES
do
   # echo ""
   # FILENAM=`basename $NXTFILE`
   # MSGLOG=${TEMPPATH}/${FILENAM}.`echo $ORIGID`.log
   # LPLOG=${TEMPPATH}/${FILENAM}.`echo $ORIGID`.lplog
   MSGLOG=${TEMPPATH}/`echo $ORIGID`.log
   LPLOG=${TEMPPATH}/`echo $ORIGID`.lplog
   rm $MSGLOG $LPLOG >/dev/null 2>&1
   cnt=1
   while [ $cnt -le $COPIES ]
   do
      cat ${PRE_PRINT_FILE} $NXTFILE ${POST_PRINT_FILE}  | lp -d${SEND_QUEUE} -o
 ${BANNER} >>$LPLOG 2>&1
      LPHEAD=`head -1 $LPLOG`
      DUM1=`echo $LPHEAD | cut -f1 -d" "`
      if [ "$DUM1" = "request" ]
      then
         REQID=`echo $LPHEAD | cut -f4 -d" "`
         echo "`date '+%T %D'`: $ORIGID\t$NXTFILE\t$REQID"
         cnt=`expr $cnt + 1`
      else
         cat $LPLOG >> $MSGLOG
         echo "`date '+%T %D'`: $ORIGID\t$NXTFILE"
         cnt=`expr $COPIES + 1`
      fi
   done
   if [ -s $MSGLOG ]
   then
      cat $MSGLOG
   fi
   rm $PRE_PRINT_FILE $POST_PRINT_FILE $MSGLOG $LPLOG >/dev/null 2>&1
done
exit 0



These scripts work perfectly for other brother printers setup on the Solaris server. e.g we have an HL 1670N working off it fine with the same scripts.

The prints do not stay in the queue.
0
tfewsterCommented:
My PCL5 knowledge is a bit rusty - But I suspect your problem arises from a line commented out in the "port" script:
# echo "\033(s10H" > ${POST_PRINT_FILE}
 
In the "land" script, this reads:
echo "\033&l0O\033(s10H\033&a0L" > ${POST_PRINT_FILE}

(Set paper to Portrait, set font size to 10 point & set margin);  You may as well copy this line to the "new_port_queue" script & test it - It _should_ cause the paper to be ejected.

HOWEVER, neither printer script seems to send a \033E  (end job), which is a concern - I'll look deeper into that later.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tfewsterCommented:
Sorry, I've had no time today to look into the details of Brother printer models or controls;  But the above suggestion should cause the page to be printed when the final POST_PRINT_FILE commands are sent - which will solve the problem.

I suspect the other model printers you have will automatically print the contents of the printer buffer when an End of Job is received, but the 6050 requires an explicit command - and possibly scraps the contents of the buffer when the next job is sent, as it hasn't been "told" to print them.
0
Grass-hopperAuthor Commented:
Fantastic!!

I knew that un-commenting the line would not do anything as we had already tried that, but uncommenting it out - and adding the 033E seems to have done the trick!

Points awarded and deserved.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.