I'm trying to program the serial port in Linux and so far the program have just locked and leaving a locked or halted serial port behind. If you echo to /dev/ttyS1, everything is good and well, but after I try my program echo just stands still.

So I don't know what happen to the serial port, either it's locked or it's changed mode to one were it waits for a clear-to-send signal, or some other signal. Anyway, I'm stuck and don't know what to do.