SMS not receiving after adl_smssubscribe


#1

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.


#2

Correct.

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.


#3

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.


#4

Did you check that the subscription actually worked?


#5

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

Please see the code below.

Siminit_handler(u8 event)
{
             switch(event)
	{
	case ADL_SIM_EVENT_FULL_INIT:
smsHandler = adl_smsSubscribe( (adl_smsHdlr_f) smsDataHandler, (adl_smsCtrlHdlr_f) smsCtrlHandler, ADL_SMS_MODE_TEXT);
             if(smsHandler<0)			
	  _AT_RSP_TRUE( "\r\n SMS subscribe error\r\n");    
		else		
		  _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);
           break;
     }      
}

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.


#6

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?


#7

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


#8

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.


#9

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…


#10

I will do it afet simint and before SMS subscription

Subscribe to the unsolicited +CMTI, to check the SMS are recieved.
[/quote]
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_OK, // “OK”
ADL_STR_BUSY, // “BUSY”
ADL_STR_NO_ANSWER, // “NO ANSWER”
ADL_STR_NO_CARRIER, // “NO CARRIER”
ADL_STR_CONNECT, // “CONNECT”
ADL_STR_ERROR, // “ERROR”
ADL_STR_CME_ERROR, // “+CME ERROR:”
ADL_STR_CMS_ERROR, // “+CMS ERROR:”
ADL_STR_CPIN, // “+CPIN:”
ADL_STR_LAST_TERMINAL, // Terminal resp. are before this line
ADL_STR_RING = ADL_STR_LAST_TERMINAL, // “RING”
ADL_STR_WIND, // “+WIND:”
ADL_STR_CRING, // “+CRING:”
ADL_STR_CPINC, // “+CPINC:”
ADL_STR_WSTR, // “+WSTR:”
ADL_STR_CMEE, // “+CMEE:”
ADL_STR_CREG, // “+CREG:”
ADL_STR_CGREG, // “+CGREG:”
ADL_STR_CRC, // “+CRC:”
ADL_STR_CGEREP, // “+CGEREP:”
// Last string ID
ADL_STR_LAST
} 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


#11

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.


#12

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.