logo资料库

A7600 Series_HTTP(S)_Application Note_V1.00.pdf

第1页 / 共21页
第2页 / 共21页
第3页 / 共21页
第4页 / 共21页
第5页 / 共21页
第6页 / 共21页
第7页 / 共21页
第8页 / 共21页
资料共21页,剩余部分请下载后查看
About Document
Version History
Scope
Contents
1 Introduction
1.1 Purpose of the document
1.2 Related documents
1.3 Conventions and abbreviations
1.4 The process of Using HTTP(S) AT Commands
1.5 Error Handling
1.5.1 Executing HTTP(S) AT Commands Fails
1.5.2 PDP Activation Fails
1.5.3 Error Response of HTTP(S) Server
2 AT Commands for HTTP(S)
2.1 Overview of AT Commands for HTTP(S)
1
2
3
3.1
1
2
3
3.1
3.1.1
3 HTTP(S) Examples
3.1 Access to HTTP server
3.2 Access to HTTPS server
4 Appendix
4.1 Summary of Error Codes
4.2 Unsolicited Result Codes
A7600 Series_ HTTP(S)_Application Note LTE 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
A7600 Series_HTTP(S)_Application Note_V1.00 A7600 Series_HTTP(S)_Application Note 1.00 2020.6.19 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 1 / 20
A7600 Series_HTTP(S)_Application Note_V1.00 About Document Version History Date 2020.06.19 Chapter Description New version Version V1.00 Scope This document presents the AT Command Set for SIMCom A7600 Series, including A7600XX-XXXX, A5360E, and A7670X. www.simcom.com 2 / 20
A7600 Series_HTTP(S)_Application Note_V1.00 Contents About Document .................................................................................................................... 2 Version History ...................................................................................................................................... 2 Scope .................................................................................................................................................... 2 Contents ................................................................................................................................. 3 Introduction ...................................................................................................................... 4 1 1.1 Purpose of the document ................................................................................................................. 4 1.2 Related documents .......................................................................................................................... 4 1.3 Conventions and abbreviations ....................................................................................................... 4 1.4 The process of Using HTTP(S) AT Commands ............................................................................... 5 1.5 Error Handling.................................................................................................................................. 6 Executing HTTP(S) AT Commands Fails.......................................................................... 6 PDP Activation Fails ......................................................................................................... 6 Error Response of HTTP(S) Server.................................................................................. 6 1.5.1 1.5.2 1.5.3 2 AT Commands for HTTP(S) ............................................................................................. 7 2.1 Overview of AT Commands for HTTP(S) ......................................................................................... 7 3 HTTP(S) Examples ........................................................................................................... 8 Access to HTTP server ............................................................................................................... 8 Access to HTTPS server ........................................................................................................... 13 3.1 3.2 4 Appendix ........................................................................................................................ 18 Summary of Error Codes .......................................................................................................... 18 4.1 4.2 Unsolicited Result Codes .......................................................................................................... 19 www.simcom.com 3 / 20
A7600 Series_HTTP(S)_Application Note_V1.00 1 Introduction 1.1 Purpose of the document Based on module AT command manual, this document will introduce HTTP application process. Developers could understand and develop application quickly and efficiently based on this document. 1.2 Related documents [1] A7600 Series_AT Command Manual 1.3 Conventions and abbreviations In this document, the GSM engines are referred to as following term: ME (Mobile Equipment); MS (Mobile Station); TA (Terminal Adapter); DCE (Data Communication Equipment) or facsimile DCE (FAX modem, FAX board); In application, controlling device controls the GSM engine by sending AT Command via its serial interface. The controlling device at the other end of the serial line is referred to as following term: TE (Terminal Equipment); DTE (Data Terminal Equipment) or plainly "the application" which is running on an embedded system; Other Conventions: PDP(Packet Data Protocol); FTP(File Transfer Protocol); SSL(Secure Sockets Layer); TLS(Transport Layer Security); www.simcom.com 4 / 20
A7600 Series_HTTP(S)_Application Note_V1.00 1.4 The process of Using HTTP(S) AT Commands Power on the module Check the status of SIM card or Reboot the module SIM Card Status: Execute AT+CPIN?,if response is +CPIN:READY,means SIM Card Status is normal.Reboot the module or check SIM card status if AT+CPIN? Fails to identify SIM card in 20s. Signal quality: Execute AT+CSQ to query signal quality.If rssi is equals to 99,please check SIM card status or reboot the module CS Service: If of AT+CREG? equals to 1,it means that the module has registered on CS domain service.Reboot the module if fals to registered on CS domain. PS Serivce: If of AT+CGREG?/AT+CEREG? equals to 1,it means that the module has registered on PS domain service. Query SIM card status by AT+CPIN? +CPIN: READY Query signal quality by AT+CSQ +CSQ: ,,0 < rssi < 31 Query CS service by AT+CREG? +CREG: 0,1 Query PS service by AT+CGREG?/AT+CEREG? UE system information: If is “NO SERVICE”,it means network status has some problem. Query UE information by AT+CPSI? NO SERVICE PDP Context: 1.Configure PDP Context by AT+CGDCONT= 2.Activate the PDP Context by AT+CGACT=,[] 3.Query IP address of the PDP context by AT+CGACT? Configure the PDP context by AT+CGDCONT Active the PDP context by AT+CGACT=,[] and AT+CGACT? PDP ACTIVE FAIL AT+HTTPINIT: AT+HTTPINIT also can activate the PDP Context.But It can not customize PDP activation parameters. AT+HTTPINIT (PDP active and initialize HTTP(S) service) If you want to access https server, ‘SSLCFG’ should be set, but it’s optional according to https server. HTTPS? Y AT+HTTPPARA=”SSLCFG”, Set the SSL context id for HTTPS session. (optional) N Set the URL of network resource that you want to access. AT+HTTPPARA=”URL”,”” Set the parameter of readmode, (optional) AT+HTTPPARA=”READMODE”, Set HTTP(S) connect timeout, (optional) AT+HTTPPARA=”CONNECTTO”, Set HTTP(S) receive timeout ( optional) AT+HTTPPARA=”RECVTO”, Customer can send http request with multi AT command or with the content of the file. Set HTTP(S) “Content-Type” HTTP header information, default value is ‘text/plain’. ( optional) Set HTTP(S) “Accept” HTTP header information, default value is ‘*/*’. (optional) Set HTTP(S) customized HTTP header information (optional) Set HTTP(s) request body content (optional) Select operation AT+HTTPPARA=”CONTENT”,”” AT+HTTPPOSTFILE=[,] Send HTTP(S) request with the content of the file. AT+HTTPPARA=”ACCEPT”,”” AT+HTTPPARA=”USERDATA”,”” AT+HTTPDATA=,
A7600 Series_HTTP(S)_Application Note_V1.00 1.5 Error Handling 1.5.1 Executing HTTP(S) AT Commands Fails When executing HTTP(S) AT commands, if ERROR response is received from the module, please check whether the U(SIM) card is inserted and whether it is +CPIN: READY returned when executing AT+CPIN?. 1.5.2 PDP Activation Fails If it is failed to activate a PDP context with AT+CGACT command, please check the following configurations: 1. Query the PS domain status by AT+CGREG? and make sure the PS domain has been registered. 2. Query the PDP context parameters by AT+CGDCONT? and make sure the APN of the specified PDP context has been set. 3. Make sure the specified PDP context ID is neither used by PPP nor activated by AT+CGACT command. If all above configurations are correct, but activating the PDP context by AT+CGACT command still fails, please reboot the module to resolve this issue. After rebooting the module, please check the configurations mentioned above for at least. 1.5.3 Error Response of HTTP(S) Server When the < errcode > of +HTTPACTION: ,, or +HTTPPOSTFILE: , is not 200, it indicates an error code replied from HTTP(S) server. For example, if < errcode > is 404, the URL can’t be found. If < errcode > is 301, the URL is redirect, please refer to A7600 Series_AT Command Manual_V1.01. www.simcom.com 6 / 20
A7600 Series_HTTP(S)_Application Note_V1.00 2 AT Commands for HTTP(S) 2.1 Overview of AT Commands for HTTP(S) Command AT+HTTPINIT AT+HTTPTERM AT+HTTPPARA AT+HTTPACTION AT+HTTPHEAD AT+HTTPREAD AT+HTTPDATA AT+HTTPPOSTFILE AT+HTTPREADFILE Description Start HTTP service Stop HTTP Service Set HTTP Parameters value HTTP Method Action Read the HTTP Header Information of Server Respons Read the response information of HTTP Server Input HTTP Data Send HTTP Request to HTTP(S) server by File Receive HTTP Response Content to a file www.simcom.com 7 / 20
分享到:
收藏