On Mon, Nov 04, 2002 at 07:13:27PM +0100, Michael Naumann wrote: > On Monday 04 November 2002 16:31, Rob Weir wrote: > > On Mon, Nov 04, 2002 at 09:32:14AM +0100, J?rg Johannes wrote: > > > Hi List > > > > > > The subject says it (nearly) all: I have an old spectrophotometer which > > > has a serial port. According to the manual, it reads commands in > > > cleartext, and outputs its measured data in clear text as well. So what I > > > need is a software that allows me to send such commands to the serial > > > port, and read the results back over serial port into a file. Any > > > pointers (or ready programs :)) ? > > > > Couldn't you just pipe things in to and out of /dev/ttySn? > > Or simply use minicom. It also lets you configure baudrate and alike. > IIRC, you have to set it up as root with 'minicom -s'
Or... if you want to automate the interface I'd recommend the Net::Telnet module for perl. Despite the name it can work with any filehandle, and supports various methods for sending commands and receiving (and waiting for) responses. I've also used cu (part of the uucp distribution) under perl's Expect module to do this sort of thing, where cu handles the comm channel and expect the timeouts and automating the interactive stuff, but find Net::Telnet a simpler solution. Ken -- Ken Irving <[EMAIL PROTECTED]> -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]