SMS not receiving after adl_smssubscribe

In Q24plus

  If already SMS is there in the inbox (inbox not full) before  adl_smssubscribe() then my application not receiving SMS from handler.

Step1: After starting my application and sim initialization i am subscribing to SMS and deleting the Inbox AT+CMGD=1,4) during that time If any new SMS comes and stored inbox then my sms data handler will not receive any sms.

If i check with AT+CMGL=“REC UNREAD” i can see the message from my hyperterminal but this sms not given to my application. And also no sms after this will come to my application.

What could be the problem?

my handler returns FALSE (inorder to not to store in memory of sim or module) after receiving SMS when it works properly.


There is no problem - this is the correct operation.

To retrieve messages that have already been received and placed onto the SIM, you will have to use the AT+CMGR, etc, commands.

Not the existing one apart from this any new messages comes i am not receiving through sms data handler i can see messages in the inbox from hyperterminal ( it gives “REC UNREAD” ) during running . but not given to openat application currently running.

Did you check that the subscription actually worked?

Yes i am getting return status OK after calling adl_smssubscribe().

Please see the code below.

Siminit_handler(u8 event)
smsHandler = adl_smsSubscribe( (adl_smsHdlr_f) smsDataHandler, (adl_smsCtrlHdlr_f) smsCtrlHandler, ADL_SMS_MODE_TEXT);
	  _AT_RSP_TRUE( "\r\n SMS subscribe error\r\n");    
		  _AT_RSP_TRUE( "\r\n SMS SUBSCRIBE OK\r\n"); 

               adl_atCmdCreate("AT+CMGD=1,4",ADL_AT_PORT_TYPE( ADL_AT_UART1, TRUE),(adl_atRspHandler_t) atCmdRspHandler, "*", NULL);

The scenario is if any new sms comes during processing of command AT+cmgd=1,4 ( deletion already started). There onwards any new sms comming will be not giving to SMS data handler this i can see thro my HT. Only AT+CMGR will work to read the SMSs received.

Why do you wait for deletion until subscription?
I think it’s better, start deleting and subcribe after.
Anyway, do you recieve unsolicited “+CMTI: …” when new SMS came?

My application not receives any Unsolicited codes like +CMTI and also i have not subscribed to adl_atUnSoSubscribe().

Not necessarily. But I find better to do it in that order.

Not sure, but I don’t think so. Anyway, I sugested to do it before SMS subscription, not before SIM subscription.

Subscribe to the unsolicited +CMTI, to check the SMS are recieved.

From what you’ve described, it sounds like there may be some issue about using both the ADL SMS Service and “manual” AT commands at the same time.

This doesn’t seem entirely unreasonable: it is conceivable that your “manual” AT commands could mess with ADL’s assumptions about the state of the system.
If it’s a real concern to you, you should raise it with your Distributor or Wavecom FAE; otherwise, play it safe!

No, of course it’s not!
Deleting SMS from the SIM obviously requires interaction with the SIM - and you obviously can’t do that before the SIM is ready! 8)

You did!

The +CMTI unsolicited responses are not enabled by default - you have to explicitly request them!

Your application will obviously not know about any unsolicited responses if you don’t subscribe them!

I’m not sure how much of a good idea this is if the ADL SMS Service is alreay trying to manage incoming SMS…

I will do it afet simint and before SMS subscription

Subscribe to the unsolicited +CMTI, to check the SMS are recieved.
i check in the document +CMTI is not in the list of unsolicited cmd string of adl_UnSoSubscribe().

Please see the list below

typedef enum
ADL_STR_NO_STRING, // Unknown string
ADL_STR_LAST_TERMINAL, // Terminal resp. are before this line
// Last string ID
} adl_strID_e;

Even though if it works i have to take care of string manipulations isn’t it? chances of freezing SMS data is more

I have one more query please.

If my sim inbox is full and my application starts and subscribes to SMS without deleting the inbox content through AT cmmds. Can i recieve new SMS in my sms handler?
I am returning FALSE from my sms handler.

Could you please quote where? :confused:

I’m not sure I’ve tried it, but I think the ID is used only for typical AT’s. Just use a different handler for +CMTI, you would not need complicated text handling.