Keyboard-based Serial Interaction in Debian Linux?

Arduino Users,

I'm using Debian Linux and I can't find a keyboard-based command line program to send/receive serial data (such as "+++" entered at the keyboard and "OK" messages sent through an Arduino by an XBee radio) with an Arduino. I know Arduino has the Serial Monitor, but I don't want to launch Arduino every time I want to talk to an Arduino via my keyboard. Does anyone know of a command line tool for Debian that allows for keyboard-based, interactive serial communication with an Arduino?

Thanks, Roy

Could screen be what your after? Will most likely be part of your distro

screen /dev/usbtty.something 9600

or something along those lines. i'm on a windows machine at the moment so can't check :)

the problem with screen is that i've never figured out how to echo keyboard input, and how to get a newline character on each line inputted by a serial device. this is why i'm looking for an alternate program.

I run a Fedora 10 variant and I use the following sequence to send data to the Arduino from the command line. The commands I use are all standard *nix, AFAIK.

  1. Connect the USB cable between the PC and the Arduino. The Arduino will reset and begin running a sketch from the beginning. My sketches are set up for 9600 baud serial commo.

  2. Initialize communication once with the following command line on the PC:
    stty -F /dev/ttyUSB0 cs8 9600 ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke noflsh -ixon -crtscts -igncr -hupcl(I found that line somewhere in the Forum here, and modified it slightly so I could deal with end-of-line in the Arduino code. Sorry, I can’t remember the thread, but if you search for the beginning of that string you could probably locate the thread it came from.)

  3. Run the following shell script:

echo "Enter lines to send (Enter [Ctrl-c] to quit)"
while true
do
  read userinput
  echo $userinput > /dev/ttyUSB0
done

I can also send pre-canned text files to the Arduino with:

cat file.txt > /dev/ttyUSB0

Sorry, I have no need to receive data from the Arduino, so I can’t help you there.

Why don’t you use minicom ?