您好!
我们的产品基于 AT 命令示例开发。 (SDK 5.20.00.06)
在密码字符串中使用"(quote)时、无论 整个密码字符串是否带有引号、都会发生参数错误。
是否可以在密码字符串中使用引号?
["AT+wlanconnect="AP_SSID"、wpa_WPA2、"pass"word"、、、
错误:参数数量,0
["AT+wlanconnect="AP_SSID"、wpa_WPA2、pass"word、、、
错误:参数数量,0
谢谢。
卡尔文
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
您好!
我们的产品基于 AT 命令示例开发。 (SDK 5.20.00.06)
在密码字符串中使用"(quote)时、无论 整个密码字符串是否带有引号、都会发生参数错误。
是否可以在密码字符串中使用引号?
["AT+wlanconnect="AP_SSID"、wpa_WPA2、"pass"word"、、、
错误:参数数量,0
["AT+wlanconnect="AP_SSID"、wpa_WPA2、pass"word、、、
错误:参数数量,0
谢谢。
卡尔文
显然、AT 命令不支持它。
要解决此问题、您可以执行以下操作:
-添加" AT_COMMAND 示例工程添加/source/ti/net/utils/str_mpl.c (它将覆盖 ATcmd 库中的实现)。
-在 str_mpl.c 中, 用以下代码更新 StrMpl_getNumVals :
uint32_t StrMpl_getNumVals(char *src, char intraDelim, char termDelim, char *excludeDelim)
{
uint32_t i = 0;
char *token = src;
char *last;
uint8_t exclude = 0;
/* case of terminate delimiter or no terminate delimiter */
if ((*src == termDelim) || ((last = strchr(src,termDelim)) == NULL))
{
return 0;
}
i++;
while (token < last)
{
if (excludeDelim != NULL)
{
if ((*token == excludeDelim[0]) && (exclude == 0))
{
exclude = 1;
}
else if ((*token == excludeDelim[1]) && (exclude == 1))
{
if(*(token+1) == intraDelim)
{
exclude = 0;
}
}
}
if ((*token == intraDelim) && (exclude == 0))
{
i++;
}
token++;
}
return i;
}
-构建并运行 at_commands 示例。
这将使您能够发送诸如"pass" word
BTW。 我不知道什么是 [",它显示为前缀在你的查询中的"AT+"-你不应该发送这个,消息应该以: AT+wlanconnect=开头。