logo资料库

SIM800 Series_TCPIP_Application Note_V1.03.pdf

第1页 / 共34页
第2页 / 共34页
第3页 / 共34页
第4页 / 共34页
第5页 / 共34页
第6页 / 共34页
第7页 / 共34页
第8页 / 共34页
资料共34页,剩余部分请下载后查看
About Document
Version History
Scope
Contents
1 Introduction
1.1 Purpose of the document
1.2 Related documents
1.3 Conventions and abbreviations
2 Structure
3 Single Connection
3.1 Non-transparent mode
3.1.1 How to Establish a TCP Client Connection
3.1.2 How to Establish a UDP Client Connection
3.1.3 How to Establish a TCP Server Connection
3.1.4 UDP Extended Mode
3.2 Transparent Mode
3.2.1 What is Transparent Mode
3.2.2 How to Configure Transparent Mode
3.2.3 How to Establish Connection under Transparent Mode
3.2.4 How to Switch Between Data Mode and Command Mode
3.2.5 How to handle incoming call and short message in data Mode
3.3 Fix Local Port of TCP/UDP Client
4 Multi Connection
4.1 As a Client
4.2 As a TCP Server
5 Two GPRS Context
6 DNS Function
7 Data Sending Related
7.1 Fixed Length Sending
7.2 Timed Sending
7.3 Query Available Data Length to be Sent
7.4 Select Data Transmitting Mode
7.5 Query Data Transmitting Amount
8 Data Sending Related
8.1 Receive Data Automatically
8.2 Receive Data Manually
9 GPRS States Exchange Related
10 GPRS States Exchange Related
11 Connection Activity Checking Related
12 Power Consumption with Existing Connection
13 Error Handling
SIM800 Series_TCPIP _Application Note GPRS Module SIMCom Wireless Solutions Limited Building B, SIM Technology Building, No.633, Jinzhong Road Changning District, Shanghai P.R. China Tel: 86-21-31575100 support@simcom.com www.simcom.com
SIM800 Series_TCPIP_Application Note_V1.03 SIM800 Series_TCPIP_Application Note 1.03 2020-06-18 Released Document Title: Version: Date: Status: GENERAL NOTES SIMCOM OFFERS THIS INFORMATION AS A SERVICE TO ITS CUSTOMERS, TO SUPPORT APPLICATION AND ENGINEERING EFFORTS THAT USE THE PRODUCTS DESIGNED BY SIMCOM. THE INFORMATION PROVIDED IS BASED UPON REQUIREMENTS SPECIFICALLY PROVIDED TO SIMCOM BY THE CUSTOMERS. SIMCOM HAS NOT UNDERTAKEN ANY INDEPENDENT SEARCH FOR ADDITIONAL RELEVANT INFORMATION, INCLUDING ANY INFORMATION THAT MAY BE IN THE CUSTOMER’S POSSESSION. FURTHERMORE, SYSTEM VALIDATION OF THIS PRODUCT DESIGNED BY SIMCOM WITHIN A LARGER ELECTRONIC SYSTEM REMAINS THE RESPONSIBILITY OF THE CUSTOMER OR THE CUSTOMER’S SYSTEM INTEGRATOR. ALL SPECIFICATIONS SUPPLIED HEREIN ARE SUBJECT TO CHANGE. COPYRIGHT THIS DOCUMENT CONTAINS PROPRIETARY TECHNICAL INFORMATION WHICH IS THE PROPERTY OF SIMCOM WIRELESS SOLUTIONS LIMITED COPYING, TO OTHERS AND USING THIS DOCUMENT, ARE FORBIDDEN WITHOUT EXPRESS AUTHORITY BY SIMCOM. OFFENDERS ARE LIABLE TO THE PAYMENT OF INDEMNIFICATIONS. ALL RIGHTS RESERVED BY SIMCOM IN THE PROPRIETARY TECHNICAL INFORMATION ,INCLUDING BUT NOT LIMITED TO REGISTRATION GRANTING OF A PATENT , A UTILITY MODEL OR DESIGN. ALL SPECIFICATION SUPPLIED HEREIN ARE SUBJECT TO CHANGE WITHOUT NOTICE AT ANY TIME. SIMCom Wireless Solutions Limited Building B, SIM Technology Building, No.633 Jinzhong Road, Changning District, Shanghai P.R.China Tel: +86 21 31575100 Email: simcom@simcom.com For more information, please visit: https://www.simcom.com/download/list-863-en.html For technical support, or to report documentation errors, please visit: https://www.simcom.com/ask/ or email to: support@simcom.com Copyright © 2020 SIMCom Wireless Solutions Limited All Rights Reserved. www.simcom.com 2 / 34
SIM800 Series_TCPIP_Application Note_V1.03 About Document Version History Version Date V1.00 V1.01 2013-08-01 2013-10-12 Owner Ping.zhang Ping.zhang Modify example of as a client(chapter 3.1) What is new New version Add “:” after “+RECEIVE,X,X” Modify “AT+CIPSHOWT” to “AT+CIPSHOWTP” Scope Change the style 2016-11-17 Wenjie.lai 2020-06-15 Fumei.zeng /Wenjie.Lai V1.02 V1.03 Scope This document presents the AT command of TCPIP stack and application examples. This document can apply to SIM800 series modules with TCPIP function. www.simcom.com 3 / 34
SIM800 Series_TCPIP_Application Note_V1.03 Contents 3.2 3.3 3.1.1 3.1.2 3.1.3 3.1.4 About Document .................................................................................................................... 3 Version History ...................................................................................................................................... 3 Scope .................................................................................................................................................... 3 Contents ................................................................................................................................. 4 Introduction ..................................................................................................................... 6 1 1.1 Purpose of the document ............................................................................................................ 6 1.2 Related documents ..................................................................................................................... 6 1.3 Conventions and abbreviations ................................................................................................... 6 2 Structure .......................................................................................................................... 7 3 Single Connection .......................................................................................................... 8 3.1 Non-transparent mode ................................................................................................................ 8 How to Establish a TCP Client Connection ...................................................................... 8 How to Establish a UDP Client Connection ...................................................................... 9 How to Establish a TCP Server Connection ................................................................... 10 UDP Extended Mode ...................................................................................................... 11 Transparent Mode ..................................................................................................................... 12 3.2.1 What is Transparent Mode ............................................................................................. 13 How to Configure Transparent Mode ............................................................................. 13 3.2.2 How to Establish Connection under Transparent Mode ................................................. 13 3.2.3 3.2.4 How to Switch Between Data Mode and Command Mode ............................................. 14 How to handle incoming call and short message in data Mode ...................................... 14 3.2.5 Fix Local Port of TCP/UDP Client ............................................................................................. 15 4 Multi Connection ........................................................................................................... 16 4.1 As a Client................................................................................................................................. 16 4.2 As a TCP Server ....................................................................................................................... 17 5 Two GPRS Context ....................................................................................................... 20 6 DNS Function ................................................................................................................ 22 7 Data Sending Related ................................................................................................... 23 Fixed Length Sending ............................................................................................................... 23 7.1 7.2 Timed Sending .......................................................................................................................... 23 7.3 Query Available Data Length to be Sent ................................................................................... 23 7.4 Select Data Transmitting Mode ................................................................................................. 24 7.5 Query Data Transmitting Amount .............................................................................................. 25 8 Data Sending Related ................................................................................................... 27 8.1 Receive Data Automatically ...................................................................................................... 27 8.2 Receive Data Manually ............................................................................................................. 27 9 GPRS States Exchange Related .................................................................................. 29 10 GPRS States Exchange Related .................................................................................. 31 11 Connection Activity Checking Related ....................................................................... 32 www.simcom.com 4 / 34
SIM800 Series_TCPIP_Application Note_V1.03 12 Power Consumption with Existing Connection ......................................................... 33 13 Error Handling ............................................................................................................... 34 www.simcom.com 5 / 34
SIM800 Series_TCPIP_Application Note_V1.03 1 Introduction 1.1 Purpose of the document Based on module AT command manual, this document will introduce TCPIP application process. Developers could understand and develop application quickly and efficiently based on this document. 1.2 Related documents [1] SIM800 Series_AT Command Manual 1.3 Conventions and abbreviations Abbreviation TCP UDP APN GPRS PDP DNS Description Transmission Control Protocol User Datagram Protocol Access Point Name General Packet Radio Service Packet Data Protocol Domain Name System www.simcom.com 6 / 34
SIM800 Series_TCPIP_Application Note_V1.03 2 Structure There are two modes of connection for SIM800 series TCP/IP application: Single connection and Multi connection. When in single connection mode, SIM800 series can work at both transparent mode and non-transparent mode; and under these two transmission modes, SIM800 series can be configured as either TCP/UDP client or TCP server. When in multi connection mode, SIM800 series can only work at non-transparent mode. In this mode, SIM800 series can work as an absolute TCP/UDP client, which can establish 6 connections in total. In this mode, it can also be configured as one TCP server, which allows 5 TCP/UDP clients to be connected; and the TCP server also can act as a client, establishing 5 connections to one remote server. The structure of the TCP/IP application is given as below. SIM800 CIPMUX=0 CIPMUX=1(6id) Transparent mode NON-Transparent mode Client Server Client Server Figure1: SIM800 series TCPIP Structure www.simcom.com 7 / 34
SIM800 Series_TCPIP_Application Note_V1.03 3 Single Connection Command AT+CIPMUX= is used for selecting TCPIP connection mode, when n=0, it is single connection; when n=1, it is multi connection. The default configuration is single connection mode. For single connection, SIM800 series supports both transparent mode and non-transparent mode. 3.1 Non-transparent mode Command AT+CIPMODE= is used for selecting TCPIP application mode, when n=0, it is non-transparent mode (normal mode); when n=1, it is transparent mode. The default configuration is non-transparent mode. There are three working modes for SIM800 series under this mode: TCP client, UDP client and TCP server. 3.1.1 How to Establish a TCP Client Connection //whether some password is required or not Firstly, before any TCP/UDP related operation is set up, the module should be connected to GSM or GPRS network. User can use the commands “AT+CREG?” and “AT+CGATT?” to query the GSM network registration status whether the module has been attached to GPRS service. //Example of establish a TCP client connection AT+CPIN? +CPIN: READY OK AT+CSQ +CSQ: 20,0 OK AT+CREG? +CREG: 0,1 OK AT+CGATT? +CGATT: 1 OK //GPRS Service’s status //received signal strength //the registration of the ME. www.simcom.com 8 / 34
分享到:
收藏