next up previous contents
suivant: Le fichier /etc/chatscripts/monFai monter: Configurer sa connexion vers précédent: Configurer sa connexion vers   Table des matières


Brancher et configurer le modem

Cette opération peut être instantanée si le noyau est bien configuré, le type de matériel standard et les ports séries avec des valeurs de IRQ classiques. Cela peut nécessiter également quelque manipulations.

En général le modem externe se branche sur un port série (périphériques /dev/ttyS*10). Il y a souvent deux ports série, un de 9 broches et un de 25 broches. Le premier port série (COM1 sous MSDOS) est le plus souvent celui de 9 broches, tandis que le second (COM2 sous MSDOS) est celui de 25 broches. Voici un petit tableau résumant cela :

Nom sous Linux Nom sous MSDOS Port IRQ
/dev/ttyS0 COM1 0x3f8 4
/dev/ttyS1 COM2 0x2f8 3
/dev/ttyS2 COM3 0x3e8 4
/dev/ttyS3 COM4 0x2e8 3

Ces valeurs peuvent être changées à l'aide de la commande setserial. La page de manuel de setserial(8) précise d'ailleurs que :

Due  to  the  limitations  in the design of the AT/ISA bus
architecture, normally an  IRQ  line  may  not  be  shared
between  two  or  more serial ports.  If you attempt to do
this, one or both serial ports will become  unreliable  if
you  try  to use both simultaneously.  This limitation can
be overcome by  special  multi-port  serial  port  boards,
which  are  designed to share multiple serial ports over a
single IRQ line.  Multi-port  serial  cards  supported  by
Linux  include  the  AST FourPort, the Accent Async board,
the  Usenet  Serial  II  board,  the  Bocaboard   BB-1004,
BB-1008, and BB-2016 boards, and the HUB-6 serial board.
 
The  selection  of  an  alternative IRQ line is difficult,
since most of them are already used.  The following  table
lists  the  "standard MS-DOS" assignments of available IRQ
lines:

       IRQ 3: COM2
       IRQ 4: COM1
       IRQ 5: LPT2
       IRQ 7: LPT1

Most people find that IRQ 5 is  a  good  choice,  assuming
that  there  is  only one parallel port active in the com­
puter.  Another good choice is IRQ 2 (aka IRQ 9); although
this  IRQ  is  sometimes  used  by network cards, and very
rarely VGA cards will be configured to use IRQ 2 as a ver­
tical  retrace  interrupt.  If your VGA card is configured
this way; try to disable it so you can  reclaim  that  IRQ
line  for  some  other card.  It's not necessary for Linux
and most other Operating systems.

The only other available IRQ lines are 3, 4,  and  7,  and
these  are  probably used by the other serial and parallel
ports.  (If  your  serial  card  has  a  16bit  card  edge
connector, and supports higher interrupt numbers, then IRQ
10, 11, 12, and 15 are also available.)
 
On AT class machines, IRQ 2 is seen as IRQ  9,  and  Linux
will interpret it in this manner.
 
IRQ's  other  than  2 (9), 3, 4, 5, 7, 10, 11, 12, and 15,
should not be used, since they are assigned to other hard­
ware  and  cannot,  in  general, be changed.  Here are the
"standard" assignments:
 
       IRQ  0      Timer channel 0
       IRQ  1      Keyboard
       IRQ  2      Cascade for controller 2
       IRQ  3      Serial port 2
       IRQ  4      Serial port 1
       IRQ  5      Parallel port 2 (Reserved in PS/2)
       IRQ  6      Floppy diskette
       IRQ  7      Parallel port 1
       IRQ  8      Real-time clock
       IRQ  9      Redirected to IRQ2
       IRQ 10      Reserved
       IRQ 11      Reserved
       IRQ 12      Reserved (Auxillary device in PS/2)
       IRQ 13      Math coprocessor
       IRQ 14      Hard disk controller
       IRQ 15      Reserved

On peut tester si on a un UART 16450 ou 16550, qui a un débit de 115200 bauds :

# setserial -a /dev/ttyS1
/dev/ttyS1, Line 1, UART: 16550A, Port: 0x02f8, IRQ: 3
        Baud_base: 115200, close_delay: 50, divisor: 0
        closing_wait: 3000, closing_wait2: infinte
        Flags: spd_normal skip_test
 
#

Si ce n'est pas le cas, le modem ne dépassera pas les 9600 bauds.

Une fois le bon périphérique trouvé et configuré, il est conseillé de faire un lien /dev/modem vers celui-ci. On indiquera à pppd qu'il lui faut interroger le modem connecté sur /dev/modem, ce qui laisse une souplesse d'administration de la machine (un changement de modem ou le rajout d'une souris à la place du modem ne nécessitant que la mise à jour du lien /dev/modem). On peut vérifier que ce lien existe déjà :

# ls -l /dev/modem
lrwxrwxrwx   1 root     root           10 Mar 31 11:07 /dev/modem -> /dev/ttyS0
#

Si ce n'est le cas, on peut le mettre à jour avec la commande ln pour le premier port série :

# ln -sf /dev/ttyS0 /dev/modem
# ls -l /dev/modem
lrwxrwxrwx   1 root     root           10 Mar 31 14:56 /dev/modem -> /dev/ttyS0
#

ou, pour le second port série :

# ln -sf /dev/ttyS1 /dev/modem
# ls -l /dev/modem
lrwxrwxrwx   1 root     root           10 Mar 31 14:55 /dev/modem -> /dev/ttyS1
#


next up previous contents
suivant: Le fichier /etc/chatscripts/monFai monter: Configurer sa connexion vers précédent: Configurer sa connexion vers   Table des matières
2004-07-17