I have a problem with TTY device on MAC. I created a script which talks to Arduino and works well on Linux. Problem I'm having with MAC is I can't "fopen" the device. For example, if I do
echo "foo" > /dev/tty.usbmodem1431
It hangs forever blocking the port. It works well from Arduino's Serial Monitor so theoretically I should be able talking to it.
OK. I found the solution. I have to write to
/dev/cu.usbmodem1431
I still don't know why TTY don't want to work.