Download G510 GPRS Module AT Command User Manual - Premier

Transcript
G510 GPRS Module
AT Command User Manual (ADD)
Version: V1.0.0
Date: 2013-05-11
Confidential Material
This document contains information highly confidential to Fibocom Wireless Inc. (Fibocom). Fibocom offers this
information as a service to its customers, to support application and engineering efforts that use the products
designed by Fibocom. The information provided is based upon requirements specifically provided to Fibocom
by the customers. All specifications supplied herein are subject to change. Disclosure of this information to
other parties is prohibited without the written consent of Fibocom.
Copyright
Copy, Reproduce, Distribute and/or Edit of this document or part of it as well as utilization of its contents and
communication thereof to others without express authorization are prohibited. Offenders will be held liable for
payment of damages. All rights created by patent grant or registration of a utility model or design patent are
reserved. Copyright ©2013 Fibocom Wireless Inc. All rights reserved.
Trademarks Notice
The FIBOCOM Logo is registered by Fibocom Wireless Inc. All other product or service names or logos are the
property of their respective owners. Copyright ©2013 Fibocom Wireless Inc. All rights reserved.
Revision History
Version
Date
Remarks
V1.0.0
2013-05-11
Initial Version
G510 GPRS Module AT Command User Manual (ADD)
Page 2 of 17
Contents
1
Code Convert Command .................................................................................................................................................................. 4
1.1
2
3
4
Multiplexer Feature............................................................................................................................................................................. 6
2.1
Introduction............................................................................................................................................................................ 6
2.2
Frame Structure ..................................................................................................................................................................... 6
2.2.1
Frame Structure of Basic Mode .............................................................................................................................. 6
2.2.2
Flag ................................................................................................................................................................................... 6
2.2.3
Address Field................................................................................................................................................................. 6
2.2.4
Control Field.................................................................................................................................................................. 7
2.2.5
Length Indicator .......................................................................................................................................................... 8
2.2.6
Information Field......................................................................................................................................................... 8
2.2.7
Frame Checking Sequence Field (FCS)................................................................................................................ 8
2.3
Sample ...................................................................................................................................................................................... 8
2.4
Start up Services, +CMUX, MUX Startup Command................................................................................................ 8
2.4.1
Establishment Services ........................................................................................................................................... 10
2.4.2
Data Services .............................................................................................................................................................. 12
2.4.3
DLC Release Services ............................................................................................................................................... 12
LBS Command .................................................................................................................................................................................... 14
3.1
+GTGIS, Search GIS Information in GPRS Network................................................................................................. 14
3.2
+GTSET, Super Mode Configuration ............................................................................................................................ 15
Text to Speech .................................................................................................................................................................................... 16
4.1
5
+GTCODE Code Convert Command .............................................................................................................................. 4
+GTTS, Text to Speech ...................................................................................................................................................... 16
DTMF, Software Decode.................................................................................................................................................................. 17
5.1
+GTDTMF, Software Decode........................................................................................................................................... 17
G510 GPRS Module AT Command User Manual (ADD)
Page 3 of 17
1 Code Convert Command
1.1 +GTCODE Code Convert Command
GB2312 code and UCS2 code can convert to each other through this AT command.
Command
Syntax
Response/Action
Set
+GTCODE=<Type>,<String>
+GTCODE: <Length>
<Result>
OK
or:
ERROR: <err>
Test
+GTCODE=?
+GTCODE: (1,2),(text)
OK
The following table shows the +GTCODE parameters.
<Parameter>
Description
Type
1 – GB2312 code converted to UCS2 code, the result can be send by SMS in text
mode.
2 – UCS2 code converted to GB2312 code.
3 – UCS2 code converted to GB2312 mode, but first converts the full-width in
UCS2 to half-width, then converted to GB2312.
String
String to be converted
Note: when Type=1, no quotation marks in String (ASCII: 0x22), and the max
length is 140 bytes.
When Type=2, the longest String is 280 bytes.
Length
The length of the string after converted
Result
The result of the string after converted
Note: The quotation marks (") need to be changed to \", then you can get UCS2 code.
Example:
AT+GTCODE=1,”深圳广和通”
+GTCODE: 20
6DF157335E7F548C901A
G510 GPRS Module AT Command User Manual (ADD)
Page 4 of 17
OK
AT+GTCODE=2,"
5C0A656C76845BA26237FF1A611F8C2260A8591A5E7467657684652F63013002621153F8670065B063A85
1FA4F1860E08FD48FD867E58BE2529F80FD002C4E8689E360A87684672C67084F1860E053CA8BDD8D398
FD48FD860C551B58BF756DE590D005900480046004881F300310030003000380036FF0C56DE590D514D8
D3930024E2D56FD79FB52A8 "
+GTCODE: 128
尊敬的客户:感谢您多年来的支持。我司最新推出优惠返还查询功能,了解您的本月优惠及话费返
还情况请回复 YHFH 至 10086,回复免费。中国移动
OK
G510 GPRS Module AT Command User Manual (ADD)
Page 5 of 17
2 Multiplexer Feature
2.1 Introduction
The MUX provides multiple logical communication channels between the DTE and G510 over one physical
RS232 connection. This service enables the DTE device to run multiple applications (such as GPRS, CSD, SMS and
voice calls) while communicating simultaneously with the G510.
The G510 can be supports the multiplexing protocol control channel as defined in GSM07.10 and only basic
mode.
Notes:
The TCP/IP stack AT command doesn’t support in MUX mode.
2.2 Frame Structure
All information transmitted between the TE and MS is conveyed in frames.
2.2.1 Frame Structure of Basic Mode
The basic frame structure is then as follows:
Flag
Address
Control
Length Indicator
Information
FCS
Flag
1 octet
1 octet
1 octet
1 or 2 octets
Unspecified length but integral
number of octets
1 octet
1 octet
2.2.2 Flag
0xF9 for basic mode, 0x7E for advance mode. G510 only support the Basic mode
2.2.3 Address Field
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.
1
2
3
EA
C/R
DLCI
4
5
6
7
8
EA: use for extend the address. EA bit is always set to 1
C/R: command/response, see below.
Command/response
Direction
Command
Initiator
-----
Responder
1
Responder
-----
Initiator
0
Initiator
-----
Responder
0
Responder
-----
Initiator
1
Response
C/R value
DLCI:DLC ID (Data Link Connection Identifier), range from 0~63.
G510 GPRS Module AT Command User Manual (ADD)
Page 6 of 17
The DLCI is used to identify an individual user information stream as well as to identify connections between TE
and MS.
2.2.4 Control Field
The content of the control field defines the type of frame.
Frame Type
BIT1
BIT2
BIT3
BIT4
BIT5
BIT6
BIT7
BIT8
SABM
1
1
1
1
P/F
1
0
0
UA
1
1
0
0
P/F
1
1
0
DM
1
1
1
1
P/F
0
0
0
DISC
1
1
0
0
P/F
0
1
0
UIH
1
1
1
1
P/F
1
1
1
UI
1
1
0
0
P/F
0
0
0
P/F: Poll/Final bit
The poll/final (P/F) bit shall serve a function in both command frames and response frames. (In command
frames, the P/F bit is referred to as the P bit. In response frames, it is referred to as the F 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.
Before a station issues another frame with the P bit set to 1, it shall have received a response frame from the
other station with the F bit set to 1. If no valid response frame is obtained within a system-defined time-out
period, the retransmission of a command with the P bit set to 1 for error recovery purposes shall be permitted.
SABM (Set Asynchronous Balanced Mode): The SABM command shall be used to place the addressed station in
the Asynchronous Balanced Mode (ABM) where all control fields shall be one octet in length. The station shall
confirm acceptance of the SABM command by transmission of a UA response at the first opportunity. Upon
acceptance of this command, the DLC send and receive state variables shall be set to zero.
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. 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.
UA (Unnumbered Acknowledgement): The UA response shall be used by the station to acknowledge the receipt
and acceptance of SABM and DISC commands.
DM (Disconnected Mode): The DM response shall be used to report a status where 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.
DISC (Disconnect): The DISC command shall be used to terminate an operational or initialization mode
previously set by a command. It shall be used to inform one station that the other station is suspending
operation and that the station should assume a logically disconnected mode. Prior to do the command, the
G510 GPRS Module AT Command User Manual (ADD)
Page 7 of 17
receiving station shall confirm the acceptance of the DISC command by the transmission of a UA response.
2.2.5 Length Indicator
BIT1
BIT2
BIT3
BIT4
BIT5
BIT6
BIT7
BIT8
EA
L1
L2
L3
L4
L5
L6
L7
EA: use for extend the address
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.
2.2.6 Information Field
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 is only present in I frames, UI frames and UIH
frames.
2.2.7 Frame Checking Sequence Field (FCS)
The FCS field has only one octet, the generator polynomial is: x8+x2+x+1.
For the UIH frame, the FCS shall be calculated over only the address and control fields.
For the command/response frame, the FCS shall be calculated include the address, control and length fields.
2.3 Sample
2.4 Start up Services, +CMUX, MUX Startup Command
Host
G510
AT+CMUX=0,0,5
OK
This command is used to enable/disable the GSM MUX multiplexing protocol stack. When the G510 receives a
valid +CMUX command, it will return OK and change its state to MUX-Init. If the parameters are left out, the
default value is used.
G510 GPRS Module AT Command User Manual (ADD)
Page 8 of 17
Command
Syntax
Response/Action
Remarks
Set
+CMUX=<mode>[
,<subset>[,<port_
speed>[,<N1>[,<T
1>[,<N2>[,<T2>[,<
T3>[,<k>]]]]]]]]
+CME ERROR: <err>
The Set command
requests the G510 to
open the MUX stack
with various
parameters. This
command works only
in PREMUX state.
Read
+CMUX?
+CMUX: <mode>, [<subset>],
The Read command
displays the current
mode and settings.
This command works
only in MUX state.
<port_speed>,<N1>, <T1>, <N2>,
<T2>, <T3>+CME ERROR: <err>
Test
+CMUX=?
+CMUX: (list of supported <mode>s),(list
of supported<subset>s),(list of
supported <port_speed>s),(list
ofsupported <N1>s),(list of supported
<T1>s),(list ofsupported <N2>s),(list of
supported <T2>s),(list ofsupported
<T3>s),(list of supported <k>s)
The Test Command
displays a list of
supported modes
and parameters. This
command works in
both PREMUX and
MUX states.
The following table shows the +CMUX parameters.
<Parameter>
Description
<mode>
MUX mode:
0 Basic
<subset>
Defines how the MUX control channel is set up. The virtual channel is set up according
to this setting.
0
<port_speed>
<N1>
UIH frames used only
Transmission rate:
1
9600 bit/sec
2
19200 bit/sec
3
38400 bit/sec
4
57600 bit/sec
5
115200 bit/sec
6
230400 bit/sec
Maximum frame size: 1—1509;
The default value is 31 in Basic mode.
G510 GPRS Module AT Command User Manual (ADD)
Page 9 of 17
<Parameter>
Description
<T1>
Acknowledgement timer (in units of 10 ms).
1-255 The default value is 10 (100 ms)
<N2>
Maximum number of retransmissions.
0-5 The default value is 3.
<T2>
Response timer for the DLC0 (in unit of 10 ms). <T2> must be longer than <T1>.
2-255 The default value is 30 (300 ms).
<T3>
Wake up response timer (in seconds).
1-255 The default value is 10.
<k>
Reserve for Advanced operation with Error Recovery options.
2.4.1 Establishment Services
2.4.1.1 Establishment the control channel
The control channel (DLC0) must be establishment firstly after active the multiplexer by AT+CMUX.
Host
G510
SABM frame for create DLC0: F9 03 3F 01 1C F9
UA Confirm: F9 03 73 01 D7 F9
G510 GPRS Module AT Command User Manual (ADD)
Page 10 of 17
2.4.1.2 Establishment Data Channel
Establishment DLC1:
Host
G510
SABM frame for create DLC1: F9 07 3F 01 DE F9
UA Confirm: F9 07 73 01 15 F9
Establishment DLC2:
Host
G510
SABM frame for create DLC2: F9 0B 3F 01 59 F9
UA Confirm: F9 0B 73 01 92 F9
G510 GPRS Module AT Command User Manual (ADD)
Page 11 of 17
2.4.2 Data Services
After established the DLCx, We can send data to G510 by UIH frame.
For example, send AT+CSQ from DLC1 (other DLC is similar). The frame data between host and G510 like this:
Host
UIH Frame include AT+CSQ:
G510
F9 07 EF11 41 54 2b 43 53 51 0D 0A 2B F9
UIH from G510 include: +CSQ: 99,99 OK:
F9 05 EF 1F 0D 0A 2B 43 53 51 3A 20 39 39 2C
39 39 0D 0A A0 F9 F9 05 EF 0D 0D 0A 4F 4B 0D
0A 5F F9
2.4.3 DLC Release Services
2.4.3.1 Release Data Channel
Release DLC1:
Host
G510
DISC Frame to release DLC1: F9 07 53 01 3F F9
UA Confirm: F9 07 73 01 15 F9
G510 GPRS Module AT Command User Manual (ADD)
Page 12 of 17
Release DLC2:
Host
G510
DISC Frame to release DLC1: F9 0B 53 01 B8 F9
UA Confirm: F9 0B 73 01 92 F9
2.4.3.2 Release Control Channel
Release DLC0. After release the DLC0, G510 will close the multiplexer service and back to AT command mode.
Host
G510
DISC Frame to release DLC0: F9 03 53 01 FD F9
UA Confirm: F9 03 73 01 D7 F9
G510 GPRS Module AT Command User Manual (ADD)
Page 13 of 17
3 LBS Command
3.1 +GTGIS, Search GIS Information in GPRS Network
This command will send a query for GIS information, receive the response and report the GIS information to
user.
Note: G510 can’t support this AT command when voice call established. This AT command doesn’t support in
MUX mode. It is recommended that we should active PDP (AT+MIPCALL=1,”xxx”) firstly.
Command
Syntax
Response/Action
Set
+GTGIS=<Type>[,Languag
OK
e>[,<Option>]]
+GTGIS: <GIS Information>
or:
+GTGIS: <ERROR Information>
or:
ERROR: <err>
Test
+GTGIS=?
+GTGIS: (list of supported <Type>s), (list of supported
<Language>s), (list of supported <Option>s)
The following table shows the +GTGIS parameters.
<Parameter>
Description
Type
11 –Supper mode: use GSM Cell Information for GIS query
12 –Supper mode: use Option for GIS query(Option format 1)
13 - Supper mode: use Option for GIS query(Option format 2)
Language
1-English, default value is 1
2-Chinese
Option
A String for describing both of latitude and longitude.
It supports 2 formats now.
For example: latitude 22.5385, longitude 113.9379 should be described :
In Option format 1 as:”22.5385,113.9379”;
In Option format 2 as:”2232.3143,N,11356.2741,E”
G510 GPRS Module AT Command User Manual (ADD)
Page 14 of 17
<Parameter>
Description
GIS
A Simple string says the GIS Information.
Information
For example:
"latitude":22.5384,"longitude":113.9383,"country":"中国","country_code":"CN","region":"
广东省","city":"深圳市","street":"深南大道","street_number":"1 号"
ERROR
Information
A Simple string says the ERROR occur during GIS query
For example:
SERVER ERROR
NETWORK ERROR
PDP TIMEOUT
3.2 +GTSET, Super Mode Configuration
This AT command will set the destination server/port for GTGIS super mode.
With different destination server/port, the super mode of GTGIS command will return the result in different
format.
Command
Syntax
Response/Action
Set
+GTSET=<future>,<value>
OK
or:
ERROR
The following table shows the +GTSET parameters related GTGIS super mode.
<Parameter>
Description
<future>
" GISSUPERPORT": Set the GIS destination port for super mode.
<value>
1000-30000
The default value is 5555.
Before you set this parameter, please refer to GHT and make sure the port is already
supported. GHT will support more and more super server port in future.
<future>
"GISSUPERSERVER": Set the GIS destination Server for super mode.
<value>
Hostname. The string length should less than 63 bytes. Default set to”szgps.xicp.net”.
Before you set this parameter, please refer to GHT and make sure Host is available.
G510 GPRS Module AT Command User Manual (ADD)
Page 15 of 17
4 Text to Speech
4.1 +GTTS, Text to Speech
The AT command will convert text file to speech in real-time, only supports Chinese, The maximum length is
512 bytes.
Command
Syntax
Response/Action
Set
+GTTS=<mode>,
<data>
OK
Remarks
or:
ERROR
The following table shows the +GTTS parameters.
<Parameter>
Description
<mode>
0: stop TTS
1: play TTS
<data>
String parameter. The data is GB code or ASC II, the maximum length is 509 bytes
Example:
AT+GTTS=0
OK
AT+GTTS=1,"012345"
OK
AT+GTTS=1,"广和通"
OK
G510 GPRS Module AT Command User Manual (ADD)
Page 16 of 17
5 DTMF, Software Decode
5.1 +GTDTMF, Software Decode
Command
Syntax
Response/Action
Set
+GTDTMF=<mode>
OK
Or
ERROR
Read
+GTDTMF?
+GTDTMF: <mode>
Test
+GTDTMF=?
+GTDTMF: (0-1)
The following table shows the +DTMF parameters.
<Parameter>
Description
<mode>
0: disable DTMF decode (the default value)
1: enable DTMF decode unsolicited result code +GTDTMF: <dtmf>
<dtmf>
The range of detected DTMF: 0~9, A,B,C,D,*,#
Example:
AT+GTDTMF=1
OK
+GTDTMF: *
//detected DTMF *
G510 GPRS Module AT Command User Manual (ADD)
Page 17 of 17