Fail to get message content


#1

hi, everyone .
if i setup in this way :
adl_atCmdCreate ( “AT+CNMI=2,1,0,0,0”, FALSE, ( adl_atRspHandler_t ) NULL, NULL );
adl_atUnSoSubscribe ( “+CMTI:”, incomplete_message_disposal );//fail to read the content
inside the function incomplete_message_disposal, i call the follow function;
void select_message(u8 messageLocation)
{
switch(messageLocation)
{
case 1: adl_atCmdCreate ( “AT+CMGR=1”, FALSE, ( adl_atRspHandler_t ) read_message,"+CMGR: “, NULL ); break;
case 2: adl_atCmdCreate ( “AT+CMGR=2”, FALSE, ( adl_atRspHandler_t ) read_message,”+CMGR: “, NULL ); break;
case 3: adl_atCmdCreate ( “AT+CMGR=3”, FALSE, ( adl_atRspHandler_t ) read_message,”+CMGR: “, NULL ); break;

}
}
then i send 678 by mobile to it.
the message response in this way:
+CMGR: “REC READ”,”+8613148842706",“08/05/16,20:05:23+32”
no message content in it at all, why?
if i setup in this way:
adl_atCmdCreate ( “AT+CNMI=2,2,0,0,0”, FALSE, ( adl_atRspHandler_t ) NULL, NULL );
adl_atUnSoSubscribe ( “+CMT:”, message_disposal );
i get the message content :
+CMT: “+8613148842706”,“08/05/17,11:22:21+32”
678


#2

Your function “read_message” should be called at least 3 times if there is a valid SMS at the position you read from.
First time: “+CMGR: …”
Second time: Message text.
Third time: “OK”


#3

to be exactly:
adl_atCmdCreate ( “AT+CMGR=1”, FALSE, ( adl_atRspHandler_t ) read_message,"+CMGR: “, NULL );
should be modified as follow:
adl_atCmdCreate ( “AT+CMGR=1”, FALSE, ( adl_atRspHandler_t ) read_message,”*", NULL );
and will receive the content of the message.
thanks, but if a long messege was sent in several segments , the content seem incorrected!


#4

Any reason why you’re using AT Commands rather than the ADL SMS Service??


#5

When you use adl_smsSubscribe(), you receive the incoming message directly - it does not get stored.
Therefore there is no need to know its index, nor to delete it.


#6

Wavecom Module , need to be enhanced in many way! No really practise, i think.