This content has been marked as final. Show 3 replies
Guys, If you are looking to send sms with port number from GSM modem use SMSLib API
This API will help you send an sms to j2me port from GSM Modem it's perfectly working.
Download and Install Java comm API and RxTxComm API as said by SMSLib.org
Download and extract SMSLib.zip. Include the SMSLib.jar and SMSServrer.jar found in the zip file.
Dont download Apache ant.
The jar file is at smslib/dist/lib
Include those jar files and also the following jar files
Only with all the jar files mentioned the sample program given in the site will work.
The program to send SMS from GSM modem to J2me port is
class OutboundNotification implements IOutboundMessageNotification
public void process(String gatewayId, OutboundMessage msg)
System.out.println("Outbound handler called from Gateway: " + gatewayId);
public class SendMessage
public static void main(String args) throws Exception
OutboundNotification outboundNotification = new OutboundNotification();
srv = new Service();
SerialModemGateway gateway = new SerialModemGateway("modem.com1", "COM51", 9600, "Nokia", "6310i");
// Send a message synchronously.
msg = new OutboundMessage("+919876543210", "user");