Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!ames!bionet!synoptics!unix!ginger.sri.com!henry From: henry@ginger.sri.com (Henry Pasternack) Newsgroups: comp.sys.m68k Subject: Need help connecting m68k to a UNIX box. Message-ID: <14703@unix.SRI.COM> Date: 30 Jul 90 20:20:11 GMT Sender: news@unix.SRI.COM Reply-To: henry@ginger.sri.com (Henry Pasternack) Organization: SRI International Lines: 29 This is technically a UNIX question, but I have this paranoid feeling that posting to a UNIX bulletin board would be an exercise in futility. Perhaps someone over here can help me out. Problem: My 68000 board is running now, and I'm successfully programming it in C using the Sun3 compiler. I've written a two-part communications program for the purpose of downloading S-record code from a SPARCStation to the 68000. I use kermit to provide terminal emulation over the Sun's 'ttya' port. The 'ttyb' port is driven by my communications program which listens for file requests from the client and dumps S-records on command. I'm having a lot of trouble getting the interface to '/dev/ttyb' to work. I admit to knowing virtually nothing about UNIX I/O, and the reference manuals aren't much help. The port already seems to be configured for 9600 baud, which is convenient. I do an 'fopen' on '/dev/ttyb' and use 'gets' and 'fprintf' to perform I/O. The Sun has no problem receiving command lines from the client, but when the client begins polling for a response after sending a request, it gets a garbled copy of its request back. It seems as though the buffer UNIX is creating is bidirectional, rather than dual-unidirectional. Can anyone give me an understandable explanation of how to set up my SPARCStation to do simple and effective I/O to the serial ports? Thanks. -Henry