Where did you find v3.4.0???

Download the latest one from here http://smslib.org/download/
and make sure that log4j is setup properly (you can use the
"log4j.properties" from the "/misc" directory.


On 12 August 2010 15:39, Naveena Kadaveru <[email protected]>wrote:

> *ON CONSOLE :*
> *
> *
> init:
> deps-jar:
> Compiling 1 source file to D:\Naveena\SendSMS\SendSMSLib_1\build\classes
> compile-single:
> run-single:
> Example: Send message from a serial gsm modem.
> SMSLib: A Java API library for sending and receiving SMS via a GSM modem or
> other supported gateways.
> This software is distributed under the terms of the Apache v2.0 License.
> Web Site: http://smslib.org
> Version: 3.4.0
> Stable Library
> =========================================
> Native lib Version = RXTX-2.1-7
> Java lib Version   = RXTX-2.1-7
>
> Modem Information:
>   Manufacturer: Sony Ericsson
>   Model: AAC-1052042-BV
>   Serial No: 351649035380269
>   SIM IMSI: ** MASKED **
>   Signal Level: 41%
>   Battery Level: 84%
>
>
> ===============================================================================
> << OutboundMessage >>
>
> -------------------------------------------------------------------------------
>  Gateway Id: *
>  Encoding: 7-bit
>  Date: Thu Aug 12 18:07:02 IST 2010
>  SMSC Ref No:
>  Recipient: +919618555511
>  Dispatch Date: null
>  Message Status: FAILED
>  Validity Period (Hours): -1
>  Status Report: true
>  Source / Destination Ports: -1 / -1
>  Flash SMS: false
>  Text: Test Message from sony ericssion Test Message from sony ericssion
> Test Message from sony ericssion Test Message from sony ericssionTest
> Message from sony ericssionTest Message from sony ericssionTest Message from
> sony ericssion
>  PDU data: <cannot extract properly, udh present>
>
> ===============================================================================
>
> Now Sleeping - Hit <enter> to terminate.
>
> BUILD SUCCESSFUL (total time: 36 seconds)
>
>
> *PROGRAM*
> *
> *
> *
> // SendMessage.java - Sample application.
> //
> // This application shows you the basic procedure for sending messages.
> // You will find how to send synchronous and asynchronous messages.
> //
> // For asynchronous dispatch, the example application sets a callback
> // notification, to see what's happened with messages.
>
> package oldsmslib;
>
> import org.smslib.*;
> import org.smslib.modem.SerialModemGateway;
>
> public class SendMessage1
> {
>  public void doIt() throws Exception
>  {
> Service srv;
>  OutboundMessage msg;
>
> 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());
>
> srv = new Service();
>  SerialModemGateway gateway = new SerialModemGateway("", "COM19", 19200,
> "","");
>  gateway.setInbound(true);
>  gateway.setOutbound(true);
>  gateway.setSimPin("0000");
> // gateway.setOutboundNotification(outboundNotification);
>  srv.addGateway(gateway);
>
> srv.startService();
>  System.out.println();
>  System.out.println("Modem Information:");
>  System.out.println("  Manufacturer: " + gateway.getManufacturer());
>  System.out.println("  Model: " + gateway.getModel());
>  System.out.println("  Serial No: " + gateway.getSerialNo());
>  System.out.println("  SIM IMSI: " + gateway.getImsi());
>  System.out.println("  Signal Level: " + gateway.getSignalLevel() + "%");
>  System.out.println("  Battery Level: " + gateway.getBatteryLevel() +
> "%");
>  System.out.println();
>
> // Send a message synchronously.
>  msg = new OutboundMessage("+919618555511", "Test Message from sony
> ericssion Test Message from sony ericssion Test Message from sony ericssion
> Test Message from sony ericssionTest Message from sony ericssionTest Message
> from sony ericssionTest Message from sony ericssion");
>         msg.setStatusReport(true);
> srv.sendMessage(msg);
>  System.out.println(msg);
>
> // Or, send out a WAP SI message.
>  //OutboundWapSIMessage wapMsg = new OutboundWapSIMessage("+306948494037",
>  new URL("https://mail.google.com/";), "Visit GMail now!");
>  //srv.sendMessage(wapMsg);
>  //System.out.println(wapMsg);
>
> // You can also queue some asynchronous messages to see how the callbacks
>  // are called...
>  //msg = new OutboundMessage("+309999999999", "Wrong number!");
>  //msg.setPriority(OutboundMessage.Priorities.LOW);
>  //srv.queueMessage(msg, gateway.getGatewayId());
>  //msg = new OutboundMessage("+308888888888", "Wrong number!");
>  //msg.setPriority(OutboundMessage.Priorities.HIGH);
>  //srv.queueMessage(msg, gateway.getGatewayId());
>
> System.out.println("Now Sleeping - Hit <enter> to terminate.");
>  System.in.read();
>
> srv.stopService();
>  }
>
>  public class OutboundNotification implements IOutboundMessageNotification
>  {
> public void process(String gatewayId, OutboundMessage msg)
>  {
> System.out.println("Outbound handler called from Gateway: " + gatewayId);
>  System.out.println(msg);
>  }
> }
>
> public static void main(String args[])
>  {
> SendMessage1 app = new SendMessage1();
>  try
> {
>  app.doIt();
>  }
> catch (Exception e)
>  {
> e.printStackTrace();
>  }
> }
> }
>
> *
>
>  --
> You received this message because you are subscribed to the Google Groups
> "SMSLib User Group" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<smslib%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/smslib?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"SMSLib User Group" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/smslib?hl=en.

Reply via email to