Gammu installation and configurationTo use the SMS device for robustness application, gammu application, as well as libgammu library, are needed. Here are steps to follow: 1. Install gammu stand-alone application. For example, nder Ubuntu: sudo apt-get install gammu 2. Write .gammurc configuration file. Details for different connections and devices can be found at: http://www.gammu.org/wiki/index.php?title=Gammu:Setting_configuration_file 3. Install LibGammu. 1) Download the latest release. Can be found at: http://viewsvn.cihar.com 2) Extract to local directory. 3) Install cmake. 4) configure 5) make 6) make test 7) make install 4. LibGammu usage references can be found at: http://www.gammu.org/wiki/index.php?title=Gammu:LibGammu_usage Use JNI to Access LibGammu From Java1. Set JAVA_HOME, JRE_HOME, CLASSPATH, LD_LIBRARY_PATH appropriately. 2. Write Java native interface, e.g. SMSLib.java, and declare native methods in the class. 3. javac SMSLib.java 4. javah SMSLib SMSLib.h is generated. 5. Complete SMSLib.c according to SMSLib.h. 6. gcc -fPIC -shared SMSLib.c -o libSMSLib.so -I/.../include -I/.../include/linux 7. export LD_LIBRARY_PATH Return to deployment guide. |
![]() |
