<!doctype linuxdoc system>
	
<!-- 	$Id: easypen-install.fr.m4,v 1.4 2002/08/16 02:53:46 gilles Exp $	 -->

<!-- Bienvenue dans le monde SGML et m4 -->
<!--


-->
<article>
<titlepag>
<title>Installation d'une tablette graphique Genius EasyPen sous Linux</title>
<author>
<name>
<htmlurl 
	name="Gilles Lamiral" 
	url="mailto:lamiral@linux-france.org?subject=easypen 0.01">
</name>
</author>

<date>
$Revision: 1.4 $
$Date: 2002/08/16 02:53:46 $
</date>

<abstract> Comment installer et configurer une tablette graphique
Genius EasyPen sous GNU/Linux, tout en gardant sa souris habituelle.
</abstract>
</titlepag> 
<toc>

<p>
Version générée le  Vendredi 16 août 2002

<#if output="html">
<p>
<htmlurl name="Index de la documentation" url="../">
</#if>

Vous trouverez la dernière version de ce document, écrit par
<htmlurl 
	name="Gilles Lamiral" 
	url="mailto:lamiral@linux-france.org?subject=easypen 0.01">, à l'adresse : <newline> <tt><htmlurl
url="http://www.linux-france.org/article/materiel/easypen/"></tt>

Ce document, écrit en SGML, peut être disponible en plusieurs formats:
<!-- generated with ./bin/formatav.pl easypen-install.fr -->
<!-- Date    : Fri Aug 16 06:26:39 2002 -->
<htmlurl url="../sgml/easypen-install.fr.sgml" name="SGML">
Info
PDF
HTM
TeX
LyX
PostScript
ASCII
HTML
Man <!-- End of  ./bin/formatav.pl easypen-install.fr -->
 (à la convenance de
l'administrateur du site).

<!-- 
 -->

<sect>Introduction
<p>

J'ai récemment acheté une tablette graphique EasyPen à pas cher (35
euros, 230 Frc). Évidemment, la documentation ne cause pas de linux. En
fait, je n'ai même pas cherché dans la boite (cdrom, disquette) puisque
linux n'y est pas mentionné. J'ai cherché sur la toile pour trouver des
renseignements. Comme ce fut un peu difficile, j'ai écrit ce document
pour vous économiser un dur labeur, voir un abandon.

<sect>Historique de ce document
<p>

<verb>
$Log: easypen-install.fr.m4,v $
Revision 1.4  2002/08/16 02:53:46  gilles
man XF86Config-v3

Revision 1.3  2002/08/16 02:15:59  gilles
SGML tag htmlurl -> url

Revision 1.2  2002/08/16 00:50:16  gilles
genius

Revision 1.1  2002/08/16 00:44:44  gilles
Initial revision

</verb>

<sect>Liens utiles
<p>

Configurations XFree et gpm :<newline>
<url url="http://www.genius.kye.de/english/service/hlp06.htm"><newline>
<url url="http://www.kye.de/service/faq/tuxtablet.htm">

Pilotes XFree:<newline>
<url url="http://www.hof-berlin.de/tablet/download.html"><newline>

Description technique :<newline>
<url url="http://www.kye.co.uk/Product%20Pages/easypen.htm"><newline>

Port série :<newline>
<url url="http://www.tldp.org/HOWTO/Serial-HOWTO.html"><newline>

<sect>Port Série
<p>

Il vous faut trouver un port série de libre et une irq de libre sur
votre machine.  Rappel:
<verb>
COM1 -> /dev/ttyS0
COM2 -> /dev/ttyS1
COM3 -> /dev/ttyS2
COM4 -> /dev/ttyS3
</verb>

Il importe de connaitre l'adresse du port série afin d'utiliser
<tt>setserial</tt>

Détection des ports série par le noyau:
<verb>
$ dmesg |grep ttyS
ttyS00 at 0x03f8 (irq = 4) is a 16550A
ttyS01 at 0x02f8 (irq = 3) is a 16550A
ttyS02 at 0x03e8 (irq = 4) is a 16550A
</verb>

Les adresses 0x03f8, 0x02f8 ..., sont des valeurs par défaut dans le
noyau linux. Vous devez connaître celle de votre port série si elle est
différente (en général, ce sont les mêmes).

Pour exemple, prenons exemple ttyS02 comme port série. 

Regardons les valeurs par défaut:
<verb>
$ setserial /dev/ttyS2
/dev/ttyS2, UART: 16550A, Port: 0x03e8, IRQ: 4
</verb>

Si vous avez un message du type <tt>UART: unknown</tt>, c'est que le
noyau ne l'a pas détecté à l'adresse (port) en question. C'est mauvais
pour vous.

Configurons le :
<verb>
$ setserial /dev/ttyS2 uart 16550A port 0x03e8 \
            baud_base 115200 spd_normal skip_test auto_irq
</verb>

Vérifions le:
<verb>
$ setserial /dev/ttyS2
/dev/ttyS2, UART: 16550A, Port: 0x03e8, IRQ: 5
</verb>

Vous remarquez que l'irq est passée à 5.

Testons le port série:
<verb>
cat /dev/ttyS2 | od 
0000000 033230 043013 114005 005424 002524 070630 064412 114005
0000020 005121 003001 033230 013412 114006 005040 003052 007630
0000040 035012 114006 005003 003103 075630 043011 114006 004566
...
</verb>

En bougeant le stylet, vous devez voir plein de chiffres apparaître.
Si vous avez une sortie du type : 
<verb>
cat /dev/ttyS2 | od 
cat: /dev/ttyS2: Input/output error
0000000
</verb>

