Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > 2052bc5f7fe82568a32997058940156f > files > 74

mtink-1.0.14-14mdv2009.0.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

  <meta http-equiv="content-type"
 content="text/html; charset=ISO-8859-1">

  <meta name="author" content="Jean-Jacques">
  <title>mtink</title>
</head>
  <body bgcolor="White">

<h2>Mtink</h2>
        Mtink is a Status Monitor for EPSON ink jet printer.<br>
 <br>
        With mtink you will be able to display the remaining ink quantity
and   the  state of your printer.<br>
        Operation as <b>check nozzle</b>, <b>clean nozzle</b> and <b>align
 head</b>       are also implemented.<br>
 <br>
        A few printers as the <i>Stylus Color 480</i> and <i>Stylus Color
580</i>        require a peace of software in order to exchange the cartridges.
Mtink knows about the commands needed for this and supports these printers.<br>
 <br>
<h3>Content</h3>
<!-- <a href="#Requirements" target="Requirements">Requirements</a><br>
-->
<a href="#Requirements">Requirements</a><br>
<a href="#Protocol">Mtink and the EPSON communication protocols</a><br>
<a href="#HowToWork">How mtink works</a><br>
<a href="#Internationalization">Internationalization</a><br>
<a href="#cmdLineOptions">The command line options</a><br>
<a href="#mainWindow">The main window</a><br>
<a href="#confWindow">The configuration window</a><br>
<a href="#Align">Head alignment</a><br>
<a href="#Icon">The mini window</a><br>
<a href="#Bugs">Bugs</a><br>
<a href="#SeeAlso">See also</a><br>
<a href="#ToDo">To do</a><br>

<h3><a name="Requirements">Requirements</h3>
        Mtink needs the openMotif, Motif or Lesstif library. In order to
be  compiled    you must make sure that the X development packages and one
of the above  mentioned&nbsp; tool kits are&nbsp; installed (runtime and
development  environment).<br>
 <br>
        Mtink needs a bi-directional communication with the printer.<br>
 <br>

<h4>Linux</h4>
        If you use the parallel port you must make sure that the kernel or
module   (parport*) are correctly configured. On the Kernel 2.2 family the
"CONFIG_PRINTER_READBACK"   parameter (file /usr/src/linux/.config) must be
set to 'y'.<br>
 <br>
        The USB printer port module is buggy for older 2.2 and 2.4 kernels.
 If  you  use the USB port you must get a newer kernel or modify the file
/usr/src/drivers/usb/printer.c.<br>
        These modifications are not complicated. You have to modify the following
    lines:<br>
 <br>

<pre>static ssize_t usblp_read(struct file *file, char *buffer, size_t count, loff_t *ppos)<br>{<br>    struct usblp *usblp = file-&gt;private_data;<br>....<br>    if ((usblp-&gt;readcount += count) == usblp-&gt;readurb.actual_length)<br>        usb_submit_urb(&amp;usblp-&gt;readurb);<br>&nbsp;&nbsp;&nbsp; return count;<br>}<br></pre>
         to:<br>

<pre>static ssize_t usblp_read(struct file *file, char *buffer, size_t count, loff_t *ppos)<br>{<b><br>    </b>struct usblp *usblp = file-&gt;private_data;<br>....<br>    if ((usblp-&gt;readcount += count) == usblp-&gt;readurb.actual_length) <b><font
 color="#ff0000">{<br>          usblp-&gt;readcount = 0;<br>          usblp-&gt;readurb.dev = usblp-&gt;dev;</font></b>
          usb_submit_urb(&amp;usblp-&gt;readurb);<br>          return count;<br>    <b><font
 color="#ff0000">}</font></b>
}</pre>
        The modifications are in red and bold letters. <br>

<h4>Solaris</h4>
       I don't own a Sparc station which allows a bi-directional communication
  with  the attached printer, so I am not able to test mtink under Sparc Solaris.<br>
       Newer workstation are equipped with an ecpp compliant port and will
 allow   a bi-directional communication. If you own such a workstation and
 an EPSON&nbsp; ink jet printer, inform me about the results.<br>
 <br>

<h3><a name="Protocol">Mtink and the EPSON communication protocols</h3>
       A new communication protocol was created by EPSON as the Stylus Color
  740  and Stylus Scan appears on the market. This protocol (<b>D4</b>) is
 based  on the <b>IEEE 1284.4</b> 1.5 draft and allows a communication about
 different  logical channels. The major advantage is that a program can query
 or send  special command about the <i>control </i>channel even if the printer
 is busy  (printing).<br>
       This allows also to share a port for different devices (printer and
 scanner).<br>
 <br>
       The implementation of the D4 protocol seems to be very incomplete
for  older   printer and is also not free of bugs for<br>
       newer printer as the Stylus Photo 890 (my own EPSON printer).<br>
 <br>
       The <b>D4</b> protocol requires that the printer knows at least a
few  part   of the<b> EJL</b> (Epson Job Language) language. The most important
 Commands   are the <i>Exit from D4 mode</i> command and is known by all
printers which  support the <b>D4</b> communication protocol and<br>
       the <i>Get ID</i> command which tells the printer that a few information
   (model, designation, supported language) are returned.<br>
       The <i>Get ID</i> command is apparently not supported by the Stylus
 Scan   2500 and probably the&nbsp; Stylus Scan 2000 or by the Stylus Cxxx<br>
       family which needs the <b>D4</b> pendant of  <i>Get ID</i>.<br>
 <br>
       The old way to get information about the printer state is to use the
 EPSON<b>     REMOTE</b> commands. These commands are<br>
       also implemented on new printers.<br>
 <br>
       Mtink knows about the different protocols, but the author doesn't
know  exactly   the capabilities for each printer delivered by<br>
       EPSON. Due to this lack of knowledge, some printer will not do what
 mtink   expects, however you can easily make the<br>
       required modifications.<br>
 <br>
       The printer capability description is situated at the begin of the
file   model.c. The most important fields are the protocol<br>
       field and the id field. The protocol field must contain one of the
next   word:<br>

<ul>
   <li>PROT_OLD &nbsp; The printer doesn't know anything about the D4 protocol.
     </li>
   <li>PROT_NEW &nbsp;The printer has a minimal implementation of the <b>
 D4</b>       protocol,&nbsp;<i>Exit from D4 mode </i>is needed.</li>
   <li>PROT_D4 &nbsp; &nbsp; &nbsp; The printer supports the <b>D4</b> protocol
   &nbsp;in the major aspects.</li>

</ul>
       If the device doesn't answer to the <i>get ID</i> command (<b>EJL</b>
  and   <b> D4</b> versions) you will probably have problems if these commands
 are   send to the printer. Querying the printer will be disabled id the
id  field   contain <i>False</i> instead of <i>True</i><br>

<pre>/*   name               colors <font color="#ff0000">prot</font>      state exch.  e.sep  cl sep <font
 color="#ff0000">reset</font>             <font color="#ff0000">id </font>  */<br>   { "Stylus C20SX",         4,<font
 color="#ff0000">PROT_D4</font>,  True, False, False, True,  PROT_D4,          <font
 color="#ff0000">True</font>, 3, 15, 2, 9, NULL },<br>   { "Stylus Color",         4,<font
 color="#ff0000">PROT_OLD</font>, True, False, False, False, PROT_OLD,         <font
 color="#ff0000">True</font>, 1,  7, 0, 0, NULL },<br>   { "Stylus Photo 750",     6,<font
 color="#ff0000">PROT_NEW</font>, True, False, False, False, PROT_NEW,         <font
 color="#ff0000">True</font>, 3, 15, 0, 0, NULL },<br>   { "Stylus Scan 2500",     4,<font
 color="#ff0000">PROT_D4</font>,  True, False, False, False, PROT_OLD|PROT_D4, <font
 color="#ff0000">False</font>,3, 15, 0, 0, NULL },<br><br></pre>
       In the data extracted from the model.c file you can see that the <i>
 Stylus    Scan 2500</i> don't deliver information about it identity but
need the <b>     D4</b> protocol. The &nbsp;<i>Stylus Photo 750</i> is one
of the first   generation  of <b>D4</b> able printer, the communication will
only be OK  if  the <i>Exit  from D4</i> command is prepended to the needed
<b>REMO</b><b> TE</b> command.  The Stylus Color is a very old printer and
don't know anything  about the <b> D4</b> protocol. Finally the <i>Stylus
C20SX</i> needs the D4  protocol (the old <i>Get ID</i> don't work).<br>
 <br>
       Correction of the mentioned fields will allow you to get mtink working
  with  your printer. Please inform me about success and change of the file
 model.c.<br>
 <br>
  See also the gimp-print documentation about the commands:<br>
 <a href="http://gimp-print.sourceforge.net">http://gimp-print.sourceforge.net</a>
 <br>
 <br>

<h3><a name="HowToWork">How mtink works</h3>
       At the first time you call mtink, you will be asked for the device
file   and the printer. After these question the printer knowledge data are
loaded   and if the <i>id</i> field set to <i>True</i>, mtink will try to
detect if  you inputs are correct and load the data for an other printer if
your choice  was not correct. Finally the configurations (printer model and
port) are put into the file<b> $HOME/.mtink</b>.<br>
       If you call mtink again the configuration file is read and a check
for   the  attached printer will occur if the printer is declared as<br>
 <i>"id able"</i>.<br>
       Deleting the file <b>$HOME/.mtink</b> will<i> reset</i> mtink to the
 first .<br>
 <br>
       Mtink is separated in two parts which communicate via a shared memory.
  This  allows to perform refresh for the X-part of the program and avoid
miss functions   of the <i>printer code</i> due to the X-environment (timer,
interrupts,...).<br>
 <br>
       The X-part is not build as common X programs. Mtink contain different
 XEvents  loop in order to make the job easier. Each sub window has a own
loop  and the  called callback function return only if the loop of the sub
mask return. This  allows return of<br>
       values to the caller. Calling of the printer interface uses a similar
mimic.<br>

<h3><a name="Internationalization">Internationalization</h3>
 Mtink can be internationalized in a very easy way. Actually mtink knows
 English,  French, Italian, German and a few words of Turkish. You can add
  your language  if you edit the file Mtink.res and copy them to your home
 directory as EpsonUtil.<br>
       The resource name for your language are derived from the variable
LANG,   LC_ALL and LC_MESSAGE. If for example the environment variable LANG
contain   fr_FR, mtink expects to found the resources which begin with as
EpsonUtil.Fr   (first letter capitalized, and second letter as found in the
environment  variable).<br>
       If the searched resource is not found, the default will be English.<br>
 <br>
  Example:<br>

<pre>!!! default font for English and European languages<br>EpsonUtil*title_LB.fontList:&nbsp;&nbsp;&nbsp; *-helvetica-*-r-normal--14-*-*-*-*-*-iso8859-1<br>EpsonUtil*fontList:&nbsp;&nbsp;&nbsp;    *-helvetica-medium-r-normal-*-12-*-*-*-*-*-iso8859-1<br>!!! set the font required for turkish<br>EpsonUtil.Tr*title_LB.fontList: *-helvetica-*-r-normal--14-*-*-*-*-*-iso8859-9<br>EpsonUtil.Tr*fontList:    *-helvetica-medium-r-normal-*-12-*-*-*-*-*-iso8859-9<br>....<br>!!! The default (english)<br>EpsonUtil*previous_PB.labelString:    Previous<br>!!! and the&nbsp;texts for german, french, italian and turkish<br>EpsonUtil.De*previous_PB.labelString: Zur&uuml;ck<br>EpsonUtil.Fr*previous_PB.labelString: pr&eacute;c&eacute;dent<br>EpsonUtil.It*previous_PB.labelString: Informazioni<br>EpsonUtil.Tr*previous_PB.labelString: Geri<br></pre>
  If want to provide translation, send me back your work. Please insert also
in the about your name, email address, url as you want.<br>
 <br>

<h3><a name="cmdLineOptions">The command line options</h3>
 Passing option to mtink is normally not necessary. If mtink is to be displayed
on a different computer as the computer where the printer is attached you
will have to state the display name e.g. <i>mtink -display computerName:0</i>
.<br>
 It is not necessary in this case that a X server is working on the printer
server.<br>
 You may also start mtink via ssh or rsh if available:<br>
 <i>ssh serverName /home/jj/mtink/mtink -display workStationName:0</i><br>
 You can also tell which language is to be used<br>
 <i>ssh serverName LANG=fr /home/jj/mtink/mtink -display workStationName:0</i><br>
 will set mtink for output with french texts.<br>
 Please take in account that all browser will not work as expected. <br>
 The automatic printer detection can be disabled by launching mtink with
the option <i>-noAutoDetect</i>.
<p> <b>Mtink</b> support also more printer on the same time. The option <b><i>
-config &lt;configuration number&gt;</i></b> allow to read / save the configuration
datas from / to different files.<br>
 If <i>&lt;configuration number&gt;</i> is 0 or no <i>-config &lt;configuration
number&gt;</i> is given, the file ~/.mtinkrc is used. If <i>&lt;configuration
number&gt;</i> is not 0 the file name will be appended with "<i>.&lt;configuration
number&gt;</i>". <br>
 </p>
<h3><a name="mainWindow">The main window</h3>
 <img src="mtink.gif" alt="mtink main window" align="top">
 <br>
 <br>
       At the top of the windows you will see the printer which was detected
  or  given at configuration time, here the Stylus Scan 2500.<br>
       The remaining ink quantity is displayed as well as in graphic form
as  a text. The number of displayed scales<br>
  depends on the printer.<br>
       The printer state may contain a few information about the internal
state    of the printer e.g. printing (the printer is busy).<br>
       The buttons below the State line allow the choice of the work to be
performed,   the last button is not active if the printer doesn't support
(require) the cartridge exchange function.<br>
       The buttons at the bottom allows to see a few information about  mtink
 (about) or to leave mtink (exit). The Help button allows you to see  this
document.<br>
 <br>

<h3><a name="confWindow">The configuration window</h3>
 <img src="configure.gif" alt="mtink configuration window" align="top">
 <br>
 <br>
 You can choose which browser is to be used in order to display the html
help file and tell mtink that an automatic detection at launching is to be
performed (default).<br>
 <br>
 <b>Choosing a browser:</b><br>
 You can type the browser name into the input field or push the <b>[ ...
]</b> pushbutton and select the browser via the file selection box which
will be popped up.<br>
 <br>
 Mtink knows about the command line options required by a few browser (Netscape,
Mozilla and Galeon) and start them accordingly. Other browser as Konqueror,
Gnome-help-browser or Opera don't need special options and can also be used.<br>
 <br>
 Some browser will not work if the corresponding desktop is not used. The
better choice is in this case a browser as Netscape, Mozilla, Galeon or opera
which are not dependent from a particular desktop as KDE (an OS above the
OS which has at this time a very great bug, there are no blue screens).<br>
<br>
 <b>Automatic detection:</b><br>
 The check button <i>allow automatic detection</i> can be toggled. In the
automatic detection mode, mtink will try to identify the attached printer.
If your printer is an older model as the Stylus Color 400 / 600, ... and
the printer was not recognized after the first attempt, mtink will try to
send a code which will cause printing of a few characters. A further advantage
of disabling the automatic detection is that the start will be a little bit
faster but if you attach an other EPSON printer to your computer you may
get problems. <br>
 After you have modified the settings you must save them. The data are written
in the file $HOME/.mtinkrc.  <br>

<h3><name="Align">Head alignment</h3>
 Mtink allows to align the head.This feature is dependent of the printer
model and the window appearance may differ a little bit from model to model.<br>
 Some printer as the Stylus Color 480 and 580 require separate alignment
for the color and black head. Accordingly the main window will show toggle
buttons for selecting of the head. Another difference is that the number
of sample print is different (8 or 15). The number of passes may also differ
from printer model to printer model.<br>
 I can't guaranty that the code send to the printer is always good. If you
use this, this is at your own risk.<br>
<br>

<table>
 <tbody>
    <tr align="left " valign="top">
  <td><img src="align1.gif" alt="mtink alignment first window"
 border="0">
      </td>
  <td><img src="align2.gif" alt="mtink alignment wait window" border="0">
      </td>
 </tr>
 <tr align="left " valign="top">
  <td>mtink alignment first window</td>
  <td>mtink alignment wait window</td>
 </tr>
 <tr align="left " valign="top">
 </tr>
    <tr align="left " valign="top">
  <td><img src="align3.gif" alt="mtink alignment setup window"
 border="0">
      </td>
  <td><img src="align4.gif" alt="mtink alignment last window" border="0">
      </td>
 </tr>
  <tr>
      <td>mtink alignment setup window</td>
  <td>mtink alignment last window</td>
 </tr>

  </tbody>
</table>
 <br>
 The second and third windows shown above will be displayed up to three times
(depend on printer model).<br>

<h3><a name="Icon">The mini window</h3>
This window will only be displayed if the server <b>mtinkd</b> is running or
the rc file <i>.mtinkrc</i> contain the path "/var/lib/mtink/...".<br>
<img src="micon.gif"><p>
This little window will be displayed with a green (All is OK), orange
(Ink quantity less as 10 %) or red background (Printer not available or 
ink quantity less a 5 %).<br>
Pressing on the window with the left mouse button popup/popdown the
Mtink main Window.<br>
This window can be positionned on the screen while pressing the right
pushbutton and the moving the mouse.<br>
The last position is writting to the file <i>~/.mtinksess[.configuration number></i>
if mtink is closed via the <i>ALT + F4</i> key combination or by closing the
window via the window manager menu for the mtink main window. 

<h3><a name="Bugs">Bugs</h3>
       Probably a lot.<br>

<h3><a name=SeeAlso>See also</h3>
    <a href="index.html"><b>Index</b></a><br>
    <a href="mtinkd.html"><b>mtinkd the server for D4 able printers</b></a><br>
    <a href="mtinkc.html"><b>minkc the chooser for owner of more EPSON printers</b></a><br>
    <a href="ttink.html"><b>ttink a tty based status monitor</b></a>
    <br>
    <br>

<h3><a name"=ToDo">To do</h3>

<ul>
   <li>Better documentation.</li>
   <li>Translation of the documentation.</li>
   <li>Test with more printers.</li>
   <li>....</li>

</ul>

<h3>Author</h3>
       Jean-Jacques Sarton<br>
 <a href="mailto:jj.sarton@t-online.de"> jj.sarton@t-online.de</a> <br>
 <a href="http://xwtools.automatix.de"> Xwtools Home Page</a> <br>
 <br>

</body>
</html>