Operation Guide

© 2022 Shanghai RaymonIoT Technology Co., Ltd.
X-C13SG_REV1.6_Operation Guide
X-C13SG
Shanghai RaymonIoT Technology Co., Ltd.
27
sta: feedback result
Success
Timeout
Unknown host
1.3.3.48. AT+SOCKA
Function: Set/Query SOCKA network protocol parameters. Setting is valid immediately.
Format:
Query Operation:
AT+SOCKA<CR>
+ok=<protocol,CS,port,IP[,opt]><CR><LF><CR><LF>
Set Operation:
AT+SOCKA=<protocol[,CS,port,IP[,opt]]><CR>
+ok<CR><LF><CR><LF>
Parameters:
Protocol:
TCP
UDP
HTTP
MQTT
ALI-IOT
CS: Network mode
SERVER
CLIENT
Port: : protocol port ID: Decimal digit and less than 65535
IP: Server’s IP address or domain name when module set as client, domain name length length <= 100
If set as UDP SERVER, the module will save the IP address and port of the latest UDP packet received. The
data will be sent to the saved IP address and port. If the module hasn’t saved any IP address and port
when power up. The data will be sent to the IP address and port which is set by this command
If set as UDP,CLIENT, the data will always be sent to the IP address and port set by this command.
Param: TLS
Example:
AT+SOCKA=TCP,CLIENT,8899,192.168.1.1
AT+SOCKA=TCP,CLIENT,80,www.baidu.com
Support HTTP, TSL:
AT+SOCKA=HTTP,80,www.baidu.com
AT+SOCKA=MQTT,80,www.baidu.com
AT+SOCKA=ALI-IOT
AT+SOCKA=http,443,getman.cn,NULL,TLS
AT+SOCKA=TCP,client,8899,192.168.1.1,TLS
AT+SOCKA=TCP,client,443,getman.cn,TLS
1.3.3.49. AT+SOCKAIDEN
Function: Set/query whether display from which communication channel the data comes from, and the
setting will take effect after reset.
Format:
Query Operation:
AT+SOCKAIDEN=<id><CR>
+ok=<id,status><CR><LF><CR><LF>