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

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.6       jruoho     28:        $ cd foo2zjs
1.5       jruoho     29:        $ gmake
1.4       jruoho     30: 
1.7       jruoho     31: If you have problems with the compilation, check the `Makefile` for odd
1.8       jruoho     32: `CFLAGS` possibly not yet supported by the NetBSD's [[!template id=man
                     33: name="cc" section="1"]].  After having the sources successfully compiled, I
                     34: decided to organize the files to `/usr/local`.  From the compiled sources
                     35: only the following are required:
1.4       jruoho     36: 
1.6       jruoho     37:        # cp foo2qpdl /usr/local/bin
                     38:        # cp foo2qpdl-wrapper /usr/local/bin
                     39: 
                     40:        # cp foo2zjs /usr/local/bin
                     41:        # cp foo2zjs-pstops /usr/local/bin
                     42: 
1.8       jruoho     43: Note the permissions:
1.6       jruoho     44: 
                     45:        # chown root:wheel /usr/local/bin/foo*
                     46:        # chmod 0555 /usr/local/bin/foo*
                     47: 
                     48:        # chown root:wheel /usr/local/share/*
                     49:        # chmod 0444 /usr/local/share/samsung*
1.8       jruoho     50: 
1.9     ! jruoho     51: I used the following as the [PostScript printer
        !            52: description](http://en.wikipedia.org/wiki/PostScript_Printer_Description)
        !            53: (PPD) file. In order to avoid wasting the color toner cartridges, I used two
        !            54: separate files for monochrome and color setup:
        !            55: 
        !            56:        # cd /tmp/foo2zjs/PPD
        !            57:        # cp Samsung-CLP-310.ppd /usr/local/share/samsung-mono.ppd
        !            58:        # cp Samsung-CLP-310.ppd /usr/local/share/samsung-color.ppd
        !            59: 
        !            60:        # chown root:wheel /usr/local/share/*
        !            61:        # chmod 0444 /usr/local/share/samsung*
        !            62: 
        !            63: By default, the used PPD file does not use colors. This was solved by
        !            64: editing the `samsung-color.ppd` file:
        !            65: 
        !            66:        # diff -ur Samsung-CLP-310.ppd /usr/local/share/samsung-color.ppd
        !            67: 
        !            68:        --- Samsung-CLP-310.ppd 2011-03-08 09:01:45.000000000 +0200
        !            69:        +++ samsung-color.ppd   2011-03-12 11:02:17.000000000 +0200
        !            70:        @@ -98,7 +98,7 @@
        !            71:         *OpenUI *ColorMode/Color Mode: PickOne
        !            72:         *FoomaticRIPOption ColorMode: enum CmdLine A
        !            73:         *OrderDependency: 120 AnySetup *ColorMode
        !            74:        -*DefaultColorMode: Monochrome
        !            75:        +*DefaultColorMode: Color
        !            76:         *ColorMode Color/Color: "%% FoomaticRIPOptionSetting: ColorMode=Color"
        !            77:         *FoomaticRIPOptionSetting ColorMode=Color: "-c "
        !            78:         *ColorMode Monochrome/Monochrome: "%% FoomaticRIPOptionSetting:
        !            79:         *ColorMode=Monochrome"
        !            80: 
        !            81: The following network setup was used: one host named `print.lan` was
        !            82: dedicated to forward the printing requests to the printer or `printer.lan`. 
        !            83: This way all hosts inside the LAN can easily use the printer. Two entries
        !            84: were required for the [[!template id=man name="printcap" section="5"]] file:
        !            85: 
        !            86:        # Color (default; just 'lpr').
        !            87:        #
        !            88:        lp|rp:\
        !            89:                :lp=:\
        !            90:                        :rp=lp:\
        !            91:                        :rm=printer.lan:\
        !            92:                :lf=/var/log/lpd-errs:\
        !            93:                :sd=/var/spool/output/lpd:\
        !            94:                :af=/usr/local/share/samsung-color.ppd:\
        !            95:                :if=/usr/pkg/bin/foomatic-rip:\
        !            96:                :mx#0:
        !            97: 
        !            98:        # Monochrome ('lpr -P lpm').  
        !            99:        #
        !           100:        lpm|rpm:\
        !           101:                :lp=:\
        !           102:                :rp=lp:\
        !           103:                :rm=printer.lan:\
        !           104:                :lf=/var/log/lpd-errs:\
        !           105:                :sd=/var/spool/output/lpd:\
        !           106:                :af=/usr/local/share/samsung-mono.ppd:\ 
        !           107:                :if=/usr/pkg/bin/foomatic-rip:\
        !           108:                :mx#0:
        !           109: 
        !           110: Finally, enable [[!template id=man name="lpd" section="8"]] in
        !           111: [[!template id=man name="rc.conf" section="5"]]:
        !           112: 
        !           113:        lpd=YES
        !           114:        lpd_flags="-r -n 2"
        !           115: 
1.8       jruoho    116: TBD.

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