Hey there! I'm just starting with SMSLib and I think it is great, but I'm 
having a problem trying to read the SR Memory. I can send and I can receive 
SMS, that works fine, but now I want to recieve delivery reports too, and I 
now that it can be requested like this:

OutboundMessage msg = new OutboundMessage("xxxxxxxxx", "Hello from 
SMSLib!");
*msg.setStatusReport(true);*
Service.getInstance().sendMessage(msg);

Now, I have read that Status Report messages are stored on "SR" memory, so 
I set that Storage Location to try to read messages on it and I get and 
exception:

Exception in thread "SMSLib-AsyncMessageProcessor : modem.com1" 
java.lang.StringIndexOutOfBoundsException: String index out of range: -12
at java.lang.String.substring(String.java:1911)
at org.smslib.modem.ModemGateway.readMessagesPDU(ModemGateway.java:552)
at org.smslib.modem.ModemGateway.readMessages(ModemGateway.java:213)
at 
org.smslib.modem.AModemDriver$AsyncMessageProcessor.run(AModemDriver.java:880)

This is really weird because if I set the Storage Location to the gateway 
"SM", "ME" or "MT" I can read all the messages stored on those memories, 
and I'm really sure my modem supports "SR" too, because I checked it with 
the appropiated AT command.

Any idea why this is happening? My modem is a D-Link, model DWM-156, 
hardware version A3 and I'm running this on Windows 7 with the last version 
of SMSLib.

Thank you guys!

-- 
You received this message because you are subscribed to the Google Groups 
"SMSLib Discussion Group" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/smslib/2662aea3-3f66-4003-963e-73a591013475%40googlegroups.com.


Reply via email to