Problem printing to LaserJet (Ubu Srv 7.10)

Discussion in 'Server Operation' started by normanp, Feb 14, 2008.

  1. normanp

    normanp New Member

    I will be sharing this printer but thought I would check that I could print from the server.
    Plugged in printer, switched on, connected to server. It must get detected and set up automatically because:
    lpinfo -v (reports usb://HP/LaserJet%201010 etc)
    lpoptions -d Laserjet (to set as default printer)
    lpstat -s (reports LaserJet as default, device usb://HP etc)

    All good so far.

    Now I type:
    lp /tmp/test.txt (I also tried lpr /tmp/test.txt and lp -d LaserJet /tmp/test.txt with the same results)

    The light flashes on the printer then after about 10 minutes it prints the twenty character file!

    I guess the printer is waiting for an EOF - is this right and how can I supply it?

    Will this still be a problem when I share the printer using Samba?

    Thanks for any help.
     
    Last edited: Feb 26, 2008
  2. falko

    falko Super Moderator Howtoforge Staff

    Are there any errors in your logs?
     
  3. normanp

    normanp New Member

    Sorry about delay...holiday!

    Checking the following (all in /var/log/cups):

    access_log has:
    POST .... LaserJet ....Print-Job successful-ok

    nothing in error_log

    page_log has:
    LaserJet root 10 [date] 1 1 - localhost


    Thanks
     
  4. falko

    falko Super Moderator Howtoforge Staff

    Hm, not sure where the problem is... :(
     
  5. normanp

    normanp New Member

    I'm pretty sure that it is a lack of correct CR-LFs or FF or end of doc characters that the LaserJet series wants that Linux is not providing. There is quite a lot on the web mentioning this.
    I would like to:
    echo "Hi There" > /dev/lp0
    but include experimental CRLF or FF etc - but am not sure how to do this.
    When I echo to lp0 the command just hangs until I Ctrl-C out of it - then get no print.

    Another approach may be to somehow get these into the file test.txt but I am not sure if I can with nano - is there a way?

    Another approach would be to put them in the file using a Hex editor. I can do this easily in Windows but is there a hex editor supplied with Ubu Srv?

    Thanks again
     

Share This Page