Path: utzoo!attcan!uunet!clyde.concordia.ca!news-server.csri.toronto.edu!helios.physics.utoronto.ca!ists!yunexus!xrtll!xrtll.uucp!silver From: silver@xrtll.uucp (Hi Ho Silver) Newsgroups: comp.unix.xenix.sco Subject: Auto-baud detection Message-ID: <1990Oct17.125215.7578@xrtll.uucp> Date: 17 Oct 90 12:52:15 GMT Sender: silver@xrtll.uucp (Hi Ho Silver) Organization: Not around here, pal! Lines: 33 I have to write a program which needs to be able to detect at what speed an inbound modem connects and change to that baud rate, then read some data and detect when the modem hangs up. It must do this repeatedly and must do it flawlessly, as the client for whom this is to be written will use it for their livelihood. It must also work with a pre-existing protocol, so I can not require them to send a series of breaks and a login sequence so that it can be done by getty. I've tried a program which does the following: while (true) do read a line from the modem print it on the screen if it's a CONNECT message then read the speed from the message run stty to change the port's speed endif done It doesn't seem to be able to change the port's speed, and of course it shows garbage until the next time I try connecting at whatever baud rate I set the port at. In fact, I've tried running stty [options]