I have a serial device running which I need to read data from(I have absolutely no control over the device itself) except reading its output; using hyper terminal in Windows I am able to detect a meaningful traffic and yesterday when I used cat (or my own little C program to read the data and print it to stdout) it worked fine.Today, when I use cat/my program all I get is a sort-of corrupted data, yet hyper terminal still shows the data.What could possibly be wrong? how could it have worked yesterday but not today? The file I am/was reading is /dev/ttyUSB1*Please note that I am never running BOTH my program and cat, only one of them at a time.
Reading from a serial interface
linux;tty;cat;serial port
Someone on SO hinted in the right direction; the problem was with the baudrate, it was set to a different value than what I need.To check the baudrate:stty -F /dev/ttyUSB1To set the baudrate:stty -F /dev/ttyUSB1 57600 (57600 in my case is the baudrate my device needs)It's working like a charm now.