SIMCom_3G_HTTP_Application Note_V1.00

Similar documents
SIM7000 Series_HTTP_Application Note_V1.01

SSL Application Note. SIM5360_SSL_Application_Note_V0.01

SIM7100_SIM7500_SIM7600 LBS_Application Note_V1.00

SIMCom_3G_Linux_Driver_Applica tion Note_V1.00

UART. SIM5360 UART Multiplexer Application Note. SIM5360_UART_Multiplexer_Application_Note_V

SIMCom_3G_MQTT_Application Note_V1.00

SIM7000 Series_NTP_Application Note_V1.00

HTTP Application Note

SIMCom_3G_CSD_Application Note_V1.00

Audio LINE-IN input application. AN_SIM900_Audio LINE-IN Input_V1.01

Delta Package Update Application Note

SIM800H&L_ Secondary Reflow SMT _Guidelines_V1.00

AT Commands Set SIM20_ATC_V1.02

UART Application Note

SIM7000 Series_PING_Application Note_V1.00

SIM5360_GPIO_Demo Note_V1.00

SIM7000 Series_FTP_Application Note_V1.00

SIM900_DTMF EmbeddedAT Application Note_V1.01

Quectel Cellular Engine

GSM. Quectel Cellular Engine. Firmware Update Application Note. Fw_Update_Application_Note_V3.1

SIM900 AMR File Playing Application Note_V1.01

UART Dload Application Note

Smart Machine Smart Decision. SIM900_IP_Application Note_V1.07 1

SIMCom_SIM800H_EAT_flash_Tool _User Manual_V1.01

SIM7X00 Series_SAT_Application Note_V1.00

SIM5350_EVM_User_Guide _V1.00

SIM800 Series_FS_Application Note_V1.01

SIMCom_3G_PCM_Application Note_V1.04

Quectel Cellular Engine

SIMCOM WCDMA Wireless Module. xx_sleep_mode_application_note

SIM800C-DS_Application Note _V1.00

GPS Application Note

SIM7100 TTS Application Note

SIM20_AT Command Manual_V1.04

SIM800H&L_EVM_User Guide _V1.00

SIM28_EVB kit_user Guide_V1.02

SIM5360 Network Cell Info Application Note

Firmware Upgrade Tool Lite User Guide. Firmware_Upgrade_Tool_Lite_V1.1

UART Application Note. SIM5XXX UART Application Note 1

Development Kit Manual SIM900D-EVB_UGD_V1.01

TCP/IP Application Note

SIM7X00 Series_TCPIP_Application Note_V1.00

Smart Machine Smart Decision. R700_User Guide_V1.05 1

How to use the SIM7100 Module in Linux

Document Name: GPRS Startup. GPRS Startup_V01.00 Status: Created

SIM800H_ Secondary Reflow SMT Guidelines _V1.01

Development Kit Manual SIM305-EVB_UGD_V1.01

SIM5360 BMP Demo Basic Datanet Working Note V1.00

SIM900_Multiplexer Manual_Application Note_V1.3

SIM7100 GPS Application Note

SMS Application notes AN_SMS_V1.01

SIMCOM WCDMA Wireless Module SIM5xxx PCM Application Note

QuecLocator AT Commands Manual

SIM7100 Network Cell Info Application Note

How to use Linux driver

SIM5360_ECALL_Application Note_V0.04

Quectel Cellular Engine

Development Kit Manual. SIM908 EVB kit_user Guide_V1.00

BG96 SSL AT Commands Manual

Application Note. SIM7100_SMS_Application_Note_V

EC20 SSL AT Commands Manual

GSM. Quectel Cellular Engine. GSM TCPIP Recommended Process. GSM_TCPIP_Recommended_. Process_V1.2

UC15 SSL AT Commands Manual

Quectel Cellular Engine

Quectel Cellular Engine

EC20 MMS AT Commands Manual

GSM Recording AT Commands Manual

(SMTP/POP3) Application Note

M10-TE-A. Quectel Cellular Engine. Hardware Design M10-TE-A_HD_V1.01

EC2x&EG9x&EM05 HTTP(S) AT Commands Manual

BC95-G&BC68 MQTT Application Note

WCDMA Audio Player Application Note

SIM900 Reference Design Guide. SIM900_AN_ Reference Design Guide_V1.01

UC20 Android RIL Driver User Guide

Application Note. SIM7100_MMS_Application_Note_V

TCP/IP APP_V1.02 Status: Release

GSM/GPRS/GPS Tracker GL300 User Manual

BG96 PPP Application Note

GSM. Quectel Cellular Engine. GSM FILE AT Commands GSM_FILE _ATC_V1.4

EC2x&EG9x&EM05 PPP Application Note

Mini PCIe_EVB kit_ User Guide_V1.00

SMT Guidelines Module Secondary SMT UGD_V1.16

Development Kit Manual. SIM5360_EVB_User Guide_V1.02

GSM/GPRS/GPS Tracker GL300 User Manual

SCOPE. SMS Application notes

BG96 MQTT Application Note

M10. Quectel Cellular Engine. EVB User Guide M10_EVB_UGD_V1.00

SIM908_Reference Design Guide _Application Note_V1.00

WCDMA UGxx PPP Application Note

M95 Dual SIM Application Notes

Enduro Plus 3G USER MANUAL. TrackingTheWorld.com. Multi-purpose Tracking Device

BC95 Firmware Upgrade via Code Loader User Guide

VL3000 Manager Tool User Guide V1.05

CDMA2000-1X Tracker GL300VC. User Manual. Application Notes: TRACGL300VCUM001 Revision:

L76-L I2C Application Note

UC20 WinCE USB Driver

SIM508 EVB USER GUIDE

GSM Audio Player Application Note

TRACGV75UM001. Version: R1.03

Enduro Plus CDMA USER MANUAL. TrackingTheWorld.com. Multi-purpose Tracking Device

Transcription:

SIMCom_3G_HTTP_Application Note_V1.00

Document Title: SIMCom_3G_HTTP_Application Note Version: 1.00 Date: Status: Document Control ID: Release SIMCom_3G_HTTP_Application Note _V1.00 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 Limited., copying of this document and giving it to others and the using or communication of the contents thereof, are forbidden without express authority. Offenders are liable to the payment of damages. All rights reserved in the event of grant of a patent or the registration of a utility model or design. All specification supplied herein are subject to change without notice at any time. Copyright Shanghai SIMCom Wireless Solutions Ltd. 2013 SIMCom_3G_HTTP_Application Note _V1.00 2

Contents 1 Introduction... 5 1.1 Features... 5 2 AT commands... 6 3 Examples... 7 3.1 Bearer Profile... 7 3.2 Start HTTP/HTTPS Stack...7 3.3 Open HTTP/HTTPS Session... 7 3.4 Send Small Data...7 3.5 Send Large Data...8 3.6 Receive Data... 9 3.7 Close HTTP/HTTPS Session...9 3.8 Stop HTTP/HTTPS stack...9 3.9 Use SSL certificates and Key Files...10 Appendix...11 A Related Documents...11 B Terms and Abbreviations...11 SIMCom_3G_HTTP_Application Note _V1.00 3

Version History Date Version of change Author 2011-11-09 V0.01 New version songjin 2013-12-26 V1.00 Rewrite using new document template songjin Scope This document presents the AT command of HTTP operation and application examples. This document can apply to SIMCom 3G modules, including SIM5218/SIM5215/SIM5216/SIM5320/SIM5310/SIM6320/SIM6216 series modules. SIMCom_3G_HTTP_Application Note _V1.00 4

1 Introduction This document presents the AT command of HTTP operation for SIMCom 3G modules. 1.1 Features 1. SIMCom 3G series supports HTTP/HTTPS AT operation. 2. SIMCom 3G series supports HTTP/HTTPS channel operation without caring for data detail. 3. SIMCom 3G series HTTPS supports SSL3.0/TLS1.0. 4. The same AT interfaces for different HTTP/HTTPS server type. SIMCom_3G_HTTP_Application Note _V1.00 5

2 AT commands Below is the email associated with AT commands, detailed information please refer to document [1]. Through these AT commands can achieve the following functions. 1) Open HTTP/HTTPS session. 2) Close HTTP/HTTPS session 3) Do a GET operation 4) Do a POST operation Command AT+CHTTPSSTART AT+CHTTPSSTOP AT+CHTTPSOPSE AT+CHTTPSCLSE AT+CHTTPSSEND AT+CHTTPSRECV AT+CHTTPSSTATE Start HTTP/HTTPS stack, also active the PDP context Stop HTTP/HTTPS stack, also deactive the PDP context Open HTTP/HTTPS session Close HTTP/HTTPS session Send data Read data in cache buffer Get the state of HTTP/HTTPS stack SIMCom_3G_HTTP_Application Note _V1.00 6

