I recommend using double quotes on the mode. Insure that is the correct filename for that device on your Mac.
$handle = fopen("/dev/tty.usbmodem1421", "r+");
I recommend using double quotes on the mode. Insure that is the correct filename for that device on your Mac.
$handle = fopen("/dev/tty.usbmodem1421", "r+");