reading data from a serial port
I have got a pecuiliar problem in hand. There, I have to read data via serial port from a communication device and am given option to use any OS and my choice is Linux of course. I dont know what protocols that device uses except that it simply sends data @ 9600 bps with 1 stop and no parity. But I have to read its data somehow. I want to know if there is any command to read data from a serial port (though writing to it is as simple as "echo a.vi > /dev/tty--"). Moreover, its not fixed when the device will send the data (i guess i'd need to use the for loop...). pls do reply.