$Date: 2002/08/16 02:53:46 $ Installation d'une tablette graphique Genius EasyPen sous Linux Gilles Lamiral $Revision: 1.4 $ Comment installer et configurer une tablette graphique Genius EasyPen sous GNU/Linux, tout en gardant sa souris habituelle. ______________________________________________________________________ Table des matières 1. Introduction 2. Historique de ce document 3. Liens utiles 4. Port Série 5. gpm 6. XFree3.3.x avec x>=2 7. man XF86Config-v3 ______________________________________________________________________ Version générée le Vendredi 16 août 2002 Vous trouverez la dernière version de ce document, écrit par Gilles Lamiral, à l'adresse : Ce document, écrit en SGML, peut être disponible en plusieurs formats: SGML Info PDF HTM TeX LyX PostScript ASCII HTML Man (à la convenance de l'administrateur du site). 1. Introduction 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. 2. Historique de ce document $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 3. Liens utiles Configurations XFree et gpm : Pilotes XFree: Description technique : Port série : 4. Port Série Il vous faut trouver un port série de libre et une irq de libre sur votre machine. Rappel: COM1 -> /dev/ttyS0 COM2 -> /dev/ttyS1 COM3 -> /dev/ttyS2 COM4 -> /dev/ttyS3 Il importe de connaitre l'adresse du port série afin d'utiliser setserial Détection des ports série par le noyau: $ 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 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: $ setserial /dev/ttyS2 /dev/ttyS2, UART: 16550A, Port: 0x03e8, IRQ: 4 Si vous avez un message du type UART: unknown, c'est que le noyau ne l'a pas détecté à l'adresse (port) en question. C'est mauvais pour vous. Configurons le : $ setserial /dev/ttyS2 uart 16550A port 0x03e8 \ baud_base 115200 spd_normal skip_test auto_irq Vérifions le: $ setserial /dev/ttyS2 /dev/ttyS2, UART: 16550A, Port: 0x03e8, IRQ: 5 Vous remarquez que l'irq est passée à 5. Testons le port série: 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 ... En bougeant le stylet, vous devez voir plein de chiffres apparaître. Si vous avez une sortie du type : cat /dev/ttyS2 | od cat: /dev/ttyS2: Input/output error 0000000 C'est que le port série est mal configuré. 5. gpm Dans une console, lancer gpm avec les options suivantes $ /usr/sbin/gpm -m /dev/ttyS2 -t genitizer 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). 6. XFree3.3.x avec x>=2 Vous récupérez le pilote xf86Summa.so mkdir -p /usr/X11R6/lib/modules/ cp xf86Summa.so /usr/X11R6/lib/modules/xf86Summa.so Sauvegarder votre ancien fichier de configuration de X Window. cp /etc/X11/XF86Config /etc/X11/XF86Config.good Ensuite ajouter les lignes suivantes. Normalement, les sections existent déjà : # /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 Il faut lancer gpm (voir section précédente) avant de lancer X Window. Testons maintenant le serveux X : X :1 # puis Ctrl-Alt-BackSpace pour l'enlever 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. 7. man XF86Config-v3 Je ne resiste pas à l'idée de vous faire lire la partie du manuel de XF86Config concernant les tablettes SummaSketch. 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.