Sending multiple sms


I tried to send multiple sms using

sms_handle = adl_smsSubscribe(sms_handler, sms_ctrl_handler,
		TRACE (( WD_TRACE_LEVEL, "WD: Subscribed sms handler: %d", sms_handle ));

		for (i = 0; i < phone_numbers_count; ++i) {
	                ret = adl_smsSend(sms_handle, number[i], msg, ADL_SMS_MODE_TEXT);
	                TRACE ((WD_TRACE_LEVEL, "WD: SMS sent to numlen %d text len %d ret %d\n",wm_strlen(number), wm_strlen(msg), ret));

		// Unsubscribe SMS Service
		i = adl_smsUnsubscribe(sms_handle);

the effect is that only the first sms is sent.

Is adl_smsSubscribe function asynchronous? Should i wait the ADL_SMS_EVENT_SENDING_OK event before to send the further sms?



I’m not surprised!


What does the return value from adl_smsSend tell you…?


sorry for late reply.

I was meaning Is adl_smsSend function asynchronous, not not adl_smsSubscribe.

It seems to work correctly using the sent event callback for to send the next messages.

but now I have another problem:
what happens if the openat app tries to send an sms and concurrently the modem receives an at command for to send the sms?
It seems the whole fasttrack hangs and not answers anymore. It is reasonable?



Just like sending an SMS “manually” using AT commands, An OK response from adl_smsSend just indicates that the request was accepted with no immediate errors in the parameters.

It then takes time to submit the SMS over the air, and to receive the network’s response.

The operation is not complete & ready for another SMS until you have received the final confimration (the message reference) or failure code.

Yes - that’s what it’s there for!

Better to start a new thread for the new problem, then.

You can always give a link to this one for reference…