I do it on my BeagleBoard (Ubuntu 11.04) only setting the speed on minicom. When I try to execute “cat /dev/ttyACM0” or minicom, sometimes it is successful printing the value, sometimes it fails with message like “I/O Error”.
I believe that using cat is more or less like opening a serial terminal window... causing the Arduino to reset. You may be more successful with tail -f, but I can't try at the moment.
In my own experience, TX remains ON when the arduino is trying to transmit but there is no device/program at the other end reading (and emptying) the serial buffer. When you connect to the serial port using cat or minicom you are probably seeing what was put in the serial buffer when the arduino started, but you also cause the Arduino to reset which gives you the I/O error. You may look for a program that can open the serial port without sending the DTR signal. Or maybe it's a configuration option you can set using stty.
In this forum you will also find the hardware 'trick' of using a (removable) capacitor on the Arduino.
u need run it before cat and fine tune it to fit you need.
modify the code
void setup()
{
// start serial port at 9600 bps and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
//...
}
void loop()
{
if (Serial.available() > 0) {
//...