3 Examples There are some examples to explain how to use these commands. In the "" columns of following tables, input of AT commands are in black, module return values are in blue. 3.1 Bearer Profile AT+CGSOCKCONT=1,"IP","apn" Configure bearer profile 1 AT+CSOCKSETPN=1 3.2 Start HTTP/HTTPS Stack AT+CHTTPSSTART Start HTTPS stack 3.3 Open HTTP/HTTPS Session AT+CHTTPSOPSE="www.myhttpserver.com", 80,1 Connect to HTTP/HTTPS server. The last parameter defined in the following: 1-HTTP server 2-HTTPS server 3.4 Send Small Data AT+CHTTPSSEND=88 >GET / HTTP/1.1 Host: www.mywebsite.com User-Agent: MY WEB AGENT Content-Length: 0 Send data to server SIMCom_3G_HTTP_Application Note _V1.00 7

AT+CHTTPSSEND Commit All sending data +CHTTPSSEND: 0 3.5 Send Large Data AT+CHTTPSSEND=1024 > (data of 1024 bytes) Send data to server AT+CHTTPSSEND=1024 > (data of 1024 bytes) AT+CHTTPSSEND? +CHTTPSSEND: 10812 AT+CHTTPSSEND? +CHTTPSSEND: 2096 AT+CHTTPSSEND=1024 > (data of 1024 bytes) Check how many data is left in sending buffer. If the cached data is more than 10K bytes, the program should wait some seconds an check the AT+CHTTPSSEND? again to make sure there is free buffer in module to continue to call AT+CHTTPSSEND=<len>. Now there is only 2096 bytes cached in sending buffer. We can continue to send data when the data cached <= 3K bytes. Continue to send data. AT+CHTTPSSEND=576 > (data of 576 bytes) AT+CHTTPSSEND Commit all sending data. The +CHTTPSSEND: 0 indicates all data has been sent to server. SIMCom_3G_HTTP_Application Note _V1.00 8

+CHTTPSSEND: 0 3.6 Receive Data +CHTTPS: RECV EVENT AT+CHTTPSRECV? +CHTTPSRECV: LEN,4196 There is new data received in cache buffer Check how many data cached in receiving buffer. AT+CHTTPSRECV=1024 +CHTTPSRECV: DATA,1024 (data of 1024 bytes) +CHTTPSRECV: 0 +CHTTPS: RECV EVENT Read all data in cache buffer. Any time, the +CHTTPS: RECV EVENT indicates there is received data in cache buffer. AT+CHTTPSRECV=1024 +CHTTPSRECV: DATA,1024 (data of 1024 bytes) +CHTTPSRECV: 0 +CHTTPS: RECV EVENT AT+CHTTPSRECV=100 +CHTTPSRECV: DATA,100 (data of 100 bytes) +CHTTPSRECV: 0 3.7 Close HTTP/HTTPS Session AT+CHTTPSCLSE Close HTTP/HTTPS session. 3.8 Stop HTTP/HTTPS stack AT+CHTTPSSTOP Stop HTTPS stack SIMCom_3G_HTTP_Application Note _V1.00 9

3.9 Use SSL certificates and Key Files Note, the SSL certificates and key files must be downloaded to module using AT+CCERTDOWN. For detailed information, please refer to document[2]. AT+CHTTPSSTART Start HTTPS stack AT+CSSLCA=0,"ca_cert.der" AT+CSSLCERT="client_cert.der",0 AT+CSSLKEY="client_key.der" AT+CSSLLOADCK AT+CHTTPSOPSE="www.myhttpserver.com", 443,2 AT+CHTTPSCLOSE Set the CA. Set the client certificate Set the client key Load the CA/certificate/key files Connect to HTTP/HTTPS server. The last parameter defined in the following: 1-HTTP server 2-HTTPS server Close HTTP/HTTPS session AT+CHTTPSSTOP Stop HTTP/HTTPS stack SIMCom_3G_HTTP_Application Note _V1.00 10

Appendix A Related Documents SN Document name Remark [1] SIMCOM_SIM5215_SIM5216_ATC_EN_V 1.24.doc [2] SIMCom_3G_SSL_Application Note_V1.10.doc B Terms and Abbreviations Abbreviation HTTP HTTPS SSL Hyper Text Transfer Protocol HTTP over SSL Secure Socket Layer SIMCom_3G_HTTP_Application Note _V1.00 11

Contact us: Shanghai SIMCom Wireless Solutions Co.,Ltd. Address: Building A, SIM Technology Building, No. 633, Jinzhong Road, Shanghai, P. R. China 200335 Tel: +86 21 3252 3300 Fax: +86 21 3252 2030 URL: www.sim.com/wm SIMCom_3G_HTTP_Application Note _V1.00 12