its huawei E1552... i still did not manage to solve it but i already had a work around for it... i guess its fine for me for now... thanks so much for the active response, thanasis...
On Mon, Mar 22, 2010 at 3:56 PM, Thanasis <[email protected]> wrote: > Hi, > > Which HUAWEI model is this? > > Never heard before about success only for the first read invocation... I am > really tired with this HUAWEI thing... :( > > On 22 March 2010 02:16, ken rothwyn mira <[email protected]> wrote: > >> >> yup... i can run it with success... but ReadMessages executes the >> readmessages() function only once so the CMGL error wont show... its like >> the CMGL throws an error after a successful readmessages() is executed... i >> did my homework and this is what i've discovered, the error disappears when >> i restart the service but the moment readmessages() fetches another set of >> messages, the error reappears... the com port is fine... i tried it with >> minicom and it works with AT commands but it returns error with AT+CMGL=0 or >> any number... it only works for AT+CMGL="ALL", AT+CMGL="UNREAD" and >> AT+CMGL="READ"... >> >> this is my log: >> >> >> Fetching sms... >> 449951 2010-03-22 08:11:27,081 [Timer-0] DEBUG org.smslib.helper.Logger - >> GTW: huawei1: SEND :AT+CPMS="SM"(cr) >> OK9956 2010-03-22 08:11:27,086 [Timer-0] DEBUG org.smslib.helper.Logger - >> GTW: huawei1: BUFFER: +CPMS: 0,40,0,40,0,40 >> 449957 2010-03-22 08:11:27,087 [Timer-0] DEBUG org.smslib.helper.Logger - >> GTW: huawei1: RECV :+CPMS: 0,40,0,40,0,40(cr)OK(cr) >> 449957 2010-03-22 08:11:27,087 [Timer-0] DEBUG org.smslib.helper.Logger - >> GTW: huawei1: SEND :AT+CMGL=4(cr) >> 449961 2010-03-22 08:11:27,091 [Timer-0] DEBUG org.smslib.helper.Logger - >> GTW: huawei1: BUFFER: OK >> 449961 2010-03-22 08:11:27,091 [Timer-0] DEBUG org.smslib.helper.Logger - >> GTW: huawei1: RECV :OK(cr) >> 449961 2010-03-22 08:11:27,091 [Timer-0] DEBUG org.smslib.helper.Logger - >> GTW: huawei1: CheckMpMsgList(): MAINLIST: 0 >> 451682 2010-03-22 08:11:28,812 [QueueManager [huawei1]] DEBUG >> org.smslib.helper.Logger - Running... >> Sending sms... >> 456682 2010-03-22 08:11:33,812 [QueueManager [huawei1]] DEBUG >> org.smslib.helper.Logger - Running... >> Fetching sms... >> 459951 2010-03-22 08:11:37,081 [Timer-0] DEBUG org.smslib.helper.Logger - >> GTW: huawei1: SEND :AT+CPMS="SM"(cr) >> OK9957 2010-03-22 08:11:37,087 [Timer-0] DEBUG org.smslib.helper.Logger - >> GTW: huawei1: BUFFER: +CPMS: 1,40,1,40,1,40 >> 459957 2010-03-22 08:11:37,087 [Timer-0] DEBUG org.smslib.helper.Logger - >> GTW: huawei1: RECV :+CPMS: 1,40,1,40,1,40(cr)OK(cr) >> 459957 2010-03-22 08:11:37,087 [Timer-0] DEBUG org.smslib.helper.Logger - >> GTW: huawei1: SEND :AT+CMGL=4(cr) >> 459960 2010-03-22 08:11:37,090 [Timer-0] DEBUG org.smslib.helper.Logger - >> GTW: huawei1: BUFFER: ERROR >> 459960 2010-03-22 08:11:37,090 [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:467) >> at Sms$FetchSms.run(Sms.java:450) >> >> at java.util.TimerThread.mainLoop(Timer.java:512) >> at java.util.TimerThread.run(Timer.java:462) >> >> >> in the first execution of readmessages() -- prints "fetching sms..." --, >> AT+CMGL=4 returns ok but on the next execution the error apears... it >> returns error to AT+CMGL=4... >> >> >> >> On Sun, Mar 21, 2010 at 5:31 PM, Thanasis <[email protected]> wrote: >> >>> 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]<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]<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]<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.
