Merge branch 't42'
[safeq] / README
1 Goal is to write replacement SafeQ using cups and samba
2
3 For now, first goal is to support SafeQ terminal protocol so we can re-use devices not supported
4 by vendor any more. We are also annoyed by SafeQ "feature" which doesn't allow us to use scanning
5 if Xerox runs out of toner. This is arbitrary limitation which cripples this setup for us.
6
7
8 ./debian-install.sh             # will install required Debian packages
9
10
11 We have old Xerox WorkCentre 5225 and 7232 machines (from 2008) and getting active jobs or
12 history is supported by web interface which is scraped and javascript variables inside
13 used to display info.
14
15 ./xwc-jobs.pl 10.60.3.35                # list active jobs on Xerox WorkCentre 5225 by scraping web
16 ./xwc-jobs.pl 10.60.3.35 list
17
18 ./xwc-jobs.pl 10.60.3.35 hist   # list completed jobs
19
20 Script produces tab delimited output, but if you want to format it nicely you can always use
21 SEP enviroment variable to specify sparator and column to format it. This is included in
22 xwc-jobs helper shell script which is useful for interactive use:
23
24 dpavlin@t42:~/safeq$ ./xwc-jobs 10.60.3.35
25 IP          id        Job Name   Owner       Status         Type     Quantity
26 10.60.3.35  00015c2c  -          10.60.3.10  3:User Action  1:Print  0
27 10.60.3.35  00015c2f  Test Page  root        3:User Action  1:Print  0
28 10.60.3.35  00015c32  -          10.60.3.10  3:User Action  1:Print  0
29
30
31 You can delete job using:
32
33 dpavlin@t42:~/safeq$ curl -XPOST -d OPR=CANCEL -d JOBS=00015c32/ http://10.60.3.35/JOBCTRL.cmd
34
35 or use d[elete] or c[ancel] aruguments and job id(s):
36
37 dpavlin@t42:~/safeq$ ./xwc-jobs 10.60.3.35 d 00015c41
38 10.60.3.35  00015c41  CANCEL  REQUEST: ACCEPTED
39
40
41 We would like to have nice job name and user info on Xerox, so I tested how to send data
42 using various protocols:
43
44 dpavlin@t42:~/safeq$ lpstat -v
45 device for ipp: ipp://10.60.3.35/ipp
46 device for XWC5225-5KatL: socket://10.60.3.35
47
48 dpavlin@t42:~/safeq$ lpr -Pipp -U lpr-U1 -C lpr-C1 -J lpr-J1 -T lpr-T1 /usr/share/doc/printer-driver-foo2zjs/manual.pdf
49
50 dpavlin@t42:~/safeq$ lpr -PXWC5225-5KatL -U lpr-U2 -C lpr-C2 -J lpr-J2 -T lpr-T2 /usr/share/doc/printer-driver-foo2zjs/manual.pdf
51
52 dpavlin@t42:~/safeq$ rlpr -H 10.60.3.35 -U rlpr-U -C rlpr-C -J rlpr-J -T rlpr-T /usr/share/doc/printer-driver-foo2zjs/manual.pdf
53
54 And results are *VERY* different:
55
56 dpavlin@t42:~/safeq$ ./xwc-jobs
57 IP          id        Job Name  Owner       Status             Type     Quantity
58 10.60.3.35  00015c65  lpr-T1    lpr-U1      1:Printing...      1:Print  0
59 10.60.3.35  00015c68  -         10.60.3.10  0:Printing - wait  1:Print  0
60 10.60.3.35  00015c6b  rlpr-J    rlpr-U      0:Printing - wait  1:Print  0
61
62 So, it seems that we can't tranfer job name or owner through caps and socket connection.
63
64
65 Next problem is pesky banner pages which Xerox insists on printing using default cups
66 drivers for it. Solution might be to use ppd files from Xerox, but they reference filter
67 which doesn't exist and assume that postscript is supported on device which isn't the case
68 for us. However, we can migrate option to disable banner to working ppd:
69
70
71 *JCLOpenUI *JCLBanner/Banner Sheet: Boolean
72 *OrderDependency: 10.0 JCLSetup *JCLBanner
73 *DefaultJCLBanner: False
74 *JCLBanner False/Disabled: "@PJL SET JOBATTR=<22>@BANR=OFF<22><0A>"
75 *JCLBanner True/Enabled: "@PJL SET JOBATTR=<22>@BANR=START<22><0A>"
76 *JCLCloseUI: *JCLBanner
77
78
79 This will use more-or-less undocumented option @BANR to turn it off. Only reference to
80 this option is in Xerox document "PDL Reference Guide for the Phaser 6510/WC 6515 Series"
81