i m new to sms lib api i never used api's before please would you give me some help how to use it from strart to end for sending and receiving sms using Gsm modem in eclipse. please it is an emergency my final year project is based upon it. please it will be a great favour..thanks in advance
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Assumption:
java1.5
or higher installed on your ComputerWindows OS
JAVA_HOME
=c:\java\jdk1.5
jre
installed on your pc ( you are usingjre
that is loacated atJAVA_HOME\jre
)Here we will connect PC with any java supported mobile via "Standard Serial Over blue tooth link".
STEP 1. Download
SMSLib
src from hereSTEP 2. Download
RXTX
from here.STEP 3. Download
CommonsNet
from here.STEP 4. Download
javacomm20-win32
from here.STEP 5. Download
slf4j-1.5.6
from here.STEP 6. Download
log4j-1.2.8.jar
from here.STEP 7. Unzip all the files in suitable location
STEP 8. Copy following files to
JAVA_HOME\jre\lib\ext
commons-net-2.0.jar
fromCommonsNet\commons-net-2.0.jar
comm.jar
fromjavacomm20-win32\commapi\comm.jar
javax.comm.properties
fromjavacomm20-win32\commapi\javax.comm.properties
RXTXcomm.jar
fromrxtx-2.1-7-bins-r2\RXTXcomm.jar
slf4j-1.5.6\*.jar
smslib-3.4.1.jar
fromsmslib-v3.4.1-bin\dist\lib\smslib-3.4.1.jar
STEP 9. Copy following files to
JAVA_HOME\jre\bin
win32com.dll
fromjavacomm20-win32\commapi\win32com.dll
rxtxSerial.dll
fromrxtx-2.1-7-bins-r2\Windows\i368-mingw32\rxtxSerial.dll
rxtxParallel.dll
fromrxtx-2.1-7-bins-r2\Windows\i368-mingw32\rxtxParallel.dll
STEP 10. Copy following files to
C:\Program Files\WINDOWS\system32
win32com.dll
fromjavacomm20-win32\commapi\win32com.dll
rxtxSerial.dll
fromrxtx-2.1-7-bins-r2\Windows\i368-mingw32\rxtxSerial.dll
rxtxParallel.dll
fromrxtx-2.1-7-bins-r2\Windows\i368-mingw32\rxtxParallel.dll
STEP 11. If you are using any java IDE (i.e netbeans) then create new project, add source packages
smslib-v3.4.1-src\src\java
. You need to have all the file of STEP 8 in your class path.(to compile the project) and build project. Setmisc.CommTest
as main class of the project.STEP 12. Connect Bluetooth device to your computer's USB port. If PC prompts you for driver installation then install the driver. If your PC can not find any suitable driver the get the driver from some where for Standard Serial Link Over Bluetooth
STEP 13. Once the driver is installed start Bluetooth of mobile phone.
STEP 14. Open control panel --> BueTooth Device
STEP 15. Open control panel/Phone and modem You should see one modem attached to port like '
COM5
' in modem list.STEP 16. Run
misc.CommTest
and wait for program to complete. When program completes, Note-down for which values ofbaud rate
andcomm port
. The program will print text like below:STEP 17. Open
examples.modem.SendMessage.java
file in your IDE and modefy following line according to your environment.SerialModemGateway()
constructor can be any StringModify following line
add following line some where after instantiation of
SerialModemGateway
This smsc number can be found from you mobile's 'Message'/'Message Settings' depending on your mobile phone software
STEP 18. Run
examples.modem.SendMessage
.Source: http://sendsmsusingsmslib.blogspot.in/