OS X Yosemite uses the Java language to access the serial device through the RXTX library.
The RXTX library you can use is already under Git. The access address is as follows:
Https://git.oschina.net/myaniu/RXTX
After downloading Mac.zip, unzip.
Copy the Rxtxcomm.jar and Librxtxserial.jnilib under the directory to the/library/java/extensions directory and give you access rights.
The specific code is as follows:
CD Macsudo CP rxtxcomm.jar/library/java/extensions/sudo CP Librxtxserial.jnilib/library/java/extensions/sudo CHMOD-R 755/library/java/extensions
After this RXTX package, you can use the Smslib through the serial text message cat to send text messages, you can also use the Arduino development environment under OSX.
The above files come from the following addresses:
http://blog.brianhemeryck.me/installing-rxtx-on-mac-os-mountain-lion/
http://blog.iharder.net/2009/08/18/rxtx-java-6-and-librxtxserial-jnilib-on-intel-mac-os-x/
Http://fizzed.com/oss/rxtx-for-java
OS X Yosemite Using the Java language to access serial devices through the RXTX library