Hi,

How could you run the ReadMessages with success?
>From what I see, the read command (CMGL) throws errors...

I see you are using a HUAWEI modem. Have you tried the alternate com ports?

On 21 March 2010 10:35, killua <[email protected]> wrote:

> im new to smslib.. i have successfully tried the sendsms and readsms
> example programs... i tried to combine the two, by creating two timer
> tasks that will look up to my database for sms to be sent and a task
> that will read the modem for unread messages and delete them after
> recording to the database... the sending part has no problem but the
> reading part has... at initial execution of the task it reads the
> unread messages from the modem but i cant read form new incoming
> messages anymore... im having this error...
>
>
>
> 570271 2010-03-21 16:32:22,170 [Timer-0] DEBUG
> org.smslib.helper.Logger  - GTW: huawei1: SEND :AT+CPMS="SM"(cr)
> OK0285 2010-03-21 16:32:22,184 [Timer-0] DEBUG
> org.smslib.helper.Logger  - GTW: huawei1: BUFFER: +CPMS:
> 0,50,0,50,0,50
> 570286 2010-03-21 16:32:22,185 [Timer-0] DEBUG
> org.smslib.helper.Logger  - GTW: huawei1: RECV :+CPMS:
> 0,50,0,50,0,50(cr)OK(cr)
> 570287 2010-03-21 16:32:22,186 [Timer-0] DEBUG
> org.smslib.helper.Logger  - GTW: huawei1: SEND :AT+CMGL=4(cr)
> 570304 2010-03-21 16:32:22,203 [Timer-0] DEBUG
> org.smslib.helper.Logger  - GTW: huawei1: BUFFER: ERROR
> 570305 2010-03-21 16:32:22,204 [Timer-0] DEBUG
> org.smslib.helper.Logger  - GTW: huawei1: RECV :ERROR(cr)
> java.lang.StringIndexOutOfBoundsException: String index out of range:
> -1
>        at java.lang.String.substring(String.java:1937)
>        at org.smslib.modem.ModemGateway.readMessagesPDU(ModemGateway.java:
> 539)
>        at org.smslib.modem.ModemGateway.readMessages(ModemGateway.java:207)
>        at org.smslib.Service.readMessages(Service.java:481)
>        at org.smslib.Service.readMessages(Service.java:369)
>        at Sms$FetchSms.readSms(Sms.java:464)
>        at Sms$FetchSms.run(Sms.java:448)
>        at java.util.TimerThread.mainLoop(Timer.java:512)
>        at java.util.TimerThread.run(Timer.java:462)
>
>
> i tried to set the memory location used to "SM" but still the same
> error...
> by the way, i cant use the inboundnotification for some reason thats
> why time after time i read for unread messages from the modem the
> delete them...
>
> --
> You received this message because you are subscribed to the Google Groups
> "SMSLib User Group" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<smslib%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/smslib?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"SMSLib User 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.

Reply via email to