From: sjm@koti.ton.tut.fi (Sami J. M{kinen)
Subject: Re: DEC AXP, OSF1 3.0 and modems @38400bps -> problems
Date: 23 Feb 1995 10:01:59 GMT [thread overview]
Message-ID: <SJM.95Feb23120159@koti.ton.tut.fi> (raw)
In-Reply-To: peng@pirates.cs.swt.edu's message of 21 Feb 1995 19:39:13 GMT
In article <3idfh1$91o@pirates.cs.swt.edu> peng@pirates.cs.swt.edu (Wuxu Peng) writes:
> Are you sure that your modem is set right?
I have a straight flat calbe between the Alpha and the modem.
I have also setup RTS/CTS flow control on at the modem.
Actually, I managed to get a bearable connection when I enable
XON/XOFF between Alphas and modems, between modems (rarely needed)
and issue stty ixon ixoff on Alpha shell. I could even transfer
some files with zmodem. I think xon/xoff sucks, but this the best
I could manage to set up.
I even tried to set up RTS/CTS flags on the tty with my own
tiny C program, since the OSF stty knows absolutely nothing
about RTS/CTS. I wonder why?
Anyway, here's my program:
--- 8< ---
/*
* myrtscts.c
*
* This source code is in public domain.
* You may do whatever you want with it.
*/
#include <stdio.h>
#include <termios.h>
void usage(const char *progname)
{
fprintf(stderr, "Usage: %s [on|off]\n", progname);
}
int main(int argc, char *argv[])
{
struct termios tp;
memset(&tp, 0, sizeof(struct termios));
if (tcgetattr(0, &tp))
{
perror("tcgetattr");
exit(1);
}
switch(argc)
{
case 1:
fprintf(stderr, "RTS/CTS %s\n",
tp.c_cflag & CRTSCTS ? "on" : "off");
exit(0);
case 2:
if (!strcmp(argv[1], "on"))
tp.c_cflag |= CRTSCTS;
else
if (!strcmp(argv[1], "off"))
tp.c_cflag &= ~CRTSCTS;
else
{
usage(argv[0]);
exit(-1);
}
if (tcsetattr(0, TCSANOW, &tp))
{
perror("tcsetattr");
exit(1);
}
exit(0);
default:
usage(argv[0]);
exit(-1);
}
return 0;
}
--- 8< ---
--
// sjm
"I would rather spend 10 hours reading someone else's source code than
10 minutes listening to Musak waiting for technical support which isn't."
- Dr. G.W. Wettstein
next prev parent reply other threads:[~1995-02-23 10:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-02-21 11:42 DEC AXP, OSF1 3.0 and modems @38400bps -> problems Sami J. M{kinen
1995-02-21 19:39 ` Wuxu Peng
1995-02-23 10:01 ` Sami J. M{kinen [this message]
1995-02-25 0:22 ` Craig Zeller
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox