SMS (Short Message Service) State Synchronization

SMS (Short Message Service) State Synchronization

Last updated: January 3, 2008

This section is applicable to the lab application and to a test application with the required feature license.

There are several specialized commands available to help you determine the state of the SMS processing, and verify that SMS events were successful.

SMS Status Query Summary
Query

Description

Suggested Usage

CALL:SMService:STATus[:STATe]?

Queries the current SMS processing state. Immediately returns the states: IDLE | SEND | WAIT | MSAC | MSN | BSEN |PAG | ORIG | REC. See SMS Status Description .

Use to verify the current SMS processing state.
CALL:SMService:BSENt[:STATe]?

Queries whether or not the SMS Status is in the Broadcast Sent state. Immediately returns 1 or 0, or waits for a state change if the SMS Status Change Detector is armed. See SMS Terminal States Queries .

Use with the SMS Status Change Detector to verify that your attempt to send an Broadcast SMS message was successful.
CALL:SMService:IDLE[:STATe]?

Queries whether or not the SMS Status is in the idle state. Immediately returns 1 or 0, or waits for a state change if the SMS Status Change Detector is armed. See SMS Terminal States Queries .

Use with the SMS Status Change Detector to verify that your attempt to end the SMS operation was successful.
CALL:SMService:MSACk[:STATe]?

Queries whether or not the SMS Status is in the MS Ack state. Immediately returns 1 or 0, or waits for a state change if the SMS Status Change Detector is armed. See SMS Terminal States Queries .

Use with the SMS Status Change Detector to verify that your attempt to send an SMS message from the test set to the MS was successful.
CALL:SMService:MSNack[:STATe]?

Queries whether or not the SMS Status is in the MS Nack state. Immediately returns 1 or 0, or waits for a state change if the SMS Status Change Detector is armed. See SMS Terminal States Queries .

Use with the SMS Status Change Detector to verify that your attempt to send an SMS message from the test set to the MS longer than the timeout was successful.
CALL:SMService:RECeived[:STATe]?

Queries whether or not the SMS Status is in the RECeived state. Immediately returns 1 or 0, or waits for a state change if the SMS Status Change Detector is armed. See SMS Terminal States Queries .

Use with the SMS Status Change Detector to verify that your attempt to send an SMS message from the mobile station to the test set was successful.

SMS Status Description

The CALL:SMService:STATus[:STATe]? query returns the current SMS processing states. These states may also be displayed on the front panel screen (see SMS Message Acknowledge Info ). The possible states include transitory states and terminal states, see SMS Status Description for details.

SMS Terminal States Queries

Several specialized query commands ( CALL:SMService:BSENt[:STATe]? , CALL:SMService:IDLE[:STATe]? , CALL:SMService:MSACk[:STATe]? , CALL:SMService:MSNack[:STATe]? and CALL:SMService:RECeived[:STATe]? ) are available to help you determine whether the test set is in the expected SMS terminal state. It's most useful in conjunction with the SMS Status Change Detector .

SMS Status Change Detector

The SMS status change detector is useful when you expect a change in the SMS processing state, and want to know when it is complete. The SMS status change detector is used in conjunction with the SMS Terminal States Queries .

Arming the SMS State Change Detector

The SMS status change detector is automatically armed by the test set when an SMS operations originating from the test set are requested. You do not need to explicitly arm the SMS status change detector. The following SMS operations originated from the test set will automatically arm the SMS status change detector:

You only need to arm the SMS Status change detector (using CALL:SMService:ARM[:IMMediate] ) to hold off the SMS terminal state queries when you are sending an SMS message from the mobile station.

Disarming the SMS status Change Detector

The SMS status change detector becomes disarmed when any of the following conditions have been met:

When the change detector is disarmed, the SMS Terminal States Queries returns 1 or 0 as soon as a terminal state is reached.

SMS Status Change Detector Timeout

The SMS status change detector includes a timeout to prevent the SMS status from staying in a transitory state forever. It limits the amount of time that the test set will wait for an SMS state change. The timer begins when the change detector is armed or rearmed when already armed. The timeout is user-settable, but the user setting is only useful when sending an Mobile-Originated SMS message. The duration of this timeout is set using the CALL:SMService:ARM:TIMeout command and should be greater than the maximum amount of time the control program needs to wait between arming the SMS status change detector and the SMS operation starting. If the timer expires, the change detector is disarmed. For Mobile-Terminated SMS messages, the timeout is automatically set to 60 seconds by the test set.

Example 1: Mobile Originated SMS Message - Arming the Change Detector

The following example illustrates the use of the SMS status change detector along with the SMS received state query to synchronize a controlling application with an SMS processing state change during a mobile station originated SMS operation.

When the CALL:SMService:ARM command is received by the test set, the detector becomes armed and configures the test set to hold off on returning a result for the CALL:SMService:RECeived? query until the detector is disarmed by one of the three events described above.

 
10 OUTPUT 714;"CALL:SMService:ARM:TIMeout 20S"
20 !Sets the time out time to 20 seconds.
30 OUTPUT 714;"CALL:SMService:ARM"
40 !Arm the change detector.
50 DISP "Send an SMS message from mobile station. Continue when done."
60 PAUSE
70 OUTPUT 714;"CALL:SMService:RECeived?"
80 !The SMS received state query.
90 ENTER 714;Sms_received
100  IF Sms_received=1 THEN
110     DISP "The test set has received the short message."
120     WAIT 2
130  ELSE
140     DISP "The test set did not receive the short message."
150     WAIT 2
160  END IF
170 END

Related Topics


Test System Synchronization Overview

Call Processing Event Synchronization

Call Processing State Synchronization