I figured out the problem.

I tried to simulate sending of AT commands to my phone (Sony Ericsson
z610i) using Putty with the sony ericsson documentation of AT
commands. I found out that SMSlib reads also the sent items in my
phone whenever it tries to list the messages. These are some of the AT
commands i executed to figure out the problem:

AT+CPMS="ME"
* Will select the phone memory storage, since my sony ericsson's using
the phone memory



+CPMS: 470,1000,0,35,470,1000
* modem will out this. which is equivalent to
<used1>,<total1>,<used2>,<total2>,<used3>,<total3> where 1 is where
msgs are read, 2 msgs are written, 3 Memory to which received SMs are
preferred to be stored


AT+CMGL=4
* this command will list all the messages (read,unread, unsent, sent)


+CMGL: 2,3,,154
07919002184598F651830C913619871196550000ADA0050003010201F2753828EC7E83C461903BBC0EB3C3E7701EA40EBB7F2076F81CCE83DA6F103BEC3E839AC4A2141A69BEC569761914A687417537882C06CDC7E8723B0C72E7C36E970B040FD3D3A0BAFB0C9297E3F5F29C0EAACBD9A075DD7D06CDC36E903BBC0EA7DD737A98CD06D5DD67D0BD2C9E97E5F6B2DC0542D3E970DDEB85C7E35D783CDE8577E15F
+CMGL: 3,3,,48
07919002184598F651840C913619871196550000AD26050003010202EE65F1BC2CB797E52FF2FBEE66BFC364990B8E8683C2F430281F7603
+CMGL: 4,3,,21
079136290200511011A30C913619871196550000FF08D3B01BB406B97F

*these are the output of the command. The string x,x,,x means index,
stat, alpha, length and the long string is the PDU which gets parsed
by the smslib to get the message contents.

I figured out that the ATHandler issues to get ALL messages. Well,
there are Message Classes, MessageClasses.ALL(4),
MessageClasses.UNREAD (0), and MessageClasses.READ(1).

For now, what i intend to do is to subclass the ATHandler and override
the listMessage method to get only the UNREAD messages. But i think it
will be better to have more MessageClasses like INBOX,SENT, etc... I
dont know the behavior of other modems/phones. But for sony ericsson
if we would like to both get both READ and UNREAD messages, we could
just issue 2 modem AT commands for this. But then again, if we do
this, we will also get 2 response. If there could only be a way handle
multiple response for listing messages in ATHandler, it will be great.
By the way, can we concatenate modem responses strings and return it?



On Nov 16, 12:17 pm, Jejo <[EMAIL PROTECTED]> wrote:
> I already deleted my inbox messages.
>
> On Nov 16, 11:42 am, "priya shetty" <[EMAIL PROTECTED]> wrote:
>
> > Hi,
>
> >    It looks like your Inbox has some unhandled Messages like
> > ringtones,Pictures etc..
> >    please delete those and try again.
>
> > 2008/11/16 Jejo <[EMAIL PROTECTED]>
>
> > > Hi,
>
> > > I am trying to use my Sony Ericsson z610i as a modem. The inbound and
> > > outbound messages is working for SMSServer  and i can see their
> > > entries in the database. Its just that i have some runtime exceptions
> > > when reading messages.
>
> > > java.lang.RuntimeException
> > >        at org.smslib.modem.ModemGateway.readMessagesPDU(ModemGateway.java:
> > > 482)
> > >        at 
> > > org.smslib.modem.ModemGateway.readMessages(ModemGateway.java:147)
> > >        at org.smslib.Service.readMessages(Service.java:435)
> > >        at org.smslib.Service.readMessages(Service.java:339)
> > >        at org.smslib.smsserver.SMSServer.readMessages(SMSServer.java:348)
> > >        at org.smslib.smsserver.SMSServer$InboundPollingThread.run
> > > (SMSServer.java:253)
> > > 2008-11-16 01:31:25,551 ERROR [org.smslib] - GTW: modem1: ERROR PDU:
>
> > > 07819002184598F611AF0C913619452636040000FF39D534087E2783C4EE33882C03D1C37550FBBCA68741F330681C66D3CB785078FD06D1E1613AC87D06C9DFE21F882803B94171
> > > 2008-11-16 01:31:25,551 DEBUG [org.smslib] - GTW: modem1: READ PDU:
>
> > > 07819002184598F611B00C913629828393940000FF274A360B449481E2A071984D2FE35D2E17882803B9D9EE33881EAE83DAE532DDE5728100
> > > 2008-11-16 01:31:25,551 ERROR [org.smslib] - GTW: modem1: Unhandled
> > > SMS in inbox, skipping...
>
> > > Also, when i am running the ReadMessages.java, I also get the same
> > > error at the start and this:
>
> > > ===============================================================================
> > > << UNKNOWN MESSAGE DUMP >>
>
> > > -------------------------------------------------------------------------------
> > >  Gateway Id: modem.com1
> > >  Memory Index: 975
> > >  Memory Location: ME
>
> > > ===============================================================================
>
> > > Is this a memory location problem? I am wondering if I need to create
> > > a new ATHandler class and set a new Storage Location or set a new
> > > PduProtocol.
>
> > > I tried searching google for AT commands for Sony Ericsson z610i and
> > > found this:http://developer.sonyericsson.com/getDocument.do?docId=65054.
>
> > > I hope it can help.
>
> > --
> > Knowledge not shared is Knowledge Wasted
> > Priyanka Shetty.P
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SMSLib Users 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