MUX User Guide: UMTS/HSPA Module Series
MUX User Guide: UMTS/HSPA Module Series
Rev. UC20_MUX_User_Guide_V1.0
Date: 2014-07-07
www.quectel.com
UMTS/HSPA Module Series
UC20 MUX User Guide
Our aim is to provide customers with timely and comprehensive service. For any
assistance, please contact our company headquarters:
l
http://www.quectel.com/support/salesupport.aspx
t e
For technical support, to report documentation errors, please visit:
c l
http://www.quectel.com/support/techsupport.aspx
u e t ia
GENERAL NOTES
n
QUECTEL OFFERS THIS INFORMATION AS A SERVICE TO ITS CUSTOMERS. THE INFORMATION
PROVIDED IS BASED UPON CUSTOMERS’ REQUIREMENTS. QUECTEL MAKES EVERY EFFORT
Q ide
TO ENSURE THE QUALITY OF THE INFORMATION IT MAKES AVAILABLE. QUECTEL DOES NOT
MAKE ANY WARRANTY AS TO THE INFORMATION CONTAINED HEREIN, AND DOES NOT ACCEPT
ANY LIABILITY FOR ANY INJURY, LOSS OR DAMAGE OF ANY KIND INCURRED BY USE OF OR
f
RELIANCE UPON THE INFORMATION. ALL INFORMATION SUPPLIED HEREIN IS SUBJECT TO
CHANGE WITHOUT PRIOR NOTICE.
COPYRIGHT
o n
THIS INFORMATION CONTAINED HERE IS PROPRIETARY TECHNICAL INFORMATION OF
C
QUECTEL CO., LTD. TRANSMITTABLE, REPRODUCTION, DISSEMINATION AND EDITING OF THIS
DOCUMENT AS WELL AS UTILIZATION OF THIS CONTENTS ARE FORBIDDEN WITHOUT
PERMISSION. OFFENDERS WILL BE HELD LIABLE FOR PAYMENT OF DAMAGES. ALL RIGHTS
ARE RESERVED IN THE EVENT OF A PATENT GRANT OR REGISTRATION OF A UTILITY MODEL
OR DESIGN.
Copyright © Quectel Wireless Solutions Co., Ltd. 2014. All rights reserved.
History
Revision Date
t el Author Description
c l
1.0 2014-07-07 Max TANG Initial
u e t ia
Q ide n
n f
Co
Contents
1 Introduction .......................................................................................................................................... 7
l
3.1. AT+CMUX Enable/disable MUX Control Channel .................................................................. 9
e
4 The Multiplexer Protocol ................................................................................................................... 11
t
4.1. Frame Structure ..................................................................................................................... 11
c l
4.1.1. Flag Field........................................................................................................................ 11
a
4.1.2. Address Field ................................................................................................................. 11
e i
4.1.2.1. EA .......................................................................................................................... 11
t
4.1.2.2. C/R ......................................................................................................................... 11
u
4.1.3. Control Field ................................................................................................................... 12
n
4.1.4. Length Field.................................................................................................................... 13
Q ide
4.1.5. Information Field ............................................................................................................ 13
4.1.6. FCS Field ....................................................................................................................... 13
4.2. Frame Type............................................................................................................................ 14
f
4.2.1. SAMB ............................................................................................................................. 14
4.2.2. UA................................................................................................................................... 14
n
4.2.3. DISC ............................................................................................................................... 14
4.2.4. DM .................................................................................................................................. 15
o
4.2.5. UIH ................................................................................................................................. 15
4.3. Control Channel..................................................................................................................... 15
C
4.3.1. Message Format ............................................................................................................ 15
4.3.2. Message Type and Actions ............................................................................................ 16
4.3.2.1. Power Saving Control (PSC) ................................................................................. 16
4.3.2.2. Multiplexer Close Down ......................................................................................... 16
4.3.2.3. Flow Control on Command (FCon) ....................................................................... 17
4.3.2.4. Flow Control off Command (FCoff) ....................................................................... 17
4.3.2.5. Modem Status Command (MSC) .......................................................................... 17
4.4. Procedure .............................................................................................................................. 20
4.4.1. MUX Establishment........................................................................................................ 20
4.4.2. MUX Release ................................................................................................................. 20
4.4.3. Data Transfer.................................................................................................................. 21
4.4.3.1. Information Data .................................................................................................... 21
4.4.3.2. Time-out Considerations ....................................................................................... 21
4.4.3.3. Flow Control........................................................................................................... 22
6 Example .............................................................................................................................................. 29
6.1. Samples for Frame Structure ................................................................................................ 29
l
6.2. Establish Channels ................................................................................................................ 30
e
6.3. Frame Transmission .............................................................................................................. 31
t
6.4. Power Saving Mode and Wake Up ....................................................................................... 32
l
6.5. Flow Control .......................................................................................................................... 32
c
6.6. Synchronization ..................................................................................................................... 33
e ia
6.7. Closing Down Multiplexers .................................................................................................... 34
u t
7 Appendix A Reference....................................................................................................................... 35
Q ide n
n f
Co
Table Index
l
TABLE 9: AT COMMAND CONFIGURATION BASED ON PSC FRAME AND DTR PIN.................................. 26
TABLE 10: RELATED DOCUMENTS ................................................................................................................ 35
t e
TABLE 11: TERMS AND ABBREVIATIONS ...................................................................................................... 35
e c ia l
u n t
Q ide
n f
Co
Figure Index
t el
e c ia l
u n t
Q ide
n f
Co
1 Introduction
This document mainly introduces the technical details of Quectel MUX (Multiplexer Protocol) and provides
examples on how to develop MUX on devices.
t el
e c ia l
u n t
Q ide
n f
Co
l
or PPP dialing.
t e
All the data from APP is packed as the frames, and the frames consist of the data and protocol field which
l
clearly indicate the channel No., the length of the information and the FCS and so on. The frames are
c
transmitted as one stream via the serial port. After arriving at the other peer, they are unpacked as four
e a
streams by the MUX protocol stack and transmitted to the application. Besides the information data, the
t i
control signals are also simulated.
u n
TE UE
Q ide
Application APP TASK
DLC1
DLC2
DLC3
DLC4
DLC1
DLC2
DLC3
DLC4
n f MUX Driver DS
MUX
MUX
Driver
TASK
o
DATA
DATA
3 MUX AT Command
l
This command is used to enable/disable the MUX control channel. The AT command sets parameters for
e
the control channel. If the parameters are left out, the default value will be used.
t
AT+CMUX Enable/disable MUX Control Channel
c l
Test Command Response
e ia
AT+CMUX=? +CMUX: (list of supported <mode>)[,(list of supported
t
<subset>)[,(list of supported <portspeed>)[,(list of
u
supported <N1>)[,(list of supported <T1>)[,(list of
n
supported <N2>)[,(list of supported <T2>)[,(list of
Q ide
supported <T3>)[,(list of supported <k>)]]]]]]]]
OK
Read Command Response
f
AT+CMUX? +CMUX:
n
<mode>[,<subset>[,<portspeed>[,<N1>[,<T1>[,<N2>[,<T2
>[,<T3>[,<k>]]]]]]]]
o
OK
C
Write Command Response
AT+CMUX=<mode>[,<subset>[,<port
speed>[,<N1>[,<T1>[,<N2>[,<T2>[,<T3 OK
>[,<k>]]]]]]]]
Parameter
l
transmitting a frame).The step size is ten milliseconds, the range is 1-255. The
default value is 100ms.
e
<N2> Maximum number of re-transmissions, the range is 0-255, the default value is 3.
t
<T2> Response timer for MUX control channel, the step size is ten milliseconds, the
c l
range is 2-255, 30 is the default value.
a
<T3> Wake up response timer in seconds. The range is 1-255, 10 is the default value.
e i
<k> Window size (It is not supported for UC20).
u n t
Example
Q ide
AT+CMUX=0
OK
f
AT+CMUX?
+CMUX: 0,0,5,127,10,3,30,10,2
o n
OK
C
NOTE
AT+CMUX can only be executed on UART1 since UC20 only supports MUX function via UART1.
l
4.1. Frame Structure
t e
Table 1: MUX Frame Structure
c l
FLAG Address Control Length Information FCS FLAG
e ia
1 octet 1 octet 1 octet 1~2 octet Multiple octets 1 octet 1 octet
u n t
Q ide
Each frame begins and ends with a flag octet (0xF9).
f
4.1.2. Address Field
n
Table 2: Address Field
o
Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Bit 8
C
EA C/R DLCI
4.1.2.1. EA
EA is always set to 1.
4.1.2.2. C/R
C means the command and R means the response. TE sends a command to the module with C/R=1, and
the module responses with C/R=1. The module sends a command with C/R=0, and the TE responses
with C/R=0.
Table 3: C/R
TE→UE 1
Command
UE→TE 1
UE→TE 0
Response
TE→UE 0
l
The DLCI identifies the virtual channel between TE and UE. Multiple DLCIs shall be supported but the
number is implementation-specific. The DLCIs are dynamically assigned.
c t e l
e ia
Table 4: The Coding of Control Field
u n t
Frame Type HEX (P/F=0) 1 2 3 4 5 6 7 8
Q ide
SABM (Set Asynchronous Balanced Mode) 0x2F 1 1 1 1 P/F 1 0 0
f
DM (Disconnected Mode) 0x0F 1 1 1 1 P/F 0 0 0
n
DISC (Disconnect) 0x43 1 1 0 0 P/F 0 1 0
o
UIH (Unnumbered Information with Header
0xEF 1 1 1 1 P/F 1 1 1
Check )
C
UI (Unnumbered) 0x03 1 1 0 0 P/F 0 0 0
P/F is the Poll/Final bit. The poll (P) bit set to 1 shall be used by a station to solicit (poll) a response or
sequence of responses from the other station.
The final (F) bit set to 1 shall be used by a station to indicate the response frame transmitted as the result
of a soliciting (poll) command.
The poll/final (P/F) bit shall serve a function in both command frames and response frames (In command
frames, the P/F bit refers to the P bit. In response frames, it refers to the F bit). Following is detailed rules:
E/A L1 L2 L3 L4 L5 L6 L7
el
The L1 to L7 bits indicates the length of the following data field for the information field less than 128.
c t l
Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Bit 8
e ia
0 L1 L2 L3 L4 L5 L6 L7
u n t
Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Bit 8
Q ide
L8 L9 L10 L11 L12 L13 L14 L15
f
The range of the length field may be extended using the EA bit. When the EA bit is set to 1 in an octet, it is
signifies that this octet is the last octet of the length field. When the EA bit is set to 0, it signifies that a
n
second octet of the length field follows. The total length of the length field is 15 bits in that case.
o
4.1.5. Information Field
C
The information field is the payload of the frame and carries the user data and any convergence layer
information. The field is octet structured. The information field only presents in I frames, UI frames and
UIH frames.
In the case of the UIH frame, the contents of the I-field shall not be included in the FCS calculation. FCS is
calculated on the contents of the address, control and length fields only. This means that only the delivery
to the correct DLCI is protected, but not the information.
4.2.1. SAMB
SABM is command frame and shall be used to establish DLC between TE and MS.
4.2.2. UA
UA frame is the response to SABM or DISC frame. Please refer to following diagram.
el
SABM (Set up DLC 1)
c t a l
e i
MS UA (Response) TE
u n t
Q ide
Quectel Client
DISC (Close DLC 1)
Multiplexer Receiver
n f
UA (Response)
4.2.3. DISC
Co Figure 2: UA Frame (Response)
DISC is command frame and shall be used to close down DLC. Prior to acting the command, the
receiving station shall confirm the acceptance of the DISC command by the transmission of a UA
response. Please see the diagram above.
4.2.4. DM
The DM response frame shall be used to report a status whether the station is logically disconnected from
the data link. When in disconnected mode, no commands are accepted until the disconnected mode is
terminated by the receipt of a SABM command. If a DISC command is received while in disconnected
mode, a DM response should be sent.
4.2.5. UIH
The UIH command/response shall be used to send user data at either station.
t el
c a l
At the initiation of communication between the TE and UE, a control channel is set up with DLCI 0. This
e i
channel is used to convey information between the two multiplexers.
u n t
4.3.1. Message Format
Q ide
Multiplexer control channel is the basic channel which is used to establish DLC, launch power saving,
wake up from power saving and implement flow control mechanism.
f
Control channel is the first channel established at the initiation of the multiplexer between the TE and MS
n
and it has the DLCI value 0.
o
UIH message frame is transmitted through control channel. All UIH message frames conform to the
following format.
C
Type Length Value 1 Value 2 …… Value n
Each box in the table represents a field of minimum size in one octet.
1 2 3 4 5 6 7 8
EA C/R T1 T2 T3 T4 T5 T6
The EA bit is an extension bit. It is set to 1 in the last octet of the sequence. In other octets, EA is set to 0.
Quectel multiplexer only supports to transmit one octet. So EA is always set to 1.
The T bits indicate the type coding. Each command has a unique pattern of bit sequence. This means that
a single-octet type field can encode 63 different message types. Only single octet message types are
defined in this document.
1 2 3 4 5 6 7 8
EA L1 L2 L3 L4 L6 L6 L7
el
The EA bit is an extension bit. It is set to 1 in the last octet of the sequence. In other octets EA is set to 0.
t
Quectel multiplexer only supports to transmit one octet. So EA is always set to 1.
c l
The L bits define the number of value octets that follows. L1 is the LSB and L7 is the MSB; this permits to
e a
construct messages with up to 127 value octets.
u
4.3.2. Message Type and Actions
n t i
Q ide
4.3.2.1. Power Saving Control (PSC)
f
The power saving control messages use the following type field octet:
n
1 2 3 4 5 6 7 8
o
EA C/R 0 0 0 0 1 0
C
The length byte contains the value 0 and there are no value octets.
If a station wants to enter a low-power state, it transmits a power saving control command; the other
station replies with a power saving control response.
The multiplexer close down command is used to reset the link into normal AT command mode without
multiplexing. The multiplexer closes down messages by the following type field octet:
1 2 3 4 5 6 7 8
EA C/R 0 0 0 0 1 1
The length byte contains the value 0 and there are no value octets.
The flow control command is used to handle the aggregate flow. When either entity is able to receive new
information, it will transmit this command.
el
The length byte contains the value 0 and there are no value octets.
c t l
The type field octet has the following format:
e ia
1 2 3 4 5 6 7 8
u t
EA C/R 0 0 0 1 0 1
Q ide n
4.3.2.4. Flow Control off Command (FCoff)
f
The flow control command is used to handle the aggregate flow. When either entity is not able to receive
information, it transmits the FCoff command. The opposite entity is not allowed to transmit frames except
n
on the control channel (DLC=0).
o
The length byte contains the value 0 and there are no value octets.
C
The type field octet has the following format:
1 2 3 4 5 6 7 8
EA C/R 0 0 0 1 1 0
It is desired to convey virtual V.24 control signals to a data stream, this is done by sending the MSC
command. The MSC command has one mandatory control signal byte and an optional break signal byte.
This command is only relevant when the basic option is chosen.
This command shall be sent prior to any user data after a creation of a DLC.
The length byte contains the value 2 or 3 and there are 2 or 3 value octets.
Both the DTE and DCE use this command to notify each other of the status of their own V.24 control
signals. The length of the modem status command is either 4 or 5 bytes depending on the break signal.
l
The command field octet has the following format:
t e
1 2 3 4 5 6 7 8
c l
EA C/R 0 0 0 1 1 1
u e t ia
The C/R bit is used to indicate if it is a modem status command or modem status response.
n
Every time the signals change, the DTE or DCE sends this command to indicate the current status of
Q ide
each signal. When a DTE or DCE receives a modem command, it always sends a response back. The
mappings of the V.24 signals to the bits in the control signal octet for the receiver and sender are given in
Tables 6 and 7, respectively.
f
In a modem status command, it is the status of the sender’s own V.24 signals that shall be sent, but in a
n
response, it is copy of the V.24 signals that are received from the command frame that shall be returned.
o
The DLCI field identifies the specific DLC to which the command applies. Bit 2 is always set to 1.
C
1 2 3 4 5 6 7 8
EA 1 DLCI
The DLC I field is followed by the control signals field which contains a representation of the state of the
signals. The use of the extension bit allows other octets to be added to cater for other circumstances. At
present, an optional second octet is defined for handling the transmission of break signals.
Bit No. 1 2 3 4 5 6 7 8
Bit 1: The EA bit is set to 1 in the last octet of the sequence; in other octets EA is set to 0. If only one
octet is transmitted, EA is set to 1.
Bit 2: Flow Control (FC). The bit is set to 1(one) when the device is unable to accept frames.
Bit 3: Ready to Communicate (RTC). The bit is set to 1 when the device is ready to communicate.
Bit 4: Ready to Receive (RTR). The bit is set to 1 when the device is ready to receive data.
Bit 5: Reserved for future use. Set to zero by the sender, ignored by the receiver.
Bit 6: Reserved for future use. Set to zero by the sender, ignored by the receiver.
l
Bit 7: Incoming call indicator (IC). The bit is set to 1 to indicate an incoming call.
t e
Bit 8: Data Valid (DV). The bit is set to 1 to indicate that valid data is being sent.
c l
The control byte is mapped to V.24 signals according to the tables below:
u e t ia
Table 6: Mapping from the Control Signal Octet by a Receiving Entity
Q ide n
Control Signal Byte DTE Receiving DCE Receiving
f
3, RTC DSR, 107 DTR, 108/2
n
4, RTR CTS, 106 RFR (note), 133
o
7, IC RI,125 -ignored, -
NOTE
C
Circuit 133, RFR (Ready for Receiving) is commonly assigned to the connector pin which is alternatively
used for circuit 105, RTS.
NOTE
Circuit 133, RFR (Ready for Receiving) is commonly assigned to the connector pin which is alternatively
used for circuit 105, RS.
l
If a station is unable to transmit frames because of flow control, but wishes to stop accepting further
e
frames itself, it may still send frames containing no user data (i.e. Only the control signal octet and,
t
optionally, the break signal octet) in order to control signal flow.
e c ia l
t
4.4. Procedure
u n
4.4.1. MUX Establishment
Q ide
In most cases the establishment of a DLC will be initiated by the TE, however, the protocol is balanced
and the initiation may come from the UE. The action taken by the higher layers of the TE upon the
initiation of the establishment of a DLC from the UE is outside the scope of this document.
n f
The station wishing to establish a DLC transmits a SABM frame with the P-bit set to 1. The address field
contains the DLCI value associated with the desired connection. If the responding station is ready to
o
establish the connection, it will reply with a UA frame with the F-bit set to 1. If the responding station is not
ready or unwilling to establish the particular DLC, it will reply with a DM frame with the F-bit set to 1.
C
Once a DLC has been established, the stations are both said to be in a connected mode, for the particular
DLC and transfer of information may commence.
If no UA or DM response has been received after T1, the initiating station may retransmit the SABM. This
action may be repeated until a response is obtained or action is taken by a higher layer.
The release of a DLC may be initiated by either station transmitting a DISC frame with the P-bit set to 1.
Confirmation of the DLC release is signaled by the other station sending a UA frame with the F-bit set to 1.
Once the DLC has been released, the stations enter disconnected mode for that particular DLC.
If the station receiving the DISC command is already in a disconnected mode, it will send a DM response.
If no UA or DM response has been received after T1, the initiating station may retransmit the DISC. This
action may be repeated until a response is obtained or action is taken by a higher layer.
Information is conveyed by using UI or UIH frames. Support of UIH frames is mandatory and support of UI
frames is optional. UI frames are used when it is important to know that the data received is correct. An
l
example using of UI frames carries IP (Internet Protocol) traffic where error recovery procedures are
e
performed, if necessary, by a higher layer. The use of UIH frames is appropriate if the link is not subject to
t
errors. UI or UIH frames may also be used for data in situations where the delays inherent in
l
error-recovery procedures are unacceptable, such as transmission of voice data.
e c a
The transmitter takes information from the convergence layer for the particular DLC and places it in the
t i
I-field of the transmitted frame. Once a UI or UIH frame has been correctly received, the contents of its
u
I-field are passed to the convergence layer.
Q ide n
The frames sent by the initiating station have the C/R bit set to 1 and those sent by the responding station
have the C/R bit set to 0. Both stations set the P-bit to 0.
The maximum length of the information field in UI or UIH frames shall be parameter N1.
4.4.3.2.
n f
Time-out Considerations
o
In order to detect a no-reply or lost-reply condition, each station shall provide a response time-out function
C
(T1). The expiry of the time-out function shall be used to initiate appropriate error recovery procedures.
The duration of the time-out function in the two stations shall be unequal in order to resolve contention
situations.
The time-out function shall be started whenever a station has transmitted a frame for which a reply is
required. When the expected reply is received, the time-out function shall be stopped. If, during the
interval that the time-out function is running, other frames are sent for which acknowledgements are
required, the time-out function may have to be restarted.
If the response time-out function runs out, a command with the P bit set to 1 may be (re)transmitted, and
the response time-out function restarted.
Quectel multiplexer supports software flow control mechanism. Software flow control is implemented by
GSM 0710 MSC, FCoff and FCon message frame.
TE will send MSC message to MS with FC bit set to 1 in V.24 control signals when TE refuses to accept
frames. Whereas, set to 0 to inform recovery of receiving frames. When receiving MSC, MS will feed back
MSC response to indicate recover of data transmission.
TE can also send FCoff message to MS when refuses to accept anything except control messages on
DLC 0. After this, MS will stop sending any frames through all the data channels except control channels.
l
Control channel is still alive and free to send any control message. Whereas, sends FCon to recover
e
transmission. When receiving FCoff or FCon message, MS will feed back FCoff or FCon response.
t l
The difference between MSC and FCon is that the former only controls one of the data channels, and the
c
latter controls all the data channels except controls channel.
u e t ia
Q ide n
n f
Co
l
If you used both UART and USB port, please refer to "Quectel_UC20_Power_Management_
e
Application_Note". This document elaborates how to set and operate Host USB and module USB under
t
power saving mode. This chapter only describes power saving function of MUX.
e c ia l
t
5.1. Power Saving Mode Based on DTR Pin Only
u
Q ide n
In this solution, you only need to control DTR pin to let the module enter into or exit from power saving
mode. Additionally, you need to add the following AT commands during the initialization process.
f
Table 8: AT Command Configuration Based on DTR Pin
n
No. Command Configuration Description
o
1 AT+QSCLK=1
C
2 AT+QURCCFG="URCPORT","UART1" Specify URC output port as the UART1 port.
When USB is not in use, and the above AT commands are configured, you can pull down DTR to let the
module exit from power saving mode, and pull up DTR to enter into power saving mode. If module is in
sleep mode, and it receives incoming call, short messages or URC data, physical RI pin will be pulled to
wake up the Host, and then the module sends the data to MUX virtual port. If AP READY function is
enabled, module will not send the data until AP READY pin is in READY mode, this can effectively avoid
data loss when Host is not ready and data interaction occurs during the process of exiting from power
saving mode.
In the solution, if Host does not send data to module within 10s after pulling down DTR pin, module will
re-enter into power saving mode automatically. In this way, it can prevent the module accidentally exiting
l
from power saving mode because of the unstable DTR external level. The flow chart is shown as below.
t e
Call、
Call、 Short
Short
Message…
Message…
l
Change
Change RI
RI Module
Module is
is in
in MUX
MUX status
status
e c ia
DTR
DTR INT
INT
u n t
LOW
LOW
Is
Is AP
AP Ready
Ready function
function DTR
DTR is
is HIGH
HIGH or
or LOW?
LOW? Module
Module is
is in
in sleep
sleep
working?
working? mode
Q ide
mode
YES
YES HIGH
HIGH YES
YES
NO
NO NO
NO
f
NO
NO No
No Data
Data over
over 10s
10s Wake
Wake up
up
Is
Is AP_READY
AP_READY pin
pin Module
Module is
is waked
waked up
up
valid?
valid?
n
YES
YES YES
YES YES
YES
o
Output
Output data
data Sleep
Sleep
If the module is not in power saving mode, Host can trigger it into power saving mode through the
following procedure:
3. Set hardware flow control. Set the Host RTS to disable data receiving. If hardware flow control is
disabled, then ignore this step.
5. Pull DTR pin from LOW to HIGH, and trigger the module to enter into power saving mode.
If module is in power saving mode, then Host can trigger module to exit from power saving mode through
the following procedure:
l
1. Host pulls DTR pin from HIGH to LOW, and triggers module to exit from power saving mode
e
2. Set hardware flow control. Set the Host RTS to enable data receiving. If hardware flow control is
t
disabled, then ignore this step.
c l
3. Set AP_READY pin as valid. If it is disabled, then ignore this step.
u e t ia
5.1.3. Module Enables Host to Exit from Power Saving Mode
n
When module is in power saving mode, if it receives incoming call, short message, network data or
Q ide
necessary URC, RI pin will be pulled to wake up Host to receive the data. Please refer to the procedure
below:
f
1. Host receives the change of RI pin, then exits from power saving mode and enters into normal mode.
n
2. After Host exits from power saving mode successfully, pull down DTR pin to let the module exit from
power saving mode.
o
3. Set hardware flow control. Set the RTS to enable data receiving. If hardware flow control is disabled,
then ignore this step.
C
4. Set AP_READY pin as valid. If it is disabled, then ignore this step.
5. After the data has been processed, if you need to re-enter into power save mode, please refer to
chapter 5.1.1.
NOTE
In this solution, if module is in power saving mode, Host must operate data interaction with module MUX
within 10s after DTR has been pulled down, otherwise module will re-enter into power saving mode
automatically.
5.2. Power Saving Mode Based on PSC Frame and DTR Pin
In this solution, you need to use both PSC frame and DTR pin to control the module to enter into or exit
from power saving mode. In addition, you need to add the following AT commands during the initialization
process.
1 AT+QSCLK=1
l
Configure AP Ready function. For details, please refer
e
3 AT+QCFG="APREADY", …. to "Quectel_UC20_Power_Management_Application_
t
Note"
c l
Enable or disable corresponding URC according to the
a
actual needs, to avoid the module being waked up by
e i
4 AT+QINDCFG=…
unnecessary URC. For details, please refer to
u t
"UC20_AT_Commands_Manual".
n
Enable DTR pin to control the module to enter into or
5 AT+QCFG="PWRSAVEDTR",1
exit from power saving mode.
Q ide
Disable pulling up DTR pin to let the module enter into
6 AT+QCFG="PWRSAVEMODE",0
power saving mode under MUX.
f
When USB is not in use, and the above AT commands are configured, Host can send PSC frame to let the
module enter into power saving mode, and pull down DTR to exit from power saving mode. If module is in
n
sleep mode, and it receives incoming call, short messages or URC data, physical RI pin will be pulled to
o
wake up the Host, and then the module sends the data to MUX virtual port. If AP READY function is
enabled, module will not send the data to MUX virtual port until AP READY pin is in READY mode, this
C
can effectively avoid data loss when Host is not ready and data interaction occurs during the process of
exiting from power saving mode.
In the solution, there is no requirement on sending data within 10s. The flow chart is shown as below.
Call,
Call, Short
Short
Message…
Message…
Change
Change RI
RI Module
Module is
is in
in MUX
MUX status
status DTR
DTR change
change
st
mH
ffrroom Hoost
a ta
ta
Da
D
DTR
DTR from
from HIGH
HIGH to
to
Is
Is AP
AP Ready
Ready function
function Is
Is PSC
PSC frame?
frame? LOW?
LOW?
working?
working?
YES
YES YES YES
YES
YES
l
NO NO
NO
NO
e
Module Module
Module is
is sleep
sleep
Is
Is AP_READY
AP_READY pin
pin Module is
is waked
waked up
up
t
valid?
valid?
c l
YES
YES YES
YES YES
YES
e ia
Send
Send PSC
PSC response
response &&
Output
Output data Wake
Wake up
up
t
data ready
ready to
to sleep
sleep
u
Q ide n
Figure 4: Power Saving Flow Chart (2)
f
5.2.1. Host Enables Module to Enter into Power Saving Mode
n
If the module is not in power saving mode, Host can trigger it into power saving mode through the
following procedure:
o
1. Configure the AT commands mentioned in Table 9.
C
2. Ensure the module is not in the following sate:
There is command waiting for execution or reply.
Module is still in service, e.g., in data connection, messaging sending, call incoming or online
call.
4. Set hardware flow control. Set the Host RTS to disable data receiving. If hardware flow control is
disabled, then ignore this step.
If module is in power saving mode, then Host can trigger module to exit from power saving mode through
the following procedure:
1. Host pulls DTR pin from HIGH to LOW, and triggers module to exit from power saving mode
2. Set hardware flow control. Set the Host RTS to enable data receiving. If hardware flow control is
disabled, then ignore this step.
l
5.2.3. Module Enables Host to Exit from Power Saving Mode
t e
When module is in power saving mode, if it receives incoming call, short message, network data or
c l
necessary URC, RI pin will be pulled to wake up Host to receive the data. Please refer to the procedure
below:
e t ia
1. Host receives the change of RI pin, then exits from power saving mode and enters into normal mode.
u n
2. After Host exits from power saving mode successfully, pull down DTR pin to let the module exit from
power saving mode.
Q ide
3. Set hardware flow control. Set the RTS to enable data receiving. If hardware flow control is disabled,
then ignore this step.
f
4. Set AP_READY pin as valid. If it is disabled, then ignore this step.
n
5. After the data has been processed, if you need to re-enter into power save mode, please refer to
chapter 5.2.1.
Co
NOTE
In this solution, after Host pulls down DTR, the module will exit from power saving mode, and there is no
requirement on data interaction within 10s.
6 Example
l
Sample 1:
t e
F9 03 3F 01 1C F9
c l
Opening Flag Address Field Control Field Length Field FCS Closing Flag
e ia
Header DLCI 0 SABM Frame 0, No Information Filed Tail
u n t
This sample is a SABM frame to open DLCI 0.
Q ide
Sample 2:
F9 05 EF 09 41 54 49 0D 58 F9
f
Address Control
Opening Flag Length Field Information Field FCS Closing Flag
Field Field
n
AT Command
Header DLC 1 UIH Frame 4 Tail
o
"ATI<CR>"
C
This sample is a UIH frame to transmit AT command "ATI<CR>".
Sample 3:
F9 01 EF 0B E3 07 07 0D 01 79 F9
Address
Opening Flag Control Field Length Field Information Field FCS Closing Flag
Field
MSC Message,
Header DLC 0 UIH Frame 5 Tail
Length 3
This sample is a MSC message carried in UIH frame to transmit V2.4 signal 0x0D.
l
response K<CR><LF><CR><LF>
0D 0A 0D 0A
t e
Step 2: Establish DLC 0
c l
No Step Data Direction Hex Comment
e ia
TE requests to establish
u t
control channel DLCI 0 by TE→MS F9 03 3F 01 1C F9 SABM Frame
n
SABM frame
1
MS feeds back UA for
Q ide
receiving SABM and TE←MS F9 03 73 01 D7 F9 UA Frame
accepts to create DLCI 0
f
Step 3: Establish DLC 1, 2
n
No Step Data Direction Hex Comment
o
TE requests to establish DLCI9
TE→MS F9 27 3F 01 0B F9
C
by SABM frame
1 MS feeds back DM for
receiving SABM but refuses to TE←MS F9 27 1F 01 21 F9
create DLCI 9
TE requests to establish DLCI1
TE→MS F9 07 3F 01 DE F9
by SABM frame
MS feeds back UA for
receiving SABM and accepts to TE←MS F9 07 73 01 15 F9
create DLCI 1
2
MS sends MSC message F9 01 EF 0B E3 07
TE←MS
frame 07 0D 01 79 F9
F9 05 EF 0D 0D
MS sends OK TE←MS 0A 4F 4B 0D 0A
5F F9
l
TE sends MSC message F9 01 EF 0B E3 07
TE→MS
frames 0B 0D 01 79 F9
t e
F9 01 EF 0B E1 07
MS feeds back MSC response TE←MS
l
0B 0D 01 79 F9
c
4 Establish DLC 3, 4, same as above
e ia
By now, 4 channels have come into
u t
5 existence. Multiplexer can work
n
normally
Q ide
This sample is a MSC message carried in UIH frame to transmit V2.4 signal 0x0D.
f
6.3. Frame Transmission
o n
After establishing control channel and data channels, TE and MS can transmit data to each other through
UIH frames.
C
No Step Data Direction Hex Comment
TE sends AT
command "ATI<CR>" TE→MS F9 05 EF 09 41 54 49 0D 58 F9 UIH Frame
through DLC 1
F9 05 EF 09 41 54 49 0D 58 F9
F9 05 EF 9B 0D 0A 53 49 4D 43
4F 4D 5F 4C 74 64 0D 0A 53 49
1
4D 43 4F 4D 5F 53 49 4D 33 30
MS feeds back
TE←MS 30 0D 0A 52 65 76 69 73 69 6F 6E UIH Frame
through DLC 1
3A 53 49 4D 33 30 30 4D 33 32 28
53 50 41 4E 53 49 4F 4E 29 5F 56
31 30 2E 30 2E 38 5F 42 55 49
4C 44 30 33 0D 0A 0D 0A 47 F9
F9 05 EF 09 4F 4B 0D 0A 58 F9
TE sends AT
command "AT<CR>" TE→MS F9 09 EF 07 41 54 0D 35 F9 UIH Frame
through DLC 2”
2
F9 09 EF 07 41 54 0D 35 F9
MS feeds back
TE←MS F9 09 EF 0D 0D 0A 4F 4B 0D 0A UIH Frame
through DLC 2
D8 F9
DLC 3, 4 are the
3
same as above
el
6.4. Power Saving Mode and Wake Up
c t l
Power saving:
e ia
No Step Data Direction Hex Comment
u t
TE sends PSC message F9 03 EF 05 43 01
TE→MS PSC Command Frame
n
through DLC 0 F2 F9
1
Q ide
MS feeds back PSC F9 03 EF 05 41 01
TE←MS PSC Response Frame
message through DLC 0 F2 F9
MS enters power saving
2 mode, TE sends F9 TE→MS F9 F9 F9 F9……
f
continuously
n
Wake up:
o
No Step Data Direction Hex Comment
C
TE sends wake up flags TE→MS F9 F9 F9 F9
1
MS feeds back TE←MS F9 F9 F9 F9
MS is waked up, and data
2
transmission is recovered
l
bit set to 0 through control channel
4 TE→MS 07 07 8D 01 79
DLC, to indicate recovery of DLC 1
e
F9
t
data transmission
l
TE sends FCoff message through
c
DLC 0, to indicate refusing to F9 01 EF 05 63
5 TE→MS
a
accept anything on all DLC except 01 93 F9
e i
DLC 0
u t
TE sends FCon message through
F9 01 EF 05 A3
n
6 DLC 0, to indicate recovery of data TE→MS
01 93 F9
transmission
Q ide
f
6.6. Synchronization
n
After successful establishment of data channels, TE and MS are synchronized and data transmission is
o
normal. Every transmission is implemented by frames which begins with a starting flag (0xF9) and ends
with a closing flag (0xF9). So it is called that multiplexer is synchronized with flag 0xF9. Transmitting bytes
C
other than 0xF9 between frames is considered as faulty or synchronization lost and needs re-sync.
NOTES
1. UC20 does not initiative to send sync flags (F9), even though MS receives error frames.
2. While UC20 module is not in power saving mode and receives more than 2 sync flag, module will
send only 3 sync flags to TE, even if it receives more than 3 sync flays.
3. While UC20 module is in power saving mode, module will send the number of sync flags (F9)
received from TE.
t el
l
6.7. Closing Down Multiplexers
e c ia
No Step Data Direction Hex Comment
u t
TE sends DISC frame to request for
TE→MS F9 07 53 01 3f F9
n
1 closing down DLC 1
Q ide
MS feeds back UA frame to accept TE←MS F9 07 73 01 15 F9
TE sends DISC frame to request for
TE→MS F9 0b 53 01 B8 F9
2 closing down DLC 2
f
MS feeds back UA frame to accept TE←MS F9 0b 73 01 92 F9
n
TE sends DISC frame to request
TE→MS F9 0f 53 01 3f F9
3 for closing down DLC 3
o
MS feeds back UA frame to accept TE←MS F9 0f 73 01 15 F9
TE sends DISC frame to request for
C
TE→MS F9 13 53 01 3f F9
4 closing down DLC 4
MS feeds back UA frame to accept TE←MS F9 13 73 01 15 F9
TE sends CLD message frame to
F9 03 EF 05 C3 01
request for closing down multiplexer TE→MS
F2 F9
5 through DLC 0
MS feeds back CLD response to F9 03 EF 05 C1 01
TE←MS
accept F2 F9
By now, closing down procedure is
6
over
7 Appendix A Reference
l
3rd Generation Partnership Project; Technical
e
[1] 3GPP TS 27.010 V9.0.0 Specification Group Terminals; Terminal Equipment
t
to User Equipment (TE-UE) multiplexer protocol
c l
[2] Quectel_UC20_AT_Commands_Manual UC20 AT commands manual
e ia
Quectel_UC20_Power_Management_Appli
[3] UC20 power management application note
t
cation_Note
u
Q ide n
Table 11: Terms and Abbreviations
Abbreviation Description
f
MUX Multiplexer Protocol
n
ABM Asynchronous Balanced Mode
o
DLC Data Link Connection
C
FCS Frame Check Sequence
DM Disconnected Mode
UI Unnumbered Information