Forum Discussion
Altera_Forum
Honored Contributor
10 years agoHi,
since you're using Linux, is it possible that cooked mode makes problems? If you just open a /dev/ttyWhatver port, it is configured in cooked mode by default. That would explain why you cannot read: your OS buffers all input and holds it back until a termination character arrives, but probably your device does not send such a character. The "PC with a terminal" you mentioned probably uses raw mode by default. Info about raw/cooked modes: http://stackoverflow.com/questions/13104460/c-confusion-about-raw-vs-cooked-terminal-modes (http://stackoverflow.com/questions/13104460/c-confusion-about-raw-vs-cooked-terminal-modes) What helped me to solve that in C/C++ (I assume you want to solve the problem in a C/C++ program since you posted it here): http://stackoverflow.com/questions/6947413/how-to-open-read-and-write-from-serial-port-in-c (http://stackoverflow.com/questions/6947413/how-to-open-read-and-write-from-serial-port-in-c) Best regards, GooGooCluster