Ce qui empêche l'affichage de tout les caractères possédant un nombre
impaire de bit à 1.
Je ne trouve pas l'entrée de gettytab permettant d'avoir "cflags: cs7
parenb". J'ai essayé np, op, ap à la place de ep dans l'entrée de gettytab
sans plus de résultats.
:~$ sudo sh -c 'stty < /dev/tty00 ' speed 4800 baud; lflags: -icanon -isig -iexten -echo iflags: -icrnl -ixon -ixany -imaxbel -brkint oflags: -opost cflags: cs8 -parenb AMHA, il faut laisser faire le paramétrage du système qui
devrait être, pour des raisons historiques even-7bits-1stop (donc en format minitel) par défaut. sous freebsd, pour balancer un getty sur un minitel2 en 9600-7e1 j'utilise : /etc/ttys => ttyd0 "/usr/libexec/getty std.9600" dialup on et je ne crois pas me souvenir d'avoir un truc a changer dans gettytab. par contre, refaire un fnct-P-9 pour passer le minitel en 9600).
attention: - un minitel 1B monte que jusqu'a 4800bps (e71) 2 9600 (e71) - un magis (la derniere génération avec lecteur de carte a puce intégré) peut faire du 8bits sans parité, mais je n'ai jamais testé..
P.
Bonjour,
j'essaie d'utiliser un minitel comme console série sous OpenBSD.
texitoi@epiano:~$ sudo sh -c 'stty < /dev/tty00 '
speed 4800 baud;
lflags: -icanon -isig -iexten -echo
iflags: -icrnl -ixon -ixany -imaxbel -brkint
oflags: -opost
cflags: cs8 -parenb
AMHA, il faut laisser faire le paramétrage du système qui
devrait être, pour des raisons historiques even-7bits-1stop (donc
en format minitel) par défaut. sous freebsd, pour balancer un getty
sur un minitel2 en 9600-7e1 j'utilise :
/etc/ttys => ttyd0 "/usr/libexec/getty std.9600" dialup on
et je ne crois pas me souvenir d'avoir un truc a changer dans gettytab.
par contre, refaire un fnct-P-9 pour passer le minitel en 9600).
attention:
- un minitel 1B monte que jusqu'a 4800bps (e71)
2 9600 (e71)
- un magis (la derniere génération avec lecteur de carte a puce
intégré) peut faire du 8bits sans parité, mais je n'ai jamais
testé..
:~$ sudo sh -c 'stty < /dev/tty00 ' speed 4800 baud; lflags: -icanon -isig -iexten -echo iflags: -icrnl -ixon -ixany -imaxbel -brkint oflags: -opost cflags: cs8 -parenb AMHA, il faut laisser faire le paramétrage du système qui
devrait être, pour des raisons historiques even-7bits-1stop (donc en format minitel) par défaut. sous freebsd, pour balancer un getty sur un minitel2 en 9600-7e1 j'utilise : /etc/ttys => ttyd0 "/usr/libexec/getty std.9600" dialup on et je ne crois pas me souvenir d'avoir un truc a changer dans gettytab. par contre, refaire un fnct-P-9 pour passer le minitel en 9600).
attention: - un minitel 1B monte que jusqu'a 4800bps (e71) 2 9600 (e71) - un magis (la derniere génération avec lecteur de carte a puce intégré) peut faire du 8bits sans parité, mais je n'ai jamais testé..
P.
TeXitoi
Truc Muche writes:
Bonjour,
j'essaie d'utiliser un minitel comme console série sous OpenBSD.
AMHA, il faut laisser faire le paramétrage du système qui devrait être, pour des raisons historiques even-7bits-1stop (donc en format minitel) par défaut.
Il semblerait que non (c'est bien sur la première chose que j'ai essayé) :
sous freebsd, pour balancer un getty sur un minitel2 en 9600-7e1 j'utilise : /etc/ttys => ttyd0 "/usr/libexec/getty std.9600" dialup on et je ne crois pas me souvenir d'avoir un truc a changer dans gettytab. par contre, refaire un fnct-P-9 pour passer le minitel en 9600).
La configuration par défaut d'OpenBSD doit pas être la même que sous FreeBSD, alors. Sous linux, il se met en 8bits et autodétecte lors du login la console.
attention: - un minitel 1B monte que jusqu'a 4800bps (e71)
C'est bien ca que j'ai.
J'arrive en ce moment à le faire marcher, mais je trouve la méthode "bidouille et crade" :
le minigetty étant un hack configurant la console à coup de system("stty").
Le dialup dans ta conf peut-elle changer quelque chose ?
Le deuxième truc qui me gène, c'est que la console de boot semble elle aussi être en 8 bits, et je ne trouve rien pour la configurer en 7e1 dans le man boot.conf. C'est genant, car je vais être obligé de brancher un écran et un clavier à chaque mise à jour.
Pour info, le minigetty.c (Licence BSD, vu que dérivé de libexec/getty/main.c d'OpenBSD 3.9): -----8<---------8<---------8<---------8<---------8<---------8<---------8<---- /*- * Copyright (c) 1980, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */
/* * The following is a work around for vhangup interactions * which cause great problems getting window systems started. * If the tty line is "-", we do the old style getty presuming * that the file descriptors are already set up for us. * J. Gettys - MIT Project Athena. */ if (argc <= 2 || strcmp(argv[2], "-") == 0) { snprintf(ttyn, sizeof ttyn, "%s", ttyname(0)); } else { int i;
snprintf(ttyn, sizeof ttyn, "%s%s", "/dev/", argv[2]); if (strcmp(argv[0], "+") != 0) { chown(ttyn, 0, 0); chmod(ttyn, 0600); revoke(ttyn); /* * Delay the open so DTR stays down long enough to be detected. */ sleep(2); while ((i = open(ttyn, O_RDWR)) == -1) { if ((repcnt % 10 == 0) && (errno != ENXIO || !failopenlogged)) { syslog(LOG_ERR, "%s: %m", ttyn); closelog(); failopenlogged = 1; } repcnt++; sleep(60); } login_tty(i); } }
AMHA, il faut laisser faire le paramétrage du système qui
devrait être, pour des raisons historiques even-7bits-1stop (donc
en format minitel) par défaut.
Il semblerait que non (c'est bien sur la première chose que j'ai
essayé) :
sous freebsd, pour balancer un getty
sur un minitel2 en 9600-7e1 j'utilise :
/etc/ttys => ttyd0 "/usr/libexec/getty std.9600" dialup on
et je ne crois pas me souvenir d'avoir un truc a changer dans gettytab.
par contre, refaire un fnct-P-9 pour passer le minitel en 9600).
La configuration par défaut d'OpenBSD doit pas être la même que sous
FreeBSD, alors. Sous linux, il se met en 8bits et autodétecte lors du
login la console.
attention:
- un minitel 1B monte que jusqu'a 4800bps (e71)
C'est bien ca que j'ai.
J'arrive en ce moment à le faire marcher, mais je trouve la méthode
"bidouille et crade" :
le minigetty étant un hack configurant la console à coup de
system("stty").
Le dialup dans ta conf peut-elle changer quelque chose ?
Le deuxième truc qui me gène, c'est que la console de boot semble elle
aussi être en 8 bits, et je ne trouve rien pour la configurer en 7e1
dans le man boot.conf. C'est genant, car je vais être obligé de
brancher un écran et un clavier à chaque mise à jour.
Pour info, le minigetty.c (Licence BSD, vu que dérivé de
libexec/getty/main.c d'OpenBSD 3.9):
-----8<---------8<---------8<---------8<---------8<---------8<---------8<----
/*-
* Copyright (c) 1980, 1993
* The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* The following is a work around for vhangup interactions
* which cause great problems getting window systems started.
* If the tty line is "-", we do the old style getty presuming
* that the file descriptors are already set up for us.
* J. Gettys - MIT Project Athena.
*/
if (argc <= 2 || strcmp(argv[2], "-") == 0)
{
snprintf(ttyn, sizeof ttyn, "%s", ttyname(0));
}
else
{
int i;
snprintf(ttyn, sizeof ttyn, "%s%s", "/dev/", argv[2]);
if (strcmp(argv[0], "+") != 0)
{
chown(ttyn, 0, 0);
chmod(ttyn, 0600);
revoke(ttyn);
/*
* Delay the open so DTR stays down long enough to be detected.
*/
sleep(2);
while ((i = open(ttyn, O_RDWR)) == -1)
{
if ((repcnt % 10 == 0) &&
(errno != ENXIO || !failopenlogged))
{
syslog(LOG_ERR, "%s: %m", ttyn);
closelog();
failopenlogged = 1;
}
repcnt++;
sleep(60);
}
login_tty(i);
}
}
AMHA, il faut laisser faire le paramétrage du système qui devrait être, pour des raisons historiques even-7bits-1stop (donc en format minitel) par défaut.
Il semblerait que non (c'est bien sur la première chose que j'ai essayé) :
sous freebsd, pour balancer un getty sur un minitel2 en 9600-7e1 j'utilise : /etc/ttys => ttyd0 "/usr/libexec/getty std.9600" dialup on et je ne crois pas me souvenir d'avoir un truc a changer dans gettytab. par contre, refaire un fnct-P-9 pour passer le minitel en 9600).
La configuration par défaut d'OpenBSD doit pas être la même que sous FreeBSD, alors. Sous linux, il se met en 8bits et autodétecte lors du login la console.
attention: - un minitel 1B monte que jusqu'a 4800bps (e71)
C'est bien ca que j'ai.
J'arrive en ce moment à le faire marcher, mais je trouve la méthode "bidouille et crade" :
le minigetty étant un hack configurant la console à coup de system("stty").
Le dialup dans ta conf peut-elle changer quelque chose ?
Le deuxième truc qui me gène, c'est que la console de boot semble elle aussi être en 8 bits, et je ne trouve rien pour la configurer en 7e1 dans le man boot.conf. C'est genant, car je vais être obligé de brancher un écran et un clavier à chaque mise à jour.
Pour info, le minigetty.c (Licence BSD, vu que dérivé de libexec/getty/main.c d'OpenBSD 3.9): -----8<---------8<---------8<---------8<---------8<---------8<---------8<---- /*- * Copyright (c) 1980, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */
/* * The following is a work around for vhangup interactions * which cause great problems getting window systems started. * If the tty line is "-", we do the old style getty presuming * that the file descriptors are already set up for us. * J. Gettys - MIT Project Athena. */ if (argc <= 2 || strcmp(argv[2], "-") == 0) { snprintf(ttyn, sizeof ttyn, "%s", ttyname(0)); } else { int i;
snprintf(ttyn, sizeof ttyn, "%s%s", "/dev/", argv[2]); if (strcmp(argv[0], "+") != 0) { chown(ttyn, 0, 0); chmod(ttyn, 0600); revoke(ttyn); /* * Delay the open so DTR stays down long enough to be detected. */ sleep(2); while ((i = open(ttyn, O_RDWR)) == -1) { if ((repcnt % 10 == 0) && (errno != ENXIO || !failopenlogged)) { syslog(LOG_ERR, "%s: %m", ttyn); closelog(); failopenlogged = 1; } repcnt++; sleep(60); } login_tty(i); } }