C'est que le port série est mal configuré.

<sect>gpm
<p>


Dans une console, lancer gpm avec les options suivantes<verb>
$ /usr/sbin/gpm -m /dev/ttyS2 -t genitizer
</verb>

Le stylet bouge alors le curseur sur l'écran. C'est beau la technique !
(quand ça marche).

Vous pouvez utiliser gpm avec la souris et le stylet (man gpm : option
-M) mais X window n'est plus très agréable à utiliser (il pédale).

<sect>XFree3.3.x avec x>=2
<p>

Vous récupérez le pilote xf86Summa.so

<verb>
mkdir -p /usr/X11R6/lib/modules/
cp xf86Summa.so /usr/X11R6/lib/modules/xf86Summa.so
</verb>

Sauvegarder votre ancien fichier de configuration de X Window.
<verb>
cp /etc/X11/XF86Config /etc/X11/XF86Config.good
</verb>

Ensuite ajouter les lignes suivantes. Normalement, les sections existent
déjà :
<verb>
# /etc/X11/XF86Config
#
Section "Files"
    ModulePath "/usr/X11R6/lib/modules"
EndSection

Section "Module"
   Load "xf86Summa.so"
EndSection

Section "XInput"
   SubSection "SummaSketch"
       Port "/dev/ttyS2"
       DeviceName "EasyPen" 
       Mode Absolute
       Cursor Stylus
       Compatible
       AlwaysCore
   EndSubsection 
EndSection
</verb>


Il faut lancer gpm (voir section précédente) avant de lancer X Window.
Testons maintenant le serveux X :
<verb>
X :1 # puis Ctrl-Alt-BackSpace pour l'enlever
</verb>

Le pointeur X doit toujours répondre à la souris. Il doit aussi répondre
au stylet de la tablette quand il est activé, c'est à dire quand il est
proche de la tablette.

Bravo.

<sect>man XF86Config-v3
<p>

Je ne resiste pas à l'idée de vous faire lire la partie du manuel de
XF86Config concernant les tablettes SummaSketch.

<verb>
       The SummaSketch subsection support the following entries:

               Port "path"
                   sets  the  path  to  the  special  file  which
                   represents the device driver.

               DeviceName "name"
                   sets the name of the X device.

               Mode Relative|Absolute
                   sets the mode of the device.

               Cursor Stylus|Puck
                   sets the cursor type, stylus or 4 button puck.

               Increment value
                   sets  the minimum change in coordinates before
                   new report.

               HistorySize number
                   sets the motion history size. By  default  the
                   value is zero.

               Compatible
                   prevents  the  driver from asking the firmware
                   id of the tablet  to  enable  some  compatible
                   tablet to work (like the Numonics GridMaster).

               AlwaysCore
                   enables the sharing of the core pointer.  When
                   this  feature is enabled, the device will take
                   control of the core  pointer  (and  thus  will
                   emit core events) and at the same time will be
                   able,  when  asked  so,  to  report   extended
                   events.   You can use the last available inte­
                   ger feedback to control this feature. When the
                   value  of the feedback is zero, the feature is
                   disabled. The feature is enabled for any other
                   value.

               Resolution value
                   Sets  tablet  resolution.  Choose a value from
                   below:

                   lpi:    1 2 4 100 200 254  400  500  508  1000
                   1016

                           2000 2032 2540

                   lpmm:   10 20 40

                   Any other value, or if this option is not pro­
                   vided, will default to  500  lpi.   Note  that
                   "2540  lpi"  is only available for the SummaS­
                   ketch 12x12 tablet, and the Summa MM mode  can
                   restrict  reported maximum coordinate value to
                   be 16384, which means the higher  the  resolu­
                   tion, the smaller the usable tablet surface.
               ActiveOffset x y
                   Where  "x  y"  are  in units of inches, to two
                   decimal places (e.g.  0.25  0.25).   Sets  the
                   upper  left  corner  of  active area, from the
                   upper  left  corner   of   tablet's   surface.
                   Default is no offset.

               ActiveArea x y
                   Where  "x  y"  are  in units of inches, to two
                   decimal  places  (e.g.  15.75  11.75).    Sets
                   desired  sub-area  on  tablet to use.  Default
                   is: maximum tablet area minus  any  ActiveOff­
                   sets,  then  map  display  screen to tablet to
                   find maximum usable area.  Except for  tablets
                   that do not provide a full rectangular surface
                   (e.g. plastic corners molded  into  digitizing
                   area),  there is little reason why this option
                   should be used.

                   Combinations of  ActiveOffset  and  ActiveArea
                   values  that do not match well with the tablet
                   in use, will cause reduced usable area, incor­
                   rect  scaling,  and  possibly usable area cen­
                   tered on the tablet surface.

               General Note
               tablets to be recognized by this  module  must  be
               set to run in Summa MM mode binary, 9600 baud, odd
               parity, one stop bit.  Also, usable tablet surface
               is  mapped  by  following  display  screen  aspect
               ratio; e.g. a 12x18 tablet will have maximum  area
               of  12x16  inches  usable  when  the display sizes
               indicate 4:3 (say, 1024x768).   Previous  behavior
               mapped  the  full  tablet  to  screen,  regardless
               tablet and screen aspect ratios,  causing  distor­
               tion   when  tracing/digitizing  drawings  on  the
               tablet.

</verb>

</article>

<!-- Local IspellDict: francais -->


