I have downloaded the latest version only i.e. v3.4.4. Actually
"smslib-v3[1].4.4" is the name of the zip file that is downloaded

Following is the latest log of the ReadMessages program. The interrupted
exception is not coming, but the "String index out of range: -1" is still
coming. In this log the "E" message was already there in the inbox. It was
read fine, but when I sent the new message, the exception came. Is there any
way to debug the actual issue?

------------------------------------------------------------------------------------------------------------------------------
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.4
Nov 19, 2009 9:44:13 PM org.smslib.helper.Logger logInfo
INFO: SMSLib: A Java API library for sending and receiving SMS via a GSM
modem o
r other supported gateways.
This software is distributed under the terms of the Apache v2.0 License.
Web Site: http://smslib.org
Nov 19, 2009 9:44:14 PM org.smslib.helper.Logger logInfo
INFO: Version: 3.4.4
Nov 19, 2009 9:44:14 PM org.smslib.helper.Logger logInfo
INFO: JRE Version: 1.6.0_13
Nov 19, 2009 9:44:14 PM org.smslib.helper.Logger logInfo
INFO: JRE Impl Version: 11.3-b02
Nov 19, 2009 9:44:14 PM org.smslib.helper.Logger logInfo
INFO: O/S: Windows XP / x86 / 5.1
Nov 19, 2009 9:44:14 PM org.smslib.helper.Logger logInfo
INFO: GTW: modem.com1: Starting gateway, using Wavecom (Generic) AT Handler.
Nov 19, 2009 9:44:14 PM org.smslib.helper.Logger logInfo
INFO: GTW: modem.com1: Opening: COM1 @115200
Nov 19, 2009 9:44:31 PM org.smslib.helper.Logger logInfo
INFO: GTW: modem.com1: GSM: Registered to home network.
>>> Gateway Status change for modem.com1, OLD: STOPPED -> NEW: STARTING
Nov 19, 2009 9:44:31 PM org.smslib.helper.Logger logInfo
INFO: GTW: modem.com1: Gateway started.
>>> Gateway Status change for modem.com1, OLD: STARTING -> NEW: STARTED
Modem Information:
  Manufacturer:  WAVECOM WIRELESS CPU
  Model:  MULTIBAND  900E  1800
  Serial No: 352238020010757
  SIM IMSI: ** MASKED **
  Signal Level: 90%
  Battery Level: 0%

===============================================================================
<< InboundMessage >>
-------------------------------------------------------------------------------
 Gateway Id: modem.com1
 Encoding: 7-bit
 Date: Thu Nov 19 21:17:28 IST 2009
 Dispatched via SMSC: 919814047105
 Text: E
 PDU data: 45
 Originator: +919814012345
 Memory Index: 1
 Multi-part Memory Index:
 Memory Location: SM
 Source / Destination Ports: -1 / -1
===============================================================================
Now Sleeping - Hit <enter> to stop service.
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:527)
        at org.smslib.modem.ModemGateway.readMessages(ModemGateway.java:206)
        at
org.smslib.modem.AModemDriver$AsyncMessageProcessor.run(AModemDriver.
java:891)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------

On Thu, Nov 19, 2009 at 4:28 PM, Thanasis <[email protected]> wrote:

> I don't get this naming: "smslib-v3[1].4.4". You can find the latest
> release here: http://smslib.org
>
> Q2: Usually not, but it depends. As a good practice, you should delete
> the messages you have already processed from your inbox. I mean, do
> not keep already-read messages in your inbox.
>
> On Nov 19, 12:22 pm, Atul Kumar <[email protected]> wrote:
> > I have installed the latest version smslib-v3[1].4.4 yesterday itself
> >
> > But, unfortunately getting the same error :-(
> > One thing I would like ask, in case of notifications messages, does the
> flow
> > also reads message through main message-read-loop only?
> >
> > Please help I am stuck badly on this applications
> >
>  > On Thu, Nov 19, 2009 at 2:33 PM, Thanasis <[email protected]>
> wrote:
> > > Hi,
> >
> > > The first "InterruptedException" is nothing to worry about - in fact,
> > > its fixed in the latest release.
> >
> > > The second one though (the "String index out of range: -1") is a
> > > problem... This usually comes up in case of unrecognizable messages.
> > > That's why I can't understand the described behavior.
> >
> > > Can you download the latest release and check if this happens there as
> > > well?
> >
> > > On Nov 19, 10:37 am, Atul Kumar <[email protected]> wrote:
> > > > Hi,
> >
> > > > Please find the responses -
> >
> > > > 1. Whatever the number of messages in the inbox(i tested with 3,4,5
> > > > etc), upon starting the application, all the messages get read
> through
> > > > the main message-read-loop
> > > > 2. You are right. After these messages have been read, I send a new
> > > > message "B", but I get the exception
> > > > 3. And if I restart SMSLib, the new message "B" also gets read
> through
> > > > the main message-read-loop
> >
> > > > Following is the exception I get when SMSLib is running and any new
> > > > message "B" is received
> >
> > > > INFO: Interrupted!
> > > > java.lang.InterruptedException: sleep interrupted
> > > >         at java.lang.Thread.sleep(Native Method)
> > > >         at org.smslib.threading.AServiceThread.run
> > > > (AServiceThread.java:
> > > > 121)
> >
> > > > 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)
> >
> > > > On Nov 19, 2:24 am, Thanasis <[email protected]> wrote:
> >
> > > > > Hi,
> >
> > > > > Can you please tell me:
> >
> > > > > 1) How many messages do you have in your inbox *before* starting
> > > > > smslib? 2? 10?
> > > > > 2) Upon starting SMSLib, do all messages in (1) get read? Not from
> the
> > > > > notifications but from the main message-read-loop.
> >
> > > > > I also assume that *after* SMSLib performs the initial read of all
> > > > > existing messages, you just send a "B" and expect the callback to
> > > > > fire, right?
> >
> > > --
> >
> > > 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=.
>
> --
>
> 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=.
>
>
>

--

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=.


Reply via email to