Use another phone.

http://code.google.com/p/smslib/wiki/Compatibility#Incompatible_GSM_Modems/Phones


On Oct 23, 1:09 pm, Mithun <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've Nokia N70 connected to my PC via USB port. I've installed java
> comm and rxtx-2.1-7-bins-r2 on my machine.
> But when i run given examples "ReadMessages/SendMessages" it fails
> with following exception
>
> Example: Read messages from a serial gsm modem.
> SMSLib: A Java API library for sending and receiving SMS via a GSM
> modem
> or other supported gateways.
> Web Site:http://smslib.org
> This software is distributed under the terms of the Apache v2.0
> License.
> Version: 3.3.0>>> Gateway Status change for modem.com1, OLD: STOPPED -> NEW: 
> RESTART
> >>> Gateway Status change for modem.com1, OLD: RESTART -> NEW: STOPPED
>
> org.smslib.TimeoutException: No response from device.
>         at org.smslib.modem.AModemDriver$CharQueue.get(AModemDriver.java:489)
>         at org.smslib.modem.AModemDriver.getResponse(AModemDriver.java:287)
>         at org.smslib.modem.athandler.ATHandler.init(ATHandler.java:107)
>         at org.smslib.modem.AModemDriver.connect(AModemDriver.java:146)
>         at org.smslib.modem.ModemGateway.startGateway(ModemGateway.java:108)
>         at org.smslib.Service$1Starter.run(Service.java:226)
>
> CommTest example is running fine, but don't know why this one fails.
>
> Below is the code i'm using to read messages
>
> List<InboundMessage> msgList;
>                 InboundNotification inboundNotification = new 
> InboundNotification();
>                 CallNotification callNotification = new CallNotification();
>                 GatewayStatusNotification statusNotification = new
> GatewayStatusNotification();
>                 try{
>                         System.out.println("Example: Read messages from a 
> serial gsm
> modem.");
>                         System.out.println(Library.getLibraryDescription());
>                         System.out.println("Version: " + 
> Library.getLibraryVersion());
>                         this.srv = new Service();
>                         // Create the Gateway representing the serial GSM 
> modem.
>                         SerialModemGateway gateway = new 
> SerialModemGateway("modem.com1",
> "COM3", 57600, "Nokia", "N70");
>                         // Set the modem protocol to PDU (alternative is 
> TEXT). PDU is the
> default, anyway...
>                         gateway.setProtocol(Protocols.PDU);
>                         // Do we want the Gateway to be used for Inbound 
> messages?
>                         gateway.setInbound(true);
> //                      Let SMSLib know which is the SIM PIN.
>                         gateway.setSimPin("0000");
>                         // Set up the notification methods.
>                         this.srv.setInboundNotification(inboundNotification);
>                         this.srv.setCallNotification(callNotification);
>                         
> this.srv.setGatewayStatusNotification(statusNotification);
>                         // Add the Gateway to the Service object.
>                         this.srv.addGateway(gateway);
>                         // Similarly, you may define as many Gateway objects, 
> representing
>                         // various GSM modems, add them in the Service object 
> and control
> all of them.
>                         // Start! (i.e. connect to all defined Gateways)
>                         this.srv.startService();
>
> Any help is Appreciated.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SMSLib Support 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