I am trying to connect my Samsung Captivate to act as GSM modem. I was
able to send SMS but facing issues with reading SMS messages.
SerialModemGateway gateway = new SerialModemGateway("android1",
"COM4", 57600, "SAMSUNG", "");
gateway.getATHandler().setStorageLocations("SMME");
I get the following error:
java.lang.StringIndexOutOfBoundsException: String index out of range:
-12
at java.lang.String.substring(String.java:1937)
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 examples.modem.ReadMessages.doIt(ReadMessages.java:103)
at examples.modem.ReadMessages.main(ReadMessages.java:164)
If i change the storage location to "SM" - the output shows:
===============================================================================
<< UNKNOWN MESSAGE DUMP >>
-------------------------------------------------------------------------------
Gateway Id: android1
Memory Index: 1
Memory Location: SM
===============================================================================
When i was looking for resolution for this error i found that people
had signal level and battery level values as positive.
Mine is printed as:
Signal Level: -99 dBm
Battery Level: 0%
I have been trying to resolve this since few days now.
--
You received this message because you are subscribed to the Google Groups
"SMSLib Discussion 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.