查询 apn:AT+CGDCONT?
激活 apn
AT+EGACT=1,1,“cmnbiot6”,"",""
其中 cmnbiot6 为查询到的 apn
建立 socket
AT+ESOC=1,2,1
建立连接
AT+ESOCON=0,PORT,“IPADDR”
AT+ESOCON=0,2039,“114.116.144.151” “118.31.15.152”
发送数据
AT+ESOSEND=0,2,3132
断开连接
AT+ESODIS=0
关闭 socket
AT+ESOCL=0
激活 apn
AT+EGACT=1,1,“cmnbiot6”,"",""
建立 socket
AT+ESOC=1,1,1
建立连接
AT+ESOCON=0,PORT,“IPADDR”
AT+ESOCON=0,2039,“114.116.144.151”
发送数据
AT+ESOSEND=0,2,3132
断开连接
AT+ESODIS=0
关闭 socket
AT+ESOCL=0
AT+EDNS="baidu.com"
AT+MIPLCREATE=,,,,
该参数表示参数 字符串的长度,ASCII 码数量。
官方资料上的示例:
AT+MIPLCREATE=56,130038F10003F2002A04001100000000000010196E62696F7462742E6865636C6F7564732E636F6D3A35363833000131F30008F100000000,0,56,0
该指令可以不加参数,以使用默认参数,可以按照如下方式使用默认参数:
发送:
AT+MIPLCREATE
接收:
+MIPLCREATE: 0
OK
AT+CGPADDR=1
+CGPADDR: 1,"100.81.104.244"
OK
AT+MIPLCREATE
+MIPLCREATE: 0
OK
AT+MIPLADDOBJ=0,3303,1,1,1,0
AT+MIPLOPEN=0,86400
+MIPLOBSERVE:0,76658,1,3303,0,-1
AT+MIPLOBSERVERSP=0,76658,1
+MIPLDISCOVER=0,11123,1,3200
AT+MIPLDISCOVERRSP=0,11123,1,4,"5700"
AT+MIPLNOTIFY=0,76658,3303,0,5700,4,4,102.00,0,0
AT+GSN
AT+CIMI
AT+CSQ
AT+CGDCONT?
AT+EGACT=1,1,“cmnbiot6”,"",""
AT+CFUN?
AT+CEREG?
AT+EDNS=“baidu.com”
AT+CGSN
AT+SM=D_STA 查询深度睡眠模式状态
AT+SM=H_L 关闭轻度睡眠模式
AT+SM=H_U 打开轻度睡眠模式
AT+SM=H_DS_L 关闭深度睡眠模式
AT+SM=H_DS_U 打开深度睡眠模式
AT+SM=UNLOCK_FOREVER 开启自动睡眠,重启后保持开启状态
AT+SM=LOCK_FOREVER 关闭自动睡眠,重启后保持关闭状态
AT+EPORT=0
+EPORT: uls = 2
+EPORT: connl = 0
+EPORT: emmi = 1
OK
AT+EPORT=4
+EPORT: 0
baudrate = 9
+EPORT: 1
baudrate = 9
+EPORT: 2
baudrate = 9
+EPORT: 3
baudrate = 9
+EPORT: 4
none
+EPORT: 5
none
OK
AT+EPORT=1,connl,1
第一个参数是命令,第二个参数是串口号,第三个参数是波特率标识。波特率编号根据程序里的枚举值确定,如下:
typedef enum {
HAL_UART_BAUDRATE_110 = 0, /**< Defines UART baudrate as 110 bps. */
HAL_UART_BAUDRATE_300 = 1, /**< Defines UART baudrate as 300 bps. */
HAL_UART_BAUDRATE_1200 = 2, /**< Defines UART baudrate as 1200 bps. */
HAL_UART_BAUDRATE_2400 = 3, /**< Defines UART baudrate as 2400 bps. */
HAL_UART_BAUDRATE_4800 = 4, /**< Defines UART baudrate as 4800 bps. */
HAL_UART_BAUDRATE_9600 = 5, /**< Defines UART baudrate as 9600 bps. */
HAL_UART_BAUDRATE_19200 = 6, /**< Defines UART baudrate as 19200 bps. */
HAL_UART_BAUDRATE_38400 = 7, /**< Defines UART baudrate as 38400 bps. */
HAL_UART_BAUDRATE_57600 = 8, /**< Defines UART baudrate as 57600 bps. */
HAL_UART_BAUDRATE_115200 = 9, /**< Defines UART baudrate as 115200 bps. */
HAL_UART_BAUDRATE_230400 = 10, /**< Defines UART baudrate as 230400 bps. */
HAL_UART_BAUDRATE_460800 = 11, /**< Defines UART baudrate as 460800 bps. */
HAL_UART_BAUDRATE_921600 = 12, /**< Defines UART baudrate as 921600 bps. */
#ifdef HAL_UART_FEATURE_3M_BAUDRATE
HAL_UART_BAUDRATE_3000000 = 13, /**< Defines UART baudrate as 3000000 bps. */
HAL_UART_BAUDRATE_1500000 = 14, /**< Defines UART baudrate as 1500000 bps. */
#endif
HAL_UART_BAUDRATE_MAX /**< Defines maximum enum value of UART baudrate. */
} hal_uart_baudrate_t;
命令的特殊形式可以是 + CPSMS = 2
。 在此形式中,将禁用 PSM 的使用,并且将删除命令 + CPSMS
中所有参数的数据,或者,如果可用,将其设置为制造商特定的默认值。
test 命令返回支持的 以及 E-UTRAN 中请求的扩展周期性 TAU 值的值范围和请求的活动时间值作为复合值。
测试命令:
返回值说明:
+CPSMS: (list of supported s),(list of supported s),(listof supported s),(list of supported s),(list of supported s)
AT+CPSMS=?
+CPSMS: (0-2),,,("00000000"-"1101111"),("00000000"-"11111111")
OK
读命令:
返回值说明:
+CPSMS:,[],[],[],[]
示例:
AT+CPSMS?
+CPSMS: 1,,,"00100011","00100010"
OK
执行命令:
AT+PING=
只能 PING ipv4 地址,不能 PING 域名和 ipv6 地址。