logo资料库

SIM82XX_SIM83XX Series_HTTP(S)_Application Note_V1.01.pdf

第1页 / 共18页
第2页 / 共18页
第3页 / 共18页
第4页 / 共18页
第5页 / 共18页
第6页 / 共18页
第7页 / 共18页
第8页 / 共18页
资料共18页,剩余部分请下载后查看
About Document
Version History
Scope
Contents
1Introduction
1.1Purpose of the document
1.2Related documents
1.3Conventions and abbreviations
2HTTP Introduction
2.1Characteristic
2.2Request Method
3AT Commands for HTTP(S)
4Bearer Configuration
4.1 PDN Auto-activation
5HTTP(S) Examples
5.1HTTP Function
5.1.1HTTP GET
5.1.2Send HTTP POST Request
5.1.3Send HTTP HEAD Request
5.2Access to HTTPS server
5.2.1Send HTTPS GET Request
5.2.2Send HTTPS POST Request
5.2.3Send HTTPS HEAD Request
5.2.4POST FILE to HTTPS server and read HTTPS response
SIM82XX_SIM83XX Series _HTTP(S)_Application Note 5G Module SIMCom Wireless Solutions Limited SIMCom Headquarters Building, Building 3, No. 289 Linhong Road, Changning District, Shanghai P.R. China Tel: 86-21-31575100 support@simcom.com www.simcom.com
SIM82XX_SIM83XX Series_HTTP(S)_Application Note_V1.01 Document Title:: Version: Date: Status: GENERAL NOTES SIM82XX_SIM83XX Series_HTTP(S)_Application Note 1.01 2021.11.25 Released 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 SIMCom Headquarters Building, Building 3, No. 289 Linhong 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 © 2021 SIMCom Wireless Solutions Limited All Rights Reserved. www.simcom.com 2 / 18
SIM82XX_SIM83XX Series_HTTP(S)_Application Note_V1.01 About Document Version History Version V1.00 V1.01 Date 2020.3.23 2021.11.25 Owner Xianxiang Ma Xianxiang Ma What is new First Release Update format Scope This document applies to the SIMCom SIM820X series, SIM821X series, SIM826X series and SIM83XX series. www.simcom.com 3 / 18
SIM82XX_SIM83XX Series_HTTP(S)_Application Note_V1.01 Contents About Document............................................................................................................ 3 Version History.........................................................................................................................................................3 Scope........................................................................................................................................................................ 3 Contents........................................................................................................................... 4 1 Introduction............................................................................................................... 5 Purpose of the document...........................................................................................................................5 Related documents.....................................................................................................................................5 Conventions and abbreviations................................................................................................................ 5 1.1 1.2 1.3 2 HTTP Introduction....................................................................................................6 Characteristic...............................................................................................................................................6 Request Method.......................................................................................................................................... 6 2.1 2.2 3 AT Commands for HTTP(S)...................................................................................8 4 Bearer Configuration.............................................................................................. 9 4.1 PDN Auto-activation.........................................................................................................................................9 5.1 5.2 5.1.1 5.1.2 5.1.3 5 HTTP(S) Examples.................................................................................................11 HTTP Function...........................................................................................................................................11 HTTP GET......................................................................................................................................11 Send HTTP POST Request........................................................................................................ 12 Send HTTP HEAD Request........................................................................................................13 Access to HTTPS server......................................................................................................................... 14 Send HTTPS GET Request........................................................................................................14 Send HTTPS POST Request..................................................................................................... 15 Send HTTPS HEAD Request.....................................................................................................16 POST FILE to HTTPS server and read HTTPS response content to a file........................17 5.2.1 5.2.2 5.2.3 5.2.4 www.simcom.com 4 / 18
SIM82XX_SIM83XX Series_HTTP(S)_Application Note_V1.01 1 Introduction 1.1 Purpose of the document Based on module AT command manual, this document will introduce HTTP(S) application process. Developers could understand and develop application quickly and efficiently based on this document. 1.2 Related documents [1] SIM82XX_SIM83XX 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; www.simcom.com 5 / 18
SIM82XX_SIM83XX Series_HTTP(S)_Application Note_V1.01 2 HTTP Introduction HTTP (HyperText Transfer Protocol) is an application layer protocol. When you browse a web page, the browser and the web server will send and receive data on the Internet through the HTTP protocol. HTTP is a stateless protocol based on request and response patterns. That is what we usually call Request/Response. 2.1 Characteristic  Support client/server mode;  Simple and fast When a client requests a service from a server, it only needs to pass the request method and path. Because the HTTP protocol is simple, the program size of the HTTP server is small, and the communication speed is fast.  Flexible HTTP allows the transfer of any type of data object. The type being transferred is marked by Content-Type;  No connection No connection means limiting the processing of only one request per link. After the server processes the client's request and receives the customer's response, the server disconnects the link. This way, the transmission time can be saved.  Stateless The HTTP protocol is a stateless protocol. Stateless means that the protocol has no memory for transaction processing. A lack of state means that if subsequent processing requires the previous information, it must be retransmitted, which may result in an increase in the amount of data transferred per connection. On the other hand, it responds faster when the server does not need previous information. 2.2 Request Method According to the HTTP standard, HTTP requests can use a variety of request methods. HTTP 1.0 defines three request methods: the GET, POST, and HEAD methods. HTTP1.1 adds six new request methods: OPTIONS, PUT, PATCH, DELETE, TRACE, and CONNECT www.simcom.com 6 / 18
SIM82XX_SIM83XX Series_HTTP(S)_Application Note_V1.01 methods. No Method 1 GET 2 3 4 5 6 7 8 9 HEAD POST PUT DELETE CONNECT OPTIONS TRACE PATCH Description Make a request to a specific resource. Ask the server for a response that is consistent with the GET request, except that the response body will not be returned. This method can obtain the meta information contained in the response message header without having to transmit the entire response content. Submit data to a specified resource for processing requests (such as submitting a form or uploading a file). The data is included in the request body. POST requests may result in the creation of new resources and/or modifications to existing resources. Uploads its latest content to a specified resource location. Requests the server to delete the resource identified by the Request-URI. H The HTTP/1.1 protocol connections to pipes. Returns the HTTP request method supported by the server for a particular resource. You can also test the functionality of the server by sending a '*' request to the web server. Echoes requests received by the server, primarily for testing or diagnostics. It is a supplement to the PUT method for local updating of known resources. is reserved for proxy servers that can connect The SIM8200 series supports several methods: GET, POST and HEAD. www.simcom.com 7 / 18
SIM82XX_SIM83XX Series_HTTP(S)_Application Note_V1.01 3 AT Commands for HTTP(S) Command AT+HTTPPARA AT+HTTPINIT AT+HTTPACTION AT+HTTPHEAD AT+HTTPREAD AT+HTTPDATA AT+HTTPPOSTFILE AT+HTTPREADFILE AT+HTTPTERM DESCRIPTION Set HTTP(S) Parameter Start HTTP(S) service HTTP(S) Method Action Read the HTTP Header Information of Server Response Read the response Information of Server Response You can use AT+HTTPDATA to input data to post when you send a HTTP/HTTPS POST request Send HTTP request in a file via AT+HTTPPOSTFILE command Receive HTTP Response Content to a file Stop HTTP service. For detail information, please refer to " SIM82XX_SIM83XX_Series_AT Command Manual". www.simcom.com 8 / 18
分享到:
收藏