Some help with Serial connection

Not exactly what you're looking for, but on Linux a way to capture data coming in from the serial port is this:

minicom -D /dev/ttyUSB1 -b 115200 -o -C dump.txt

where /dev/ttyUSB1 must be changed to the actual device (e.g. ttuUSB0, etc.), and 115200 must be equal to the value given in Serial.begin() on the Arduino.