* [9fans] printing over usb
@ 2010-07-03 18:31 James Chapman
2010-07-03 21:08 ` franciscojose ballesteros
0 siblings, 1 reply; 7+ messages in thread
From: James Chapman @ 2010-07-03 18:31 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
Hi,
I would like to use my hp laserjet 1300 postscript printer with plan9.
I'm running plan9 under vmware fusion on a macbook and the printer is
connected via usb.
I checked that the printer is visible:
term% usb/probe
ep1.0 roothub csp 0x000009 ports 2 uhci
ep2.0 roothub csp 0x000009 ports 6 ehci
ep3.0 hub csp 0x000009 ports 7 none <nil> uhci
ep4.0 printer csp 0x030107 csp 0x010107 vid 0x03f0 did 0x1017
Hewlett-Packard 'hp LaserJet 1300' uhci
I added the following line to /sys/lib/lp/devices:
laserjet1300 - - /dev/usb/ep4.0/data - post+nohead generic nospool - - - -
Then I tried to print something:
term% lp -dlaserjet1300 /sys/doc/utf.ps
cat: write error copying <stdin>: request timed out
Can somebody tell me what I'm doing wrong?
Best wishes,
James Chapman
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] printing over usb
2010-07-03 18:31 [9fans] printing over usb James Chapman
@ 2010-07-03 21:08 ` franciscojose ballesteros
2010-07-03 21:31 ` James Chapman
0 siblings, 1 reply; 7+ messages in thread
From: franciscojose ballesteros @ 2010-07-03 21:08 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
Ep4.0 does not look like the place to send data. It's probably the control ep.
for the printer. IIRC, the driver adds a file named lp something, but I'm not
sure. Try to look at /dev to see if there's a file there. Otherwise it could be
something like ep4.1
On Jul 3, 2010, at 8:31 PM, James Chapman <james@cs.ioc.ee> wrote:
> Hi,
>
> I would like to use my hp laserjet 1300 postscript printer with plan9.
> I'm running plan9 under vmware fusion on a macbook and the printer is
> connected via usb.
>
> I checked that the printer is visible:
>
> term% usb/probe
> ep1.0 roothub csp 0x000009 ports 2 uhci
> ep2.0 roothub csp 0x000009 ports 6 ehci
> ep3.0 hub csp 0x000009 ports 7 none <nil> uhci
> ep4.0 printer csp 0x030107 csp 0x010107 vid 0x03f0 did 0x1017
> Hewlett-Packard 'hp LaserJet 1300' uhci
>
> I added the following line to /sys/lib/lp/devices:
>
> laserjet1300 - - /dev/usb/ep4.0/data - post+nohead generic nospool - - - -
>
> Then I tried to print something:
>
> term% lp -dlaserjet1300 /sys/doc/utf.ps
> cat: write error copying <stdin>: request timed out
>
> Can somebody tell me what I'm doing wrong?
>
> Best wishes,
>
> James Chapman
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] printing over usb
2010-07-03 21:08 ` franciscojose ballesteros
@ 2010-07-03 21:31 ` James Chapman
2010-07-05 22:23 ` James Chapman
0 siblings, 1 reply; 7+ messages in thread
From: James Chapman @ 2010-07-03 21:31 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
On Sun, Jul 4, 2010 at 12:08 AM, franciscojose ballesteros
<nemo.mbox@gmail.com> wrote:
> Ep4.0 does not look like the place to send data. It's probably the control ep.
> for the printer. IIRC, the driver adds a file named lp something, but I'm not
> sure. Try to look at /dev to see if there's a file there.
term% du -ah /dev | grep lp
yields only this:
1k /dev/lpt1dlr
1k /dev/lpt1psr
0 /dev/lpt1pcr
0 /dev/lpt1data
> Otherwise it could be something like ep4.1
I don't seem to have an ep4.1:
term% usb/probe
ep1.0 roothub csp 0x000009 ports 2 uhci
ep2.0 roothub csp 0x000009 ports 6 ehci
ep3.0 hub csp 0x000009 ports 7 none <nil> uhci
ep4.0 printer csp 0x030107 csp 0x010107 vid 0x03f0 did 0x1017
Hewlett-Packard 'hp LaserJet 1300' uhci
James
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] printing over usb
2010-07-03 21:31 ` James Chapman
@ 2010-07-05 22:23 ` James Chapman
2010-07-06 1:11 ` erik quanstrom
2010-07-06 8:02 ` Francisco J Ballesteros
0 siblings, 2 replies; 7+ messages in thread
From: James Chapman @ 2010-07-05 22:23 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
Hi,
I 'solved' the problem by attaching the printer to my apple airport
express. Now I can print from plan9 using this neat trick I found
whilst digging in 9fans:
term% cat test.ps | telnet tcp!express.lan!9100
connected to tcp!express.lan!9100 on /net/tcp/2
I'd still like to be able to directly connect with usb. I will try
with native plan 9 instead of under vmware fusion and also try a
different printer to see if I get different results.
Is there some extra extra debugging I can enable to see what's going
on with the usb devices?
Best wishes,
James Chapman
On Sun, Jul 4, 2010 at 12:31 AM, James Chapman <james@cs.ioc.ee> wrote:
> On Sun, Jul 4, 2010 at 12:08 AM, franciscojose ballesteros
> <nemo.mbox@gmail.com> wrote:
>> Ep4.0 does not look like the place to send data. It's probably the control ep.
>> for the printer. IIRC, the driver adds a file named lp something, but I'm not
>> sure. Try to look at /dev to see if there's a file there.
>
> term% du -ah /dev | grep lp
>
> yields only this:
>
> 1k /dev/lpt1dlr
> 1k /dev/lpt1psr
> 0 /dev/lpt1pcr
> 0 /dev/lpt1data
>
>> Otherwise it could be something like ep4.1
>
> I don't seem to have an ep4.1:
>
> term% usb/probe
> ep1.0 roothub csp 0x000009 ports 2 uhci
> ep2.0 roothub csp 0x000009 ports 6 ehci
> ep3.0 hub csp 0x000009 ports 7 none <nil> uhci
> ep4.0 printer csp 0x030107 csp 0x010107 vid 0x03f0 did 0x1017
> Hewlett-Packard 'hp LaserJet 1300' uhci
>
> James
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] printing over usb
2010-07-05 22:23 ` James Chapman
@ 2010-07-06 1:11 ` erik quanstrom
2010-07-06 6:16 ` Akshat Kumar
2010-07-06 8:02 ` Francisco J Ballesteros
1 sibling, 1 reply; 7+ messages in thread
From: erik quanstrom @ 2010-07-06 1:11 UTC (permalink / raw)
To: 9fans
On Mon Jul 5 18:25:26 EDT 2010, james@cs.ioc.ee wrote:
> Hi,
>
> I 'solved' the problem by attaching the printer to my apple airport
> express. Now I can print from plan9 using this neat trick I found
> whilst digging in 9fans:
>
> term% cat test.ps | telnet tcp!express.lan!9100
> connected to tcp!express.lan!9100 on /net/tcp/2
>
you can also print through lp(1) in this way. i believe
the JetDirect example in /sys/lib/lp/devices is the right
template.
- erik
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] printing over usb
2010-07-06 1:11 ` erik quanstrom
@ 2010-07-06 6:16 ` Akshat Kumar
0 siblings, 0 replies; 7+ messages in thread
From: Akshat Kumar @ 2010-07-06 6:16 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
I made a post about this not too long ago.
However, the problem is in the fact that
with a port listening for data to print directly,
anything and everything that comes in, gets
printed. Beware of portscanners, etc..
A better method would be to setup a proper
LPR port (lpdaemon) such as in
/rc/bin/service/tcp515 - however, I could not
get this to ever work, because I need the
data to be processed by hpijs, and something
goes wrong between the data coming in and
being sent to lp via lpdaemon. I don't know
what (ideas? see my previous post about this).
Best,
ak
On Mon, Jul 5, 2010 at 6:11 PM, erik quanstrom <quanstro@quanstro.net> wrote:
> you can also print through lp(1) in this way. i believe
> the JetDirect example in /sys/lib/lp/devices is the right
> template.
>
> - erik
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [9fans] printing over usb
2010-07-05 22:23 ` James Chapman
2010-07-06 1:11 ` erik quanstrom
@ 2010-07-06 8:02 ` Francisco J Ballesteros
1 sibling, 0 replies; 7+ messages in thread
From: Francisco J Ballesteros @ 2010-07-06 8:02 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
Yes. You might start with -d flags to usbd or issuing a debug ctl
(see the man page) to see what's the error.
On Tue, Jul 6, 2010 at 12:23 AM, James Chapman <james@cs.ioc.ee> wrote:
> Hi,
>
> I 'solved' the problem by attaching the printer to my apple airport
> express. Now I can print from plan9 using this neat trick I found
> whilst digging in 9fans:
>
> term% cat test.ps | telnet tcp!express.lan!9100
> connected to tcp!express.lan!9100 on /net/tcp/2
>
> I'd still like to be able to directly connect with usb. I will try
> with native plan 9 instead of under vmware fusion and also try a
> different printer to see if I get different results.
>
> Is there some extra extra debugging I can enable to see what's going
> on with the usb devices?
>
> Best wishes,
>
> James Chapman
>
>
> On Sun, Jul 4, 2010 at 12:31 AM, James Chapman <james@cs.ioc.ee> wrote:
>> On Sun, Jul 4, 2010 at 12:08 AM, franciscojose ballesteros
>> <nemo.mbox@gmail.com> wrote:
>>> Ep4.0 does not look like the place to send data. It's probably the control ep.
>>> for the printer. IIRC, the driver adds a file named lp something, but I'm not
>>> sure. Try to look at /dev to see if there's a file there.
>>
>> term% du -ah /dev | grep lp
>>
>> yields only this:
>>
>> 1k /dev/lpt1dlr
>> 1k /dev/lpt1psr
>> 0 /dev/lpt1pcr
>> 0 /dev/lpt1data
>>
>>> Otherwise it could be something like ep4.1
>>
>> I don't seem to have an ep4.1:
>>
>> term% usb/probe
>> ep1.0 roothub csp 0x000009 ports 2 uhci
>> ep2.0 roothub csp 0x000009 ports 6 ehci
>> ep3.0 hub csp 0x000009 ports 7 none <nil> uhci
>> ep4.0 printer csp 0x030107 csp 0x010107 vid 0x03f0 did 0x1017
>> Hewlett-Packard 'hp LaserJet 1300' uhci
>>
>> James
>>
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-07-06 8:02 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-03 18:31 [9fans] printing over usb James Chapman
2010-07-03 21:08 ` franciscojose ballesteros
2010-07-03 21:31 ` James Chapman
2010-07-05 22:23 ` James Chapman
2010-07-06 1:11 ` erik quanstrom
2010-07-06 6:16 ` Akshat Kumar
2010-07-06 8:02 ` Francisco J Ballesteros
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).