I am currently developing an application in which I need to send an sms from gsm modem to j2me port.I searched a lot of stuff and also with some guidance I found that I have to use PDU mode for sending port addressed messages. There is no clear picture for configuring a port number in the PDU mode.I checked first 100 results of google for stuff. Still nothing.Can anyone give a simple idea of how to send a port addressed sms from gsm modem.
I also tried using smsj API for sending port addressed sms but there is no tutorials for it.Some how found a program and tried running it sent out an international sms instead of a local sms. If any have tutorial of smsj api please help.........
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");