well, a serial port is not like any file. There are a bunch of controls you have to setup on the file so you can set it up correctly (remember the parity/speed etc..?). You can do that using termios
settings, Here's the first result on stackoverflow:
or not. Here's a simple code I hacked a while back to flash a serial device:
I had to patch a few stuff from the original project to make it work on OSX, it may be useful for you.
And to open the tty chardev, you shall not use cat, that would only output stuff as fast as it can gets it (which in best case outputs nothing, in worst case scrambles your terminal). Instead you shall use:
minicom
(but a bit weird to use/configure)screen /dev/tty.usbmodem1411 115200
python -m serial.tools.miniterm /dev/tty.usbmodem1411 115200