smslib

java 短信猫发送短信的方法

不想你离开。 提交于 2020-04-18 14:40:54
用java实现短信收发的功能,目前一般项目中短信群发功能的实现方法大致有下面三种: · 1、 向运行商申请短信网关,不需要额外的设备,利用运行商提供的API调用程序发送短信,适用于大型的通信公司。 · 2、 借助像GSM MODEM之类的设备(支持AT指令的手机也行),通过数据线连接电脑来发送短信,这种方法比较适用于小公司及个人。要实现这种方式必须理解串口通信、AT指令、短信编码、解码。 · 3、 借助第三方运行的网站实现,由网站代发短信数据,这种方法对网站依赖性太高,对网络的要求也比较高。 鉴于项目的情况和多方考虑,同时又找到了一个开源的SMSLib项目的支持,比较倾向于第二种方法,SMSLib的出现就不需要我们自己去写底层的AT指令,这样就可以直接通过调用SMSLib的API来实现通过GSM modem来收发送短信了。 SMSLib官方网站: http://smslib.org/ ,使用SMSLib的一些基本要点: · SUN JDK 1.6 or newer. (Java环境) · Java CommunicationsLibrary. (Java串口通信) · Apache ANT for building thesources. (编译源码时需要的) · Apache log4j. (日志工具) · Apache Jakarta Commons -NET.

SMSLib实现Java短信收发的功能

末鹿安然 提交于 2020-03-02 05:02:06
用java实现短信收发的功能,目前一般项目中短信群发功能的实现方法大致有下面三种: 1、 向运行商申请短信网关,不需要额外的设备,利用运行商提供的API调用程序发送短信,适用于大型的通信公司。 2、 借助像GSM MODEM之类的设备(支持AT指令的手机也行),通过数据线连接电脑来发送短信,这种方法比较适用于小公司及个人。要实现这种方式必须理解串口通信、AT指令、短信编码、解码。 3、 借助第三方运行的网站实现,由网站代发短信数据,这种方法对网站依赖性太高,对网络的要求也比较高。 鉴于项目的情况和多方考虑,同时又找到了一个开源的SMSLib项目的支持,比较倾向于第二种方法,SMSLib的出现就不需要我们自己去写底层的AT指令,这样就可以直接通过调用SMSLib的API来实现通过GSM modem来收发送短信了。 SMSLib官方网站: http://smslib.org/ ,使用SMSLib的一些基本要点: SUN JDK 1.6 or newer. (Java环境) Java Communications Library. (Java串口通信) Apache ANT for building the sources. (编译源码时需要的) Apache log4j. (日志工具) Apache Jakarta Commons - NET. (网络操作相关的) JSMPP

SMSLib: After getting NO_ROUTE, what should I do?

[亡魂溺海] 提交于 2020-01-06 13:54:12
问题 I have a webservice that receives one SMS to be delivered. One SMS = one HTTP call. That is: http://.../my-ws/?to=56998180333&body=blabla This webservice uses SMSLib, with a JSMPPGateway attached to it: JSMPPGateway gateway = new JSMPPGateway(systemType, ip, port, new BindAttributes(username, password, "cp", BindType.TRANSMITTER)); Service.getInstance().addGateway(gateway); This is done once, because getInstance() acts like a singleton. When I send SMS, I do it this way: public void send

Adding a progress bar on SMSlib sendmessage using Swing (netbeans)

烈酒焚心 提交于 2019-12-24 19:12:24
问题 Hi I am new to java and this would be my first time using the progressbar. I tried using google for example but have no idea no how to use it on SMSlib sendmessage java class. import javax.swing.SwingWorker; import org.smslib.AGateway; import org.smslib.IOutboundMessageNotification; import org.smslib.Library; import org.smslib.OutboundMessage; import org.smslib.Service; import org.smslib.modem.SerialModemGateway; public class SendMessage { public void doIt(String recipient, String message)

SMSLib doesn't send SMS with E226 3G modem

不问归期 提交于 2019-12-12 10:15:08
问题 I would like to know if someone knows why I can't send sms with my E226 3g modem. I have configured the example class, I setted modem model, PIN and Smsc number. public class SendMessage { public void doIt() throws Exception { OutboundNotification outboundNotification = new OutboundNotification(); System.out.println("Example: Send message from a serial gsm modem."); System.out.println(Library.getLibraryDescription()); System.out.println("Version: " + Library.getLibraryVersion());

NoSuchPortException when running java application using SMSLib

喜欢而已 提交于 2019-12-10 22:18:19
问题 I'm using SMSLib in my java application to send an SMS , i connect a USB internet modem to my PC then determine it's port number (ie. COMx) then creating a serial modem gateway like this : determining the port number : creating the gateway: SerialModemGateway gateway = new SerialModemGateway("mobile", "COM5", 115200, "Apple", "iPhone"); but whether i define the port as COM4 or as COM5 it runs the connection at first then gives me that following exception then stops the service by the usual

SMSLib example for interactive USSD session

核能气质少年 提交于 2019-12-09 13:53:13
问题 I have a USSD application that provides an interactive session for users, for example: User> Dial USSD Shortcode Serv> Return Main Menu User> Select Option 1, e.g. "View Movie Times" Serv> Return List of Cities User> Select Option 3, e.g. Mumbai Serv> Return List of Cinemas User> etc ... I would like to test the USSD Server by using SMSLib to simulate the user. Are there any example SMSLib code snippets that show how to perform an interactive USSD session with a USSD server? 回答1: The code at

smslib not sending sms why?

天涯浪子 提交于 2019-12-07 14:50:09
问题 I am trying to send a sms with smslib but It did not send the message, can somebody guide me on this? this is my code: import org.smslib.AGateway; import org.smslib.IOutboundMessageNotification; import org.smslib.Library; import org.smslib.OutboundMessage; import org.smslib.Service; import org.smslib.modem.SerialModemGateway; public class SendMessage { public void doIt() throws Exception { OutboundNotification outboundNotification = new OutboundNotification(); System.out.println("Example:

How to send and receive sms using sms lib api

独自空忆成欢 提交于 2019-12-06 15:49:29
问题 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 回答1: Assumption: You have java1.5 or higher installed on your Computer You are on Windows OS Your java installtion directory JAVA_HOME = c:\java\jdk1.5 You have no separate jre installed on your pc ( you

smslib not sending sms why?

我们两清 提交于 2019-12-06 03:44:55
I am trying to send a sms with smslib but It did not send the message, can somebody guide me on this? this is my code: import org.smslib.AGateway; import org.smslib.IOutboundMessageNotification; import org.smslib.Library; import org.smslib.OutboundMessage; import org.smslib.Service; import org.smslib.modem.SerialModemGateway; public class SendMessage { public void doIt() throws Exception { OutboundNotification outboundNotification = new OutboundNotification(); System.out.println("Example: Send message from a serial gsm modem."); System.out.println(Library.getLibraryDescription()); System.out