To use SMSLib, you should install the following components:
Starting from SMSLib v3.4, the installation procedure has changed a bit. Some SMSServer components that required extra dependencies have been pulled out of the main source tree. This was done in order to reduce the required third party libraries & dependency files for those wanting to use the core library.
The core SMSLib/SMSServer source files can now be compiled with only two dependencies: the Simple logging facade for Java and the Apache Commons/NET for the IP modem driver.
All other add-on SMSServer components are moved in the /misc/SMSServer/Interfaces/
directory, organized by development status. Installation instructions for these specific components are given in the relevant SMSServer documentation pages.
You have two options:
The installation procedure for both the old Java Comm v2 and the new Java Comm v3 is identical.
Java Comm v2 is for Win32 systems and it is available on the Download page.
Java Comm v3 is for Linux systems and it is available for download directly from SUN downloads (registration is required)
To install it, unzip the downloaded archive file in a temporary place and do the following copies:
comm.jar
should go under JDKDIR/jre/lib/ext/
javax.comm.properties
should go under JDKDIR/jre/lib/
win32com.dll
for Win32 or the .so
Linux library files) should go under JDKDIR/jre/bin/
If you have a separate JRE directory, do the same copies for the JREDIR directory!
The official RxTx binary pack is available here. The provided link will download the distro with some standard binaries (for linux 32bit, 64 bit, etc). If binaries for your specific operating system are not included, you may consider recompiling RxTx yourselves.
For a custom Win64 RxTx distro, have a look at the CloudHopper's web site.
To install it, unzip the distribution file in a temporary place and do the following copies:
RXTXcomm.jar
should go under JDKDIR/jre/lib/ext/
JDKDIR/jre/bin/
If you have a separate JRE directory, do the same copies for the JREDIR directory!
SMSLib uses Apache Ant for building and deployment.
Download and install Apache Ant from here.
SMSLib uses Apache log4j as its logging framework.
Download log4j from here. You need to have the log4j-1.2.15.jar
file (v1.2.15 was the current version at the time of this writing) somewhere in your classpath or in Java's lib/ext directories or in lib directory of project.
Download Apache Jakarta Commons/NET from here. You need to have the commons-net-2.0.jar
file (v2.0 was the current version at the time of this writing) somewhere in your classpath or in Java's lib/ext directories or in lib directory of project.
Download the library from JSMPP project and install the jsmpp-2.1.0.jar
(v2.1.0 was the current version at the time of this writing) somewhere in your classpath or in Java's lib/ext directories or in lib directory of project.
The ANT build file provides the following targets:
compile-smslib | Compiles the core library. |
build-smslib | Builds the core library. Starting with v3.4.6, this target also packages the "org.ajwcc" (pduUtils) as a separate jar file. |
doc | Creates the javadoc pages for the core library. |
build-smsserver | Builds the SMSServer application together with SMSLib core library in one jar, making SMSServer as the startup application in the jar. |
build-smsserver-standalone | Builds the SMSServer application without the SMSLib core library in one jar, making SMSServer as the startup application in the jar. |
clean | Cleans the temporary compile / javadoc / class directories. |
Running
ant
(i.e. without a target) will give you a help screen.
If you are new to SMSLib, spend some time with the two examples ReadMessages
and SendMessage
(located in the src/java/examples/modem
folder) to find out the basics of how to read / send messages via your phone.