[8.0 ulpt] no response from HL2040

OH

Active Member

Reaction score: 33
Messages: 209

I have never gotten this printer to work via USB (either with builtin lpd or CUPS). Now running 8.0-RELEASE-p2, I gave it another go, but still no success

What I have:
Code:
# usbconfig | grep Brother
ugen1.2: <HL-2040 series Brother> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
System:
Code:
FreeBSD 8.0-RELEASE-p2 #0: Sat Jan 23 00:23:53 CET 2010 pcoliver8amd64  amd64
What I did:
/etc/printcap
Code:
lp|HL2040|Brother HL-2040:\
        :lp=/dev/ulpt0:\
        :af=/home/oliver/sources/Brother/Brother-HL-2040-hl1250.ppd:\
        :if=/usr/local/bin/foomatic-rip:\
        :lf=/var/log/hl2040.log:\
        :sh:sd=/var/spool/lpd/HL2040:
This ppd comes recommended from openprinting.org I edited it to make sure gs would be found:
Code:
*FoomaticRIPCommandLine: "/usr/local/bin/gs -q -dBATCH -dPARANOIDSAFER -dNOPAUSE -sDE&&
the spooldir is daemon:daemon and 0770
I put myself in the daemon group
Code:
pw groupmod daemon -m oliver
and am also present in the operator group

/etc/devfs.rules:
Code:
add path 'lpt*'   mode 666
add path 'ulpt*'  mode 666
add path 'unlpt*' mode 666
I understand that that third six is not recommended, I tried it with 660, but was equally unsuccessful

print/foomatic-filters is installed and lpd is starting / stopping / restarting fine.

One test is to print as root from a terminal
Code:
# lptest 20 5 | lpr
# lpq
lp is ready and printing
Rank   Owner      Job  Files                                 Total Size
active root       7    (standard input)                      105 bytes

# ls -la /var/spool/lpd/HL2040/
total 18
drwxrwx---  2 daemon  daemon   512 26 jan 18:43 .
drwxr-xr-x  3 root    daemon   512 26 jan 17:17 ..
-rw-r----x  1 root    daemon     4 26 jan 18:43 .seq
-rw-rw----  1 daemon  daemon   125 26 jan 18:43 cfA007pcoliver.heesakkers.info
-rw-rw----  1 root    daemon   105 26 jan 18:43 dfA007pcoliver.heesakkers.info
-rw-rw-r--  1 root    daemon  2161 26 jan 18:43 errs.CI4s220
-rw-rw-r--  1 root    daemon    36 26 jan 18:43 lock
-rw-rw-r--  1 root    daemon    25 26 jan 18:43 status
Nothing is printed, the printer does not respond in any way whatsoever.

Same thing if I print a page from a pdf with okular (the print-window tells me the printer is local and connected)
Code:
# lpq
lp is ready and printing
Rank   Owner      Job  Files                                 Total Size
active oliver     8    /tmp/kde-oliver/okularhh1732.ps       1067759 bytes

# ls -la /var/spool/lpd/HL2040/
total 1086
drwxrwx---  2 daemon  daemon      512 26 jan 18:48 .
drwxr-xr-x  3 root    daemon      512 26 jan 17:17 ..
-rw-r----x  1 root    daemon        4 26 jan 18:48 .seq
-rw-rw----  1 daemon  daemon      157 26 jan 18:48 cfA008pcoliver.heesakkers.info
-rw-rw----  1 oliver  daemon  1067759 26 jan 18:48 dfA008pcoliver.heesakkers.info
-rw-rw-r--  1 root    daemon     1968 26 jan 18:48 errs.Q7w9dO5
-rw-rw-r--  1 root    daemon       36 26 jan 18:48 lock
-rw-rw-r--  1 root    daemon       25 26 jan 18:48 status
errs.Q7w9dO5

Any suggestions?
 
OP
OP
O

OH

Active Member

Reaction score: 33
Messages: 209

Forgot to mention: the /var/log/hl2040.log remained empty in these examples.
 

bjs

Member

Reaction score: 24
Messages: 82

just curious, if the printer is showing up as ugen1.2, why are you configuring everything as if it is ulpt???
 
OP
OP
O

OH

Active Member

Reaction score: 33
Messages: 209

bjs said:
just curious, if the printer is showing up as ugen1.2, why are you configuring everything as if it is ulpt???
from dmesg:
Code:
uhci1: <UHCI (generic) USB controller> port 0xb880-0xb89f irq 21 at device 26.1 on pci0
uhci1: [ITHREAD]
uhci1: LegSup = 0x0f30
usbus1: <UHCI (generic) USB controller> on uhci1
usbus1: 12Mbps Full Speed USB v1.0
ugen1.2: <Brother> at usbus1
ulpt0: <Brother HL-2040 series, class 0/0, rev 2.00/1.00, addr 2> on usbus1
 

atomicplayboy

Member

Reaction score: 4
Messages: 76

I have this same printer and got it working via cups with the unlptX device instead of the ulptX. The software won't be able to reset the printer after errors (for instance, out of paper), but it's better than nothing. Try setting /dev/unlpt0.
 
OP
OP
O

OH

Active Member

Reaction score: 33
Messages: 209

Cool, printing lptest now gives an error, but ps and pdf actually produce the desired result! Thank you!
 
Top