2013年9月16日星期一

[ Urgent ] About SMSLib SMS problems

rt, with SMSLib + gsm modem to send SMS messages. win7 64 -bit system , Huawei modem, ports are COM3; javax.comm.properties and win32com.dll has been configured , is not send text messages , as follows:

import org.smslib.AGateway.Protocols;
import org.smslib.Message.MessageEncodings;
import org.smslib.OutboundMessage;
import org.smslib.Service;
import org.smslib.modem.SerialModemGateway;

public class Send {

public static void main(String args[]) throws Exception{
Service srv=Service.getInstance();

SerialModemGateway gateway = new SerialModemGateway("modem.com3","COM3", 9600, "WAVECOM", "");
gateway.setProtocol(Protocols.PDU);
gateway.setInbound(true);
gateway.setOutbound(true);
gateway.setSimPin("0000");

srv.addGateway(gateway);
srv.startService();

OutboundMessage msg=new OutboundMessage("15977104664", "hello");
msg.setDstPort(77); 
msg.setStatusReport(true); 
msg.setEncoding(MessageEncodings.ENCUCS2);

srv.sendMessage(msg);
System.out.println(msg);
}
}





seeking a code that can send text messages , send text messages .
------ Solution ---------------------------------------- ----
this stuff to ask colleagues for help
------ For reference only ----------------------- ----------------

------ For reference only ------------------------------------ ---
nobody engaged in it .
------ For reference only ---------------------------------------



help ask chant.
------ For reference only ---------------------------------------
I can send text messages, only able to send a second , stopService not closed , sending the second on the error , there is great God enlighten Well ?

1 条评论:


  1. Thanks for sharing
    Msgclub have two types of sms api Java; XML and JSON for sending SMS in bulk to your prospects from our gateway.

    回复删除