Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!sol.ctr.columbia.edu!emory!hubcap!ncrcae!sauron!stevem From: stevem@sauron.Columbia.NCR.COM (Steve McClure) Newsgroups: comp.sys.m68k Subject: Re: Need help connecting m68k to a UNIX box. Message-ID: <2254@sauron.Columbia.NCR.COM> Date: 31 Jul 90 12:36:38 GMT References: <14703@unix.SRI.COM> Reply-To: stevem@sauron.UUCP (Steve McClure) Distribution: na Organization: E&M-Columbia, NCR Corp, W Columbia, SC Lines: 38 In article <14703@unix.SRI.COM> henry@ginger.sri.com (Henry Pasternack) writes: + + 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? + I wrote some PROM Programmer software for a Unix box and ended up opening a read-only file and a write-open file on the same port. This same technique is used in the Unix cu command so I assume it is pretty much standard. Hope this helps. -- ---------------------------------------------------------------------- Steve email: Steve.McClure@Columbia.NCR.COM 803-791-7054 The above are my opinions, which NCR doesn't really care about anyway! CAUSER's Amiga BBS! | 803-796-3127 | 8pm-8am 8n1 | 300/1200/2400