I'm also guessing that you are using a Pi 3B. On a Pi 3B, "/dev/ttyAMA0" is normally reserved for Bluetooth.
To use the Serial Port on the Pi 3B (or any model of Pi running updated Raspbian Jessie):
Remove the phrase "console=serial0,115200" from the file '/boot/cmdline.txt'. Note that this file must only contain 1 line, do not split the line when editing, or try to add comments. This prevents Linux sending boot messages to the Serial Port.
Add the line "enable_uart=1" to the end of the file '/boot/config.txt'. Ensure that this file does not contain any other commands referring to the uart. This takes care of all the background tasks needed to use the Serial Port on the Pi 3B.
Reboot.
Refer to your Serial Port in code as "/dev/serial0", that's serialZero, not serialOh!
No need to change groups or permissions from the defaults.
翻译: