串口命令
AT+CIPSTART="TCP","101.132.43.66","80" AT+CIPSTART="UDP","101.132.43.66","80" AT+CIPSEND 发送的内容1 十六进制1a表示发送 AT+CIPSEND 发送的内容2 十六进制1a表示发送 Linux CentOS 6.8 X64 (服务器响应的报文) Linux CentOS 6.8 X64 2 (服务器响应的报文) AT+CIPSHUT
交互流程
交互流程 AT+CIPSTART="UDP","101.132.43.66","80" OK CONNECT OK AT+CIPSEND > Hello Sim900A UDP SEND OK AT+CIPSEND > Hello Sim900A UDP2 SEND OK Linux CentOS 6.8 X64 Linux CentOS 6.8 X64 2 AT+CIPSHUT SHUT OK
SIM900A TCP模式模拟HTTP请求
如下 AT+CIPSTART="TCP","www.taobao.com","80" OK CONNECT OK AT+CIPSEND > GET / HTTP/1.1 User-Agent: curl/7.19.7 (i386-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 libidn/1.18 libssh2/1.4.2 Host: wwww.taobao.com Accept: */* SEND OK HTTP/1.1 302 Found Server: Tengine Date: Sun, 03 Sep 2017 03:26:32 GMT Content-Type: text/html Content-Length: 258 Connection: close Location: http://err.taobao.com/error1.html?c=400&u=http:///&r= <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html> <head><title>302 Found</title></head> <body bgcolor="white"> <h1>302 Found</h1> <p>The requested resource resides temporarily under a different URI.</p> <hr/>Powered by Tengine</body> </html> CLOSED AT+CIPSHUT SHUT OK -----------------------------------------------------
转载于:https://blog.51cto.com/990487026/1959732