@Peogrammer Base : For #2 , I think modem is compatible because I connected the modem through the HyperTerminal. Whenever a new message is received, the hyperteminal shows the command
+CMTI: "SM", 8 It has one SIM card slot It is a serial modem @Thanasis It is a normal text message. Also upon restart , the same message is read without any error as shown below =========================================================================== ==== > << InboundMessage >> > ------------------------------------------------------------------------------- > Gateway Id: modem.com1 > Encoding: 7-bit > Date: Tue Nov 17 20:39:36 IST 2009 > Dispatched via SMSC: 919814047105 > Text: B > PDU data: 42 > Originator: 919814012345 > Memory Index: 1 > Multi-part Memory Index: > Memory Location: SM > Source / Destination Ports: -1 / -1 > =============================================================================== On Nov 18, 4:35 pm, Thanasis <[email protected]> wrote: > Hi, > > One explanatiion for the "IndexOutOfBoundsException" you are seeing is > that you have some sort of message that SMSLib cannot process. For > example, SMSLib cannot process vcards or mms etc. Can you check your > inbox for such messages? > > On Nov 18, 10:43 am, Atul Kumar <[email protected]> wrote: > > > > > No comments on this till now, I think I am not been clear on this, let > > me rephrase this for better understanding > > > I am not able to recieve incoming messages through > > InboundNotifications. While running the ReadMessages example, when the > > new message is received, I get the following error and the program > > exits - > > > Nov 17, 2009 9:04:48 PM org.slf4j.impl.JCLLoggerAdapter info > > > > INFO: Interrupted! > > > java.lang.InterruptedException: sleep interrupted > > > at java.lang.Thread.sleep(Native Method) > > > at org.smslib.threading.AServiceThread.run(AServiceThread.java: > > > 121) > > > > I AM HERE > > > Exception in thread "SMSLib-AsyncMessageProcessor : modem.com1" > > > java.lang.String > > > IndexOutOfBoundsException: String index out of range: -1 > > > at java.lang.String.substring(Unknown Source) > > > at org.smslib.modem.ModemGateway.readMessagesPDU > > > (ModemGateway.java:494) > > > at org.smslib.modem.ModemGateway.readMessages > > > (ModemGateway.java:181) > > > at org.smslib.modem.AModemDriver$AsyncMessageProcessor.run > > > (AModemDriver. > > > java:864) > > > Please help on this > > > On Nov 17, 8:48 pm, Atul Kumar <[email protected]> wrote: > > > > Hi > > > > I am using a Wavecom chipset based Maestro Heritage GSM modem. While > > > running the ReadMessages.java example, I am able to succesfully read > > > the messages that are already present in the "SM" memory. The examples > > > also sets the InboundNotification. But while the application is > > > running and a new message arrives, the application throws an > > > exception. Below is the log of the application > > > > D:\jun-10\code\SMS_Lib\smslib-v3[1].4.2\dist\classes>java > > > examples.modem.ReadMes > > > sages > > > Example: Read messages from a serial gsm modem. > > > SMSLib: A Java API library for sending and receiving SMS via a GSM > > > modem or othe > > > r supported gateways. > > > This software is distributed under the terms of the Apache v2.0 > > > License. > > > Web Site:http://smslib.org > > > Version: 3.4.2 > > > SLF4J: Class path contains multiple SLF4J bindings. > > > SLF4J: Found binding in [jar:file:/C:/Program%20Files/Java/jre6/lib/ > > > ext/slf4j-jc > > > l-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class] > > > SLF4J: Found binding in [jar:file:/C:/Program%20Files/Java/jre6/lib/ > > > ext/slf4j-jd > > > k14-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class] > > > SLF4J: Found binding in [jar:file:/C:/Program%20Files/Java/jre6/lib/ > > > ext/slf4j-lo > > > g4j12-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class] > > > SLF4J: Seehttp://www.slf4j.org/codes.html#multiple_bindingsforan > > > explanation. > > > > Nov 17, 2009 9:00:35 PM org.slf4j.impl.JCLLoggerAdapter info > > > INFO: GTW: modem.com1: Starting gateway, using Generic AT Handler. > > > Nov 17, 2009 9:00:35 PM org.slf4j.impl.JCLLoggerAdapter info > > > INFO: GTW: modem.com1: Opening: COM1 @115200 > > > Nov 17, 2009 9:00:42 PM org.slf4j.impl.JCLLoggerAdapter info > > > INFO: GTW: modem.com1: GSM: Registered to home network. > > > Nov 17, 2009 9:00:42 PM org.slf4j.impl.JCLLoggerAdapter info > > > INFO: GTW: modem.com1: MEM: Storage Locations Found: SM > > > OKMI =+CNMI: (0-3),(0-3),(0-3),(0-2),(0,1)>>> Gateway Status change for > > > modem.com1, OLD: STOPPED -> NEW: STARTING > > > >>> Gateway Status change for modem.com1, OLD: STARTING -> NEW: STARTED > > > > Nov 17, 2009 9:00:42 PM org.slf4j.impl.JCLLoggerAdapter info > > > INFO: GTW: modem.com1: Gateway started. > > > > Modem Information: > > > Manufacturer: WAVECOM WIRELESS CPU > > > Model: MULTIBAND 900E 1800 > > > Serial No: 352238020010757 > > > SIM IMSI: ** MASKED ** > > > Signal Level: 100% > > > Battery Level: 0% > > > > I AM HERE > > > Now Sleeping - Hit <enter> to stop service. > > > > Nov 17, 2009 9:00:49 PM org.slf4j.impl.JCLLoggerAdapter info > > > INFO: GTW: modem.com1: Stopping gateway...>>> Gateway Status change for > > > modem.com1, OLD: STARTED -> NEW: STOPPING > > > >>> Gateway Status change for modem.com1, OLD: STOPPING -> NEW: STOPPED > > > > Nov 17, 2009 9:00:49 PM org.slf4j.impl.JCLLoggerAdapter info > > > INFO: GTW: modem.com1: Closing: COM1 @115200 > > > Nov 17, 2009 9:00:49 PM org.slf4j.impl.JCLLoggerAdapter info > > > INFO: GTW: modem.com1: Gateway stopped. > > > > D:\jun-10\code\SMS_Lib\smslib-v3[1].4.2\dist\classes>java > > > examples.modem.ReadMes > > > sages > > > Example: Read messages from a serial gsm modem. > > > SMSLib: A Java API library for sending and receiving SMS via a GSM > > > modem or othe > > > r supported gateways. > > > This software is distributed under the terms of the Apache v2.0 > > > License. > > > Web Site:http://smslib.org > > > Version: 3.4.2 > > > SLF4J: Class path contains multiple SLF4J bindings. > > > SLF4J: Found binding in [jar:file:/C:/Program%20Files/Java/jre6/lib/ > > > ext/slf4j-jc > > > l-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class] > > > SLF4J: Found binding in [jar:file:/C:/Program%20Files/Java/jre6/lib/ > > > ext/slf4j-jd > > > k14-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class] > > > SLF4J: Found binding in [jar:file:/C:/Program%20Files/Java/jre6/lib/ > > > ext/slf4j-lo > > > g4j12-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class] > > > SLF4J: Seehttp://www.slf4j.org/codes.html#multiple_bindingsforan > > > explanation. > > > > Nov 17, 2009 9:04:15 PM org.slf4j.impl.JCLLoggerAdapter info > > > INFO: GTW: modem.com1: Starting gateway, using Generic AT Handler. > > > Nov 17, 2009 9:04:15 PM org.slf4j.impl.JCLLoggerAdapter info > > > INFO: GTW: modem.com1: Opening: COM1 @115200 > > > Nov 17, 2009 9:04:15 PM org.slf4j.impl.JCLLoggerAdapter error > > > SEVERE: GTW: modem.com1: Framing Error! > > > Nov 17, 2009 9:04:22 PM org.slf4j.impl.JCLLoggerAdapter info > > > INFO: GTW: modem.com1: GSM: Registered to home network. > > > Nov 17, 2009 9:04:22 PM org.slf4j.impl.JCLLoggerAdapter info > > > INFO: GTW: modem.com1: MEM: Storage Locations Found: SM > > > OKMI =+CNMI: (0-3),(0-3),(0-3),(0-2),(0,1)>>> Gateway Status change for > > > modem.com1, OLD: STOPPED -> NEW: STARTING > > > >>> Gateway Status change for modem.com1, OLD: STARTING -> NEW: STARTED > > > > Nov 17, 2009 9:04:22 PM org.slf4j.impl.JCLLoggerAdapter info > > > INFO: GTW: modem.com1: Gateway started. > > > > Modem Information: > > > Manufacturer: WAVECOM WIRELESS CPU > > > Model: MULTIBAND 900E 1800 > > > Serial No: 352238020010757 > > > SIM IMSI: ** MASKED ** > > > Signal Level: 100% > > > Battery Level: 0% > > > > I AM HERE > > > memIndex is1 > > > =========================================================================== > > > ==== > > > << InboundMessage >> > > > --------------------------------------------------------------------------- > > > ---- > > > Gateway Id: modem.com1 > > > Encoding: 7-bit > > > Date: Tue Nov 17 20:39:36 IST 2009 > > > Dispatched via SMSC: 919814047105 > > > Text: B > > > PDU data: 42 > > > Originator: 919814012345 > > > Memory Index: 1 > > > Multi-part Memory Index: > > > Memory Location: SM > > > Source / Destination Ports: -1 / -1 > > > =========================================================================== > > > ==== > > > > Now Sleeping - Hit <enter> to stop service. > > > Nov 17, 2009 9:04:48 PM org.slf4j.impl.JCLLoggerAdapter info > > > INFO: Interrupted! > > > java.lang.InterruptedException: sleep interrupted > > > at java.lang.Thread.sleep(Native Method) > > > at org.smslib.threading.AServiceThread.run(AServiceThread.java: > > > 121) > > > > I AM HERE > > > Exception in thread "SMSLib-AsyncMessageProcessor : modem.com1" > > > java.lang.String > > > IndexOutOfBoundsException: String index out of range: -1 > > > at java.lang.String.substring(Unknown Source) > > > at org.smslib.modem.ModemGateway.readMessagesPDU > > > (ModemGateway.java:494) > > > at org.smslib.modem.ModemGateway.readMessages > > > (ModemGateway.java:181) > > > at org.smslib.modem.AModemDriver$AsyncMessageProcessor.run > > > (AModemDriver. > > > java:864) > > > > Are the callback notifications not been set properly? > > > > Thanks in advance > > > Atul- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "SMSLib for Java User Group" group. To post to this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/smslib?hl=.
