nguyenbahuong / smslib

Automatically exported from code.google.com/p/smslib
0 stars 0 forks source link

java.lang.StringIndexOutOfBoundsException: String index out of range: -12 #536

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I am using reliance 3G data card to receive SMS. Getting problem in receiving 
messages. Plz. suggest what to do...

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.
This software is distributed under the terms of the Apache v2.0 License.
Web Site: http://smslib.org
Version: 3.5.1

Modem Information:
 Manufacturer: ZTE CORPORATION
 Model: MF190
 SIM IMSI: ** MASKED **
 Signal Level: -97%
 Battery Level: 100%

java.lang.StringIndexOutOfBoundsException: String index out of range: -12
    at java.lang.String.substring(String.java:1958)
    at org.smslib.modem.ModemGateway.readMessagesPDU(ModemGateway.java:544)
    at org.smslib.modem.ModemGateway.readMessages(ModemGateway.java:210)
    at org.smslib.Service.readMessages(Service.java:500)
    at org.smslib.Service.readMessages(Service.java:388)
    at javasmslib.ReceiveMessage.doIt(ReceiveMessage.java:93)
    at javasmslib.JavaSMSlib.main(JavaSMSlib.java:23)

Original issue reported on code.google.com by rancyl...@gmail.com on 17 Jun 2014 at 8:53

GoogleCodeExporter commented 9 years ago

Original comment by T.Delenikas on 5 Aug 2014 at 7:34