不是,我建议你最好先用串口调试助手先测试下命令,转义字符需要。
我随便就好人做到底,送佛送到西天吧
//所有用到的AT命令结构体
AT_CMD at_cmds[] = {
{AT_CMD_RST, "AT+RST\r\n", AT_RST_TIMEOUT, AT_DEF_RETRIES, net_check_ready, ERR_AT_NAK},
{AT_CMD_CWMODE, "AT+CWMODE=1\r\n", AT_DEF_TIMEOUT, AT_DEF_RETRIES, net_check_at_nochange, ERR_AT_NAK},
{AT_CMD_SMARTCONFIG,"AT+CWSTARTSMART=1\r\n", AT_LINK_TIMEOUT, 1, net_check_smartconfig, ERR_AT_NAK},
{AT_CMD_SMARTSTOP,"AT+CWSTOPSMART\r\n", AT_SMARTLIK_TIMEOUT,AT_DEF_RETRIES, net_check_at, ERR_AT_NAK},
{AT_CMD_CIPMUX, "AT+CIPMUX=0\r\n", AT_DEF_TIMEOUT, AT_DEF_RETRIES, net_check_at, ERR_AT_NAK},
{AT_CMD_CIPSTART, NULL, AT_LINK_TIMEOUT, AT_DEF_RETRIES, net_check_alreay, ERR_AT_NAK},
{AT_CMD_SENDLENGTH, NULL, AT_DEF_TIMEOUT, AT_DEF_RETRIES, net_check_send, ERR_AT_NAK},
{AT_CMD_CIPCLOSE, "AT+CIPCLOSE\r\n", AT_DEF_TIMEOUT, AT_DEF_RETRIES, net_check_at_error, ERR_AT_NOCARE},
{AT_CMD_CWQAP, "AT+CWQAP\r\n", AT_DEF_TIMEOUT, AT_DEF_RETRIES, net_check_at, ERR_AT_NAK},
{AT_CMD_SEND, NULL, AT_DEF_TIMEOUT, AT_DEF_RETRIES, net_check_sendok, ERR_AT_NAK},
{AT_CMD_SMARTRST, "AT+RST\r\n", AT_RST_TIMEOUT, AT_DEF_RETRIES, net_check_ready, ERR_AT_NAK},
{-1,NULL,0,0,NULL,ERR_AT_NAK}
};