SIM800 Series Multiplexer Application Note V1.04
SIM800 Series Multiplexer Application Note V1.04
_Application Note
GPRS Module
GENERAL NOTES
COPYRIGHT
www.simcom.com 2 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
About Document
Version History
Scope
This document presents the AT command of multiplexer operation and application examples.
This document can apply to SIM800 series modules with multiplexer function.
www.simcom.com 3 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
Contents
Contents ................................................................................................................................................4
1 Introduction ...................................................................................................................................6
1.1 Purpose of the document ............................................................................................................ 6
1.2 Related documents ..................................................................................................................... 6
1.3 Conventions and abbreviations ................................................................................................... 6
www.simcom.com 4 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
www.simcom.com 5 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
1 Introduction
Based on module AT command manual, this document will introduce SIMCom multiplexer protocol and the
technical details of how to make use of it.
Developers could understand and develop application quickly and efficiently based on this document.
Abbreviation Description
DLC Data Link Connection
DLCI Data Link Connection Identifier
RLS Remote Line Status Command
SABM Set Asynchronous Balanced Mode
UA Unnumbered Acknowledgement
DM Disconnected Mode
DISC Disconnect (DISC) command
Unnumbered information with header check (UIH) command and
UIH
response
www.simcom.com 6 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
www.simcom.com 7 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
2 Multiplexer Introduction
A device using GPRS or GSM data may wish to receive and transmit multiple streams of data
simultaneously. These are Command data (AT commands), GPRS data and GSM circuit switched data
(CSD). These streams are essentially independent to one another.
As to the non-multiplexer device, it is so inefficient to deal with only one kind or one channel of data steam
during a period of time. Therefore, SIMCom multiplexer is designed with GSM0710 standard to separate
transmission device layer into several logic channels (DLC) in order to transmit data simultaneously. Each
channel has its own buffer management and flow control mechanism.
SIMCom Multiplexer
D D D D
L L L L
C C C C
1 2 3 4
Multiplexed
data
streams
Client Application
www.simcom.com 8 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
SIMCOM Multiplexer is established upon system transmission device layer (Commonly serial port). Data
streams are addressed with DLCI value and encapsulated in frames based on GSM 0710 protocol (Chapter
2, SIMCOM Multiplexer Protocol) and transmitted through interface provided by transmission device layer.
2.3 Restrictions
www.simcom.com 9 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
SIMCom Multiplexer protocol provides a data transmission mechanism by establishing DLC between TE
and MS. Several DLC can be set up. Each one is independent to one another and has its own management
of buffer and flow control. All information transmitted between the TE and MS is conveyed in frames.
The frame structure is composed of an opening and a closing flag, an address field, a control field, a Length
field, an information field and FCS field. Please see following table.
Each frame begins and ends with a flag sequence octet which is defined as a constant bit pattern 0xF9.
The address field consists of a single octet. It contains the Data Link Connection Identifier (DLCI), the C/R
bit and the address field extension bit (EA) as following table.
Bit
1 2 3 4 5 6 7 8
EA CR DLCI DLCI DLCI DLCI DLCI DLCI
The range of the address field may be extended by use of the EA bit. When the EA bit is set to 1 in an octet,
it signifies that this octet is the last octet of the address field. When the EA bit is set to 0, it signifies that
another octet of the address field follows. SIMCom multiplexer only supports one address octet so the EA
bit is always set to 1.
www.simcom.com 10 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
The C/R (command/response) bit identifies the frame as either a command or a response.
The DLCI is used to identify an individual data stream as well as channels between TE and MS. Multiple
DLCIs shall be supported but the number is implementation-specific. The DLCIs are dynamically assigned.
The content of the control field defines the type of frame. The control fields of the frames used in the present
document are described in the following table.
Bit
HEX[1] Frame Type Comment
1 2 3 4 5 6 7 8
1 1 1 1 P/F 1 0 0 0x2F SABM Set Asynchronous Balanced Mode
1 1 0 0 P/F 1 1 0 0x63 UA Unnumbered Acknowledgement
1 1 1 1 P/F 0 0 0 0x0F DM Disconnected Mode
1 1 0 0 P/F 0 1 0 0x43 DISC Disconnect
1 1 1 1 P/F 1 1 1 0xEF UIH Unnumbered Information with Header check
1 1 0 0 P/F 0 0 0 0x03 UI Unnumbered Information (Not supported)
The range of the length field may be extended by use of 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
second octet of the length field follows. SIMCom multiplexer only supports two length octets so the EA bit is
always set to 0.
Note:Length field should always be contained in each frame even though information field is empty.
www.simcom.com 11 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
The information field is the payload of frame and carries the user data information (e.g. AT Command and
PPP data packet). The field is octet structured. The information field is only present in UIH frames.
3.2.1 SABM
SABM is command frame and shall be used to establish DLC between TE and MS. Please refer to 3.1 for
more details.
3.2.2 UA
UA frame is the response to SABM or DISC frame. Please see following diagram and refer to 3.1 and 3.6 for
more details.
MS UA (Response) TE
SIMCom Client
DISC (Close DLC 1)
Multiplex Receiver
er
UA (Response)
www.simcom.com 12 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
3.2.3 DISC
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 and refer to 3.6 for more details.
3.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. Please refer to 3.1 for more details.
3.2.5 UIH
The UIH command/response shall be used to send user data at either station. Please refer to 3.2 for more
details.
3.2.6 UI
Not support.
TE 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 MS is ready to establish the connection it will reply
with a UA frame with the F-bit set to 1. If MS is not ready or unwilling to establish the particular DLC it will
www.simcom.com 13 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
reply with a DM frame with the F-bit set to 1. Please refer to 3.1 for more details.
The release of a DLC will be initiated from by the transmission of a DISC frame with the P-bit set to 1.
Confirmation of the DLC release is signaled by MS sending a UA frame with the F-bit set to 1. Once the
DLC has been released the MS enter disconnected mode for that particular DLC. If MS receiving the DISC
command is already in a disconnected mode it will send a DM response. Please refer to 3.6 for more
details.
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.
Control channel is the first channel established at the initiation of the multiplexer between the TE and MS
and it has the DLCI value 0.
UIH message frame is transmitted through control channel. All UIH message frame conform to the following
format.
Type Length Value 1 Value 2 …… Value n
Each box in the table represents a field of minimum size one octet.
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.
SIMCom multiplexer only supports one octet is transmitted. 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 the present document. Please refer 2.5.1 to 2.5.6 for more details.
www.simcom.com 14 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
3.6.1 PSC
3.6.2 CLD
3.6.3 Test
The test command is used to test the connection between MS and the TE. The length byte describes the
number of value bytes, which are used as a verification pattern. The opposite entity shall respond with
exactly the same value bytes.
www.simcom.com 15 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
3.6.4 MSC
MSC message frame is designed to convey virtual V.24 control signals. It has one mandatory control signal
byte and an optional break signal byte.
MSC shall be sent prior to any user data after a creation of a DLC.
The C/R bit is used to indicate if it is a Modem Status Command or Modem Status Response.
In a Modem Status Command it is the status of the sender’s own V.24 signals that shall be sent, but in a
Response it is copy of the V.24 signals that are received from the Command frame that shall be returned.
The DLCI field identifies the specific DLC to which the command applies. EA bit are always set to 1.
3.6.5 FCoff
www.simcom.com 16 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
3.6.6 FCon
3.6.7 PN,NSC,RPN,RLS,SNC
Not Supported.
SIMCOM multiplexer data channels shall be used to transmit user data streams such as AT command data,
GPRS data and GSM CSD data streams.
Data channels shall be established after and only after control channel (DLCI 0) connected.
Please refer to 3.1 for more details.
NOTE
If the customer wants to transmit large data streams such as PPP, the DLCI 1 is recommend strongly
because the buffer of DLCI 1 (16K Byte) is more than other channel (1K Byte).
SIMCOM multiplexer supports software flow control and can not perform hardware flow control mechanism.
Software flow control is implemented by GSM 0710 MSC, FCoff and FCon message frame.
MS will send MSC message to TE with FC bit set to 1 in V.24 control signals when refuse to accept frames.
www.simcom.com 17 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
TE will send MSC message to MS with FC bit set to 1 in V.24 control signals when 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 data transmission.
TE also can send Fcoff message to MS when refuses accept anything except control messages on DLC 0.
After this, MS will stop sending any frames through all the data channels except control channels. Control
channel is still alive and free to send any control message. Whereas, sends FCon to recover transmission.
When receiving Fcoff or FCon message, MS will feed back Fcoff or FCon response.
The difference between MSC and Fcon, Fcoff is that the former only flow controls one of the data channels,
and the latter controls all the data channels except controls channel.
Sample 1:
F9 03 3F 01 1C F9
Opening Flag Address Field Control Field Length Field FCS Closing Flag
Header DLCI 0 SABM Frame 0, no information filed Tail
This sample is a SABM frame to open DLCI 0.
Sample 2:
F9 05 EF 09 41 54 49 0D 58 F9
Opening Address Control
Length Field Information Field FCS Closing Flag
Flag Field Field
AT Command
Header DLC 1 UIH Frame 4 Tail
"ATI<CR>”
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
Opening Address Control Length
Information Field FCS Closing Flag
Flag Field Field 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.
www.simcom.com 18 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
Transmission is based on 1 start bit, 8 data bits, 1 stop bit, and no parity.
www.simcom.com 19 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
4 MUX Examples
Step3:Establish DLC 1, 2
www.simcom.com 20 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
Data Direction
No Step Hex Comment
TE<——>MS
TE requests to establish
——> F9 07 3F 01 DE F9
DLCI1 using SABM frame
MS feeds back UA for
1 receiving SABM and <—— F9 07 73 01 15 F9
accepts to create DLCI 1
MS send UIH frame MSC F9 01 EF 09 E3[note 4] 05
<——
message 07[note 5] 0D 9A F9
TE requests to establish
——> F9 0B 3F 01 59 F9
DLCI2 using SABM frame
MS feeds back UA for
2 receiving SABM and <—— F9 0B 73 01 92 F9
accepts to create DLCI 2
MS send UIH frame MSC F9 01 EF 09 E3 05 0B
<——
message 0D 9A F9
Establishment of DLC 3, 4
3
are the same as above
By now, 4 channels have
come into existence.
4
Multiplexer can work
normally
NOTE
Note 1:
This frame is used to response SABM
1) If MS responses DM frame to TE, it means establish DLCI failed.
2) If MS responses UA frame to TE, it means establish DLCI successful.
For SIM800 series, when MS responses UA frame to TE, the frame uses one byte to represent the data
length, such as F9 07 73 01 15 F9.
For SIM900 series, when MS responses UA frame to TE, the frame uses two bytes to represent the
data length, such as F9 03 73 00 00 A4 F9.
Note 2:
The bit means DLCI channel.03 means control channel DLCI 0, 07means logical channel DLCI 1,ob
means logical channel DLCI 2,0F means logical channel DLCI 3,13 means logical channel DLCI 4.
Note 3:
The bit means frame type. 3F means SABM frame, 73 means UA frame, 1F means DM frame, 53
means DISC frame, EF means UIH frame.
Note 4:
The bit means the message that UIH frame carries. E3 means MSC message, 43means PSC
message, 63 means FCoff message, A3 means FCon message, C3 means CLD message.
www.simcom.com 21 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
Note 5:
The bit means the channel of the MSC message send to.
After establishment of control channel and data channels, TE and MS can transmit data through UIH frames
between each other.
Data Direction
No Step Hex Comment
TE<——>MS
TE sends AT command ——> F9 07 EF 09 41 54 49 UIH Frame
"ATI<CR>" through DLC 1 0D 58 F9
MS feeds back through DLC <—— F9 07 EF 09 41 54 49 0d UIH Frame
1 3F F9
1 F9 07 EF 21 0D 0A 53
49 4D 39 30 30 20 52 31
31 2E 30 0D 0A FF F9
F9 07 EF 0D 0D 0A 4F
4B 0D 0A 4A F9
TE sends AT command ——> F9 0B EF 07 41 54 0D UIH Frame
"AT<CR>" through DLC 2” 35 F9
MS feeds back through DLC <—— F9 0B EF 06 00 61 74 UIH Frame
2
2 0D EF F9
F9 0B EF 0C 00 0D 0A
4F 4B 0D 0A DF F9
DLC 3, 4 are same as
3
above
Power saving
Data Direction
No Step Hex Comment
TE<——>MS
TE sends PSC message F9 03 EF 05 43 01 PSC Command
1 ——>
through DLC 0 F2 F9 Frame
www.simcom.com 22 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
Wake up
Set DTR low
NOTE
Power Saving Mode could be launched after AT+CSCLK=1 and then set DTR high.
Data Direction
No Step Hex Comment
TE<——>MS
MS sends MSC message
with FC bit set to 1 through
F9 01 EF 0B E3 07 07 8F
1 control channel DLC 0 to <——
01 79 F9
indicate refusing to accept
anything on DLC 1
MS sends MSC message
with FC bit set to 0 through
F9 01 EF 0B E3 07 07 8D
2 control channel DLC 0 to <——
01 79 F9
indicate recovery of DLC 1
data transmission
TE sends MSC message with
FC bit set to 1 through control
F9 01 EF 0B E3 07 07 8F
3 channel DLC 0 to indicate ——>
01 79 F9
refusing to accept anything
on DLC 1
TE sends MSC message with
FC bit set to 0 through
F9 01 EF 0B E3 07 07 8D
4 control channel DLC 0 to ——>
01 79 F9
indicate recovery of DLC 1
data transmission
TE sends FCoff message
through DLC 0 to indicate
5 ——> F9 01 EF 05 63 01 93 F9
refusing to accept anything
on all DLC except DLC 0
www.simcom.com 23 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
After successful establishment of data channels, Data transmission between TE and MS is normal.
Data Direction
No Step Hex Comment
TE<——>MS
1 TE sends hex value 0xF1 ——> F1 Note
TE tests AT command
F9 07 EF 07 41 54 0D 06
transmission through DLC 1 ——>
F9
after re-sync
2
MS feeds back response and F9 07 EF 07 41 54 0D 67
synchronization has been reset F9 F9 07 EF 0D 0D 0A 4F
<——
to normal 4B 0D 0A 8A F9
NOTE
Data Direction
No Step Hex Comment
TE<——>MS
TE sends DISC frame to
——> F9 07 53 01 3f F9
request closing down DLC 1
1
MS feeds back UA frame to
<—— F9 07 73 00 00 D7 F9
accept
TE sends DISC frame to
——> F9 0B 53 01 B8 F9
2 request closing down DLC 2
MS feeds back UA frame to <—— F9 0B 73 01 92 F9
www.simcom.com 24 / 25
SIM800 Series_Multiplexer_Application Note_V1.04
accept
TE sends DISC frame to
——> F9 0F 53 01 3f F9
request closing down DLC 3
3
MS feeds back UA frame to
<—— F9 0F 73 01 50 F9
accept
TE sends DISC frame to
——> F9 13 53 01 3f F9
request closing down DLC 4
4
MS feeds back UA frame to
<—— F9 13 73 01 5D F9
accept
TE sends CLD message frame
to request closing down ——> F9 01 EF 05 C3 01 F2 F9
5 multiplexer through DLC 0
MS feeds back CLD response
<—— F9 01 EF 05 C1 01 D3 F9
to accept
By now, closing down
6
procedure is over
www.simcom.com 25 / 25