Annotation of wikisrc/users/jruoho/clp-315w.mdwn, revision 1.10

1.1       jruoho      1: # Samsung CLP-315W on NetBSD
                      2: 
1.2       jruoho      3: Samsung
                      4: [CLP-315W](http://www.amazon.com/Samsung-CLP-315W-Color-Laser-Printer/dp/B001BXS45I)
1.3       jruoho      5: is a low-end color laser printer, featuring USB, Ethernet, and wireless
                      6: access. It works on NetBSD. A brief HOWTO follows.
                      7: 
1.5       jruoho      8: For initial configuration, I used a NetBSD host and standard [[!template
                      9: id=man name="dhcpd" section="8"]].  The printer provides its own HTTP server
                     10: from which all standard configuration options are available.  Also IEEE
                     11: 802.11 worked with a NetBSD router.  But unfortunately, a local host is
                     12: still required as the printer only speaks a non-standard format language.
1.4       jruoho     13: 
                     14: The so-called
                     15: [foomatic](http://www.linuxfoundation.org/collaborate/workgroups/openprinting/databasefoomatic)
1.5       jruoho     16: is a prerequisite. This is available from [[!template id=man name="pkgsrc"
1.4       jruoho     17: section="7"]]:
                     18: 
1.5       jruoho     19:        # cd /usr/pkgsrc/foomatic-filters
                     20:        # make install package clean
1.4       jruoho     21: 
1.3       jruoho     22: Samsung uses a special QPDL wire protocol, supported by
1.5       jruoho     23: [foo2qpdl](http://foo2qpdl.rkkda.com/). For installation, fetch the
                     24: sources and compile:
1.3       jruoho     25: 
1.6       jruoho     26:        $ cd /tmp
1.5       jruoho     27:        $ ftp http://foo2zjs.rkkda.com/foo2zjs.tar.gz
1.10    ! jruoho     28:        # tar xvfz foo2zjs.tar.gz
1.6       jruoho     29:        $ cd foo2zjs
1.5       jruoho     30:        $ gmake
1.4       jruoho     31: 
1.7       jruoho     32: If you have problems with the compilation, check the `Makefile` for odd
1.8       jruoho     33: `CFLAGS` possibly not yet supported by the NetBSD's [[!template id=man
1.10    ! jruoho     34: name="cc" section="1"]].  After having the sources successfully compiled,
        !            35: the required files were organized to `/usr/local`. From the compiled
        !            36: sources only the following are required:
        !            37: 
        !            38:        # mkdir -p /usr/local/bin
1.4       jruoho     39: 
1.6       jruoho     40:        # cp foo2qpdl /usr/local/bin
                     41:        # cp foo2qpdl-wrapper /usr/local/bin
                     42: 
                     43:        # cp foo2zjs /usr/local/bin
                     44:        # cp foo2zjs-pstops /usr/local/bin
                     45: 
1.8       jruoho     46: Note the permissions:
1.6       jruoho     47: 
                     48:        # chown root:wheel /usr/local/bin/foo*
                     49:        # chmod 0555 /usr/local/bin/foo*
                     50: 
1.9       jruoho     51: I used the following as the [PostScript printer
                     52: description](http://en.wikipedia.org/wiki/PostScript_Printer_Description)
1.10    ! jruoho     53: (PPD) file. In order to avoid wasting the color toner cartridges, two
        !            54: separate files for monochrome and color setup were used:
        !            55: 
        !            56:        # mkdir -p /usr/local/share
1.9       jruoho     57: 
                     58:        # cd /tmp/foo2zjs/PPD
                     59:        # cp Samsung-CLP-310.ppd /usr/local/share/samsung-mono.ppd
                     60:        # cp Samsung-CLP-310.ppd /usr/local/share/samsung-color.ppd
                     61: 
                     62:        # chown root:wheel /usr/local/share/*
                     63:        # chmod 0444 /usr/local/share/samsung*
                     64: 
                     65: By default, the used PPD file does not use colors. This was solved by
                     66: editing the `samsung-color.ppd` file:
                     67: 
                     68:        # diff -ur Samsung-CLP-310.ppd /usr/local/share/samsung-color.ppd
                     69: 
                     70:        --- Samsung-CLP-310.ppd 2011-03-08 09:01:45.000000000 +0200
                     71:        +++ samsung-color.ppd   2011-03-12 11:02:17.000000000 +0200
                     72:        @@ -98,7 +98,7 @@
                     73:         *OpenUI *ColorMode/Color Mode: PickOne
                     74:         *FoomaticRIPOption ColorMode: enum CmdLine A
                     75:         *OrderDependency: 120 AnySetup *ColorMode
                     76:        -*DefaultColorMode: Monochrome
                     77:        +*DefaultColorMode: Color
                     78:         *ColorMode Color/Color: "%% FoomaticRIPOptionSetting: ColorMode=Color"
                     79:         *FoomaticRIPOptionSetting ColorMode=Color: "-c "
                     80:         *ColorMode Monochrome/Monochrome: "%% FoomaticRIPOptionSetting:
                     81:         *ColorMode=Monochrome"
                     82: 
                     83: The following network setup was used: one host named `print.lan` was
                     84: dedicated to forward the printing requests to the printer or `printer.lan`. 
                     85: This way all hosts inside the LAN can easily use the printer. Two entries
                     86: were required for the [[!template id=man name="printcap" section="5"]] file:
                     87: 
                     88:        # Color (default; just 'lpr').
                     89:        #
                     90:        lp|rp:\
                     91:                :lp=:\
                     92:                        :rp=lp:\
                     93:                        :rm=printer.lan:\
                     94:                :lf=/var/log/lpd-errs:\
                     95:                :sd=/var/spool/output/lpd:\
                     96:                :af=/usr/local/share/samsung-color.ppd:\
                     97:                :if=/usr/pkg/bin/foomatic-rip:\
                     98:                :mx#0:
                     99: 
                    100:        # Monochrome ('lpr -P lpm').  
                    101:        #
                    102:        lpm|rpm:\
                    103:                :lp=:\
                    104:                :rp=lp:\
                    105:                :rm=printer.lan:\
                    106:                :lf=/var/log/lpd-errs:\
                    107:                :sd=/var/spool/output/lpd:\
                    108:                :af=/usr/local/share/samsung-mono.ppd:\ 
                    109:                :if=/usr/pkg/bin/foomatic-rip:\
                    110:                :mx#0:
                    111: 
1.10    ! jruoho    112: The clients can access the `print.lan` host by using:
        !           113: 
        !           114:        # We have a CNAME record for the printer host inside LAN.
        !           115:        #
        !           116:        lp|rp|remote printer:\
        !           117:                :lp=:\
        !           118:                :rp=lp:\
        !           119:                :rm=print.lan:\
        !           120:                :sd=/var/spool/output/lpd:\
        !           121:                :lf=/var/log/lpd-errs:
        !           122: 
        !           123: 
1.9       jruoho    124: Finally, enable [[!template id=man name="lpd" section="8"]] in
                    125: [[!template id=man name="rc.conf" section="5"]]:
                    126: 
                    127:        lpd=YES
                    128:        lpd_flags="-r -n 2"
                    129: 
1.10    ! jruoho    130: The output quality is relatively good. There are no visible differences
        !           131: compared to the output with Windows and Samsung's own drivers.

CVSweb for NetBSD wikisrc <wikimaster@NetBSD.org> software: FreeBSD-CVSweb