9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] Printing configuration
@ 2022-06-05 15:35 chris
  2022-06-05 17:40 ` Stuart Morrow
  2022-06-10  6:09 ` [9front] " Anthony Martin
  0 siblings, 2 replies; 5+ messages in thread
From: chris @ 2022-06-05 15:35 UTC (permalink / raw)
  To: 9front

Hello all,

I'm trying to setup printing on my 9front desktop.  I have a Canon
TS6300 at home, which I would like to directly send print requests
from the desktop via USB and preferable wireless network request.

I'm having a hard time setting up my /sys/lib/lp/devices config even
after reading /sys/doc/lp.ps and lp(1) and was hoping for someone with
perhaps a similar requirement and a working config to share.

My current two device setups are probably total bogus, but here we go:

; tail -n2 /sys/lib/lp/devices 
homeTS6300wifi	- 192.168.178.82 tcp!192.168.178.82!515	- post+nohead generic generic generic - tcppost -
homeTS6300usb	- /dev/usb/ep13.1/data - - post+nohead generic nospool - - - -
;

I manage to get following error with the wifi printer:

; lp -dhomeTS6300wifi test.ps 
Jun  5 17:15:15 failed to receive ACK, received <0x1> instead
Jun  5 17:15:15 failed to receive ACK before sending data
;

The printer itself works of course on other operating systems with
standard manufacturer documentation.
515 seems to be the proper port and gives something back when using
telnet.

I assume that the printer supports postscript, but I didn't seem to
find a explicit spec mentioning it.  I might be wrong assuming that.
Although plain text alone would already be a blessing.

The wifi printer seems to send something apparently with lpd settings
refering to the log, but nothing really happens:

; tail -n2 /sys/lib/lp/devices 
homeTS6300wifi	- 192.168.178.82 tcp!192.168.178.82!515	- post+nohead generic lpdspool lpstat - tcppost -
homeTS6300usb	- /dev/usb/ep13.1/data - - post+nohead generic nospool - - - -
; cat /sys/lib/lp/log/homeTS6300wifi.st 
connecting to tcp!192.168.178.82!515
 trying from port 721...connected
: 69.13% sent
: 100.00% sent
11850 bytes sent, status: waiting for end of job

I tried lpd settings because my printer test page (printed out on
through other device) mentions LPD as enabled.  Other settings
mentioned are:

- WSD Printing => enabled
- RAW Printing => enabled
- Bonjour => enabled
- LLMNR => enabled
- SNMP = enabled
- PictBridge Commun. => enable

I hope I provided enough information for someone to perhaps see a weak
point or general advice for my configuration.  Refering me to
additional resources could also help.

chris

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] Printing configuration
  2022-06-05 15:35 [9front] Printing configuration chris
@ 2022-06-05 17:40 ` Stuart Morrow
  2022-06-09 13:53   ` chris
  2022-06-10  6:09 ` [9front] " Anthony Martin
  1 sibling, 1 reply; 5+ messages in thread
From: Stuart Morrow @ 2022-06-05 17:40 UTC (permalink / raw)
  To: 9front

At a minimum I would assume you would have to bring usb/print along to nusb.

Howto: https://inbox.vuxu.org/9fans/aefe5050714a813fb41e09b511643954@rei2.9hal/

Anyone else wanting to do this can use a Raspberry Pi to test it:
https://github.com/Raspberryy/Emulated_USB_Printer

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] Printing configuration
  2022-06-05 17:40 ` Stuart Morrow
@ 2022-06-09 13:53   ` chris
  2022-06-09 21:07     ` Stuart Morrow
  0 siblings, 1 reply; 5+ messages in thread
From: chris @ 2022-06-09 13:53 UTC (permalink / raw)
  To: 9front

> At a minimum I would assume you would have to bring usb/print along to nusb.
> 
> Howto: https://inbox.vuxu.org/9fans/aefe5050714a813fb41e09b511643954@rei2.9hal/

Hm I didn't get anything that helps out of that thread.

You might have seen that I already tried using a /dev/usb/ep* device
in my config, but I didn't manage do understand which of the multiple
dedicated files for the printer I should use or if these are even
meant to be directly used by me as a user.

; grep Canon /dev/usb/ctl
255 csp 0xff00ff vid 0x04a9 did 0x188d Canon 'TS6300 series' 29e51 ehci
[usb/ usb/ usbevent user]
[usb/ usb/ usbevent user]
; cat /dev/usbevent 
attach 9 0bdb 1900 000002 a5754
attach 12 04a9 188d ff00ff 29e51
attach 10 17ef 480c 0102ef 0815b
attach 11 0a5c 2145 0101e0 caa40
[35 files]
[ep12.0/ ep12.1/ ep12.10/ ep12.11/ ep12.12/ ep12.13/ ep12.14/ ep12.15/ ep12.2/ ep12.3/ ep12.6/ ep12.7/ ep12.8/ ep12.9/]
; ls /dev/usb/ep12.*
/dev/usb/ep12.0/ctl
/dev/usb/ep12.0/data
/dev/usb/ep12.1/ctl
/dev/usb/ep12.1/data
/dev/usb/ep12.10/ctl
/dev/usb/ep12.10/data
/dev/usb/ep12.11/ctl
/dev/usb/ep12.11/data
/dev/usb/ep12.12/ctl
/dev/usb/ep12.12/data
/dev/usb/ep12.13/ctl
/dev/usb/ep12.13/data
/dev/usb/ep12.14/ctl
/dev/usb/ep12.14/data
/dev/usb/ep12.15/ctl
/dev/usb/ep12.15/data
/dev/usb/ep12.2/ctl
/dev/usb/ep12.2/data
/dev/usb/ep12.3/ctl
/dev/usb/ep12.3/data
/dev/usb/ep12.6/ctl
/dev/usb/ep12.6/data
/dev/usb/ep12.7/ctl
/dev/usb/ep12.7/data
/dev/usb/ep12.8/ctl
/dev/usb/ep12.8/data
/dev/usb/ep12.9/ctl
/dev/usb/ep12.9/data
; cat /dev/usb/ep12.0/ctl 
enabled control rw speed high maxpkt 64 ntds 1 pollival 0 samplesz 0 hz 0 uframes 0 hub 0 port 1 rootport 1 addr 12 idle
255 csp 0xff00ff vid 0x04a9 did 0x188d Canon 'TS6300 series' 29e51 ehci
; 

The sample device configs show a /dev/lpt1data device, I would assume that I
might have to configure usbd properly to create a useable high level
device like that?

PS: Sorry for the late response.  Barely got time for a computer the
last days.  Trying my best to read more into the usb man as soon as
I can.

chris

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9front] Printing configuration
  2022-06-09 13:53   ` chris
@ 2022-06-09 21:07     ` Stuart Morrow
  0 siblings, 0 replies; 5+ messages in thread
From: Stuart Morrow @ 2022-06-09 21:07 UTC (permalink / raw)
  To: 9front

I don't know anything about printing on Plan 9. I did say assume. But yeah,

> You might have seen that I already tried using a /dev/usb/ep* device
> in my config, but I didn't manage do understand which of the multiple
> dedicated files for the printer I should use or if these are even
> meant to be directly used by me as a user.

is basically my experience with USB on Plan 9, too.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [9front] Re: Printing configuration
  2022-06-05 15:35 [9front] Printing configuration chris
  2022-06-05 17:40 ` Stuart Morrow
@ 2022-06-10  6:09 ` Anthony Martin
  1 sibling, 0 replies; 5+ messages in thread
From: Anthony Martin @ 2022-06-10  6:09 UTC (permalink / raw)
  To: 9front

chris@chrisfroeschl.de once said:
> ; tail -n2 /sys/lib/lp/devices
> homeTS6300wifi	- 192.168.178.82 tcp!192.168.178.82!515	- post+nohead generic generic generic - tcppost -
> homeTS6300usb	- /dev/usb/ep13.1/data - - post+nohead generic nospool - - - -
> ;
>
> I manage to get following error with the wifi printer:
>
> ; lp -dhomeTS6300wifi test.ps
> Jun  5 17:15:15 failed to receive ACK, received <0x1> instead
> Jun  5 17:15:15 failed to receive ACK before sending data
> ;
>
> The printer itself works of course on other operating systems with
> standard manufacturer documentation.
> 515 seems to be the proper port and gives something back when using
> telnet.

Port 515 is for the LPD protocol. By using tcppost, you're trying
to send it RAW/JetDirect data (which is usually handled on port
9100).

And drop the last "-" on each line (the sched field) of your devices
file. You don't need it unless you know you need it.

Cheers,
  Anthony

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-06-10  6:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-05 15:35 [9front] Printing configuration chris
2022-06-05 17:40 ` Stuart Morrow
2022-06-09 13:53   ` chris
2022-06-09 21:07     ` Stuart Morrow
2022-06-10  6:09 ` [9front] " Anthony Martin

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).