So, I\'m in a bit over my head, and I feel like I\'m very close to a solution, but it\'s just not working quite yet. Here\'s my situation:
I\'m working with an Ardui
On Linux, you need to call setserial to configure your serial port options (baud rate, parity, flow-control, etc.) before you can read/write the port correctly.
You need to find a way to do this with your Mac OS X Bash system.
Or you could write a Python script to do this.
Try adding an ampersand (&) to the end of the commands to put the process in the background. If the console is hanging up, then that means the script or process is still running on your current terminal, and you won't be able to input or click on anything until the process or script is done.
You can also try running the command in 1 terminal window, and open a new terminal window/tab, and try tailing from there.
Try / modify ttyecho:
http://www.humbug.in/2010/utility-to-send-commands-or-data-to-other-terminals-ttypts/
Maybe try some serial command line tool similar to serial-1.0.
See: Serial port loopback/duplex test, in Bash or C? (process substitution)
There's also Apple's SerialPortSample command line tool that allows you to set arbitrary baud rates:
// from: SerialPortSample/SerialPortSample.c
// ...
// Starting with Tiger, the IOSSIOSPEED ioctl can be used to set arbitrary baud rates
// other than those specified by POSIX. The driver for the underlying serial hardware
// ultimately determines which baud rates can be used. This ioctl sets both the input
// and output speed.
// ...
For more information see: http://www.arduino.cc/playground/Interfacing/Cocoa
Another piece of Cocoa sample code that shows you how to talk to the Arduino microcontroller over a serial connection is objective-candarduino (hosted on Google code).
I struggled with this problem also, trying no end of stty settings and tricks to cat my files to /dev/tty.usbserial-FTF7YNJ5 (in my case) whilst standing on one toe, etc.
Then I did an ls /dev and noticed /dev/cu.usbserial-FTF7YNJ5 -- oh, what's this? Apparently, a 'calling unit' version of the device that doesn't expect or provide any flow control. Dumps bytes to the port. Exactly what I needed.
So just do: cat super_file.bin > /dev/cu.usbserial-XXXXX
Hope this helps. And only now that I know the answer, I found this: http://stuffthingsandjunk.blogspot.com/2009/03/devcu-vs-devtty-osx-serial-ports.html