1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370
|
<!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 tool kits are 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->private_data;<br>....<br> if ((usblp->readcount += count) == usblp->readurb.actual_length)<br> usb_submit_urb(&usblp->readurb);<br> 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->private_data;<br>....<br> if ((usblp->readcount += count) == usblp->readurb.actual_length) <b><font
color="#ff0000">{<br> usblp->readcount = 0;<br> usblp->readurb.dev = usblp->dev;</font></b>
usb_submit_urb(&usblp->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 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 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 The printer doesn't know anything about the D4 protocol.
</li>
<li>PROT_NEW The printer has a minimal implementation of the <b>
D4</b> protocol, <i>Exit from D4 mode </i>is needed.</li>
<li>PROT_D4 The printer supports the <b>D4</b> protocol
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 <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: *-helvetica-*-r-normal--14-*-*-*-*-*-iso8859-1<br>EpsonUtil*fontList: *-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 texts for german, french, italian and turkish<br>EpsonUtil.De*previous_PB.labelString: Zurück<br>EpsonUtil.Fr*previous_PB.labelString: précé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 <configuration number></i></b> allow to read / save the configuration
datas from / to different files.<br>
If <i><configuration number></i> is 0 or no <i>-config <configuration
number></i> is given, the file ~/.mtinkrc is used. If <i><configuration
number></i> is not 0 the file name will be appended with "<i>.<configuration
number></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/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>
|