forked from xuos/xiuos
fixed the bug of wifi test on nuttx and remove warning
This commit is contained in:
parent
48250b7285
commit
ecba6148cb
|
@ -369,11 +369,12 @@ static int GetCompleteATReply(ATAgentType agent)
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
printf("maintain_len is_full ...\n");
|
printf("maintain_len is_full %d ...\n", read_len);
|
||||||
is_full = true;
|
is_full = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((ch == '\n') && (last_ch == '\r') && (agent->reply_lr_end)) ||
|
if (((ch == '\n') && (agent->reply_lr_end)) ||
|
||||||
|
((ch == '\n') && (last_ch == '\r') && (agent->reply_lr_end)) ||
|
||||||
((ch == agent->reply_end_char) && (agent->reply_end_char) &&
|
((ch == agent->reply_end_char) && (agent->reply_end_char) &&
|
||||||
(last_ch == agent->reply_end_last_char) && (agent->reply_end_last_char)) ||
|
(last_ch == agent->reply_end_last_char) && (agent->reply_end_last_char)) ||
|
||||||
((read_len == agent->reply_char_num) && (agent->reply_char_num))) {
|
((read_len == agent->reply_char_num) && (agent->reply_char_num))) {
|
||||||
|
|
|
@ -99,8 +99,8 @@ int AdapterWifiInit(void)
|
||||||
/******************wifi TEST*********************/
|
/******************wifi TEST*********************/
|
||||||
int AdapterWifiTest(void)
|
int AdapterWifiTest(void)
|
||||||
{
|
{
|
||||||
char cmd[64];
|
// char cmd[64];
|
||||||
int baud_rate = BAUD_RATE_57600;
|
// int baud_rate = BAUD_RATE_57600;
|
||||||
|
|
||||||
struct Adapter* adapter = AdapterDeviceFindByName(ADAPTER_WIFI_NAME);
|
struct Adapter* adapter = AdapterDeviceFindByName(ADAPTER_WIFI_NAME);
|
||||||
|
|
||||||
|
@ -338,7 +338,7 @@ void AdapterWifiGetParam(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int AdapterWifiTest(int argc, char *argv[])
|
int AdapterWifiTestWithParam(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
int i, ret;
|
int i, ret;
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
|
|
||||||
struct WifiParam
|
struct WifiParam
|
||||||
{
|
{
|
||||||
uint8_t wifi_ssid[128];
|
char wifi_ssid[128];
|
||||||
uint8_t wifi_pwd[128];
|
char wifi_pwd[128];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -238,7 +238,7 @@ static int Esp07sWifiSetUp(struct Adapter *adapter)
|
||||||
|
|
||||||
result = GetReplyText(reply);
|
result = GetReplyText(reply);
|
||||||
if (!result) {
|
if (!result) {
|
||||||
printf("%s %n get reply failed.\n",__func__,__LINE__);
|
printf("%s %d get reply failed.\n",__func__,__LINE__);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
goto __exit;
|
goto __exit;
|
||||||
}
|
}
|
||||||
|
@ -355,7 +355,7 @@ static int Esp07sWifiNetstat(struct Adapter *adapter)
|
||||||
|
|
||||||
result = GetReplyText(reply);
|
result = GetReplyText(reply);
|
||||||
if (!result) {
|
if (!result) {
|
||||||
printf("%s %n get reply failed.\n",__func__,__LINE__);
|
printf("%s %d get reply failed.\n",__func__,__LINE__);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
goto __exit;
|
goto __exit;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,15 +47,17 @@ CONFIG_SYSTEM_NSH=y
|
||||||
CONFIG_DEV_GPIO=y
|
CONFIG_DEV_GPIO=y
|
||||||
CONFIG_READLINE_CMD_HISTORY=y
|
CONFIG_READLINE_CMD_HISTORY=y
|
||||||
CONFIG_READLINE_CMD_HISTORY_LEN=100
|
CONFIG_READLINE_CMD_HISTORY_LEN=100
|
||||||
|
|
||||||
CONFIG_READLINE_CMD_HISTORY_LINELEN=120
|
CONFIG_READLINE_CMD_HISTORY_LINELEN=120
|
||||||
CONFIG_READLINE_TABCOMPLETION=y
|
CONFIG_READLINE_TABCOMPLETION=y
|
||||||
CONFIG_FS_ROMFS=y
|
CONFIG_FS_ROMFS=y
|
||||||
CONFIG_NSH_ROMFSETC=y
|
CONFIG_NSH_ROMFSETC=y
|
||||||
CONFIG_NSH_ARCHROMFS=y
|
CONFIG_NSH_ARCHROMFS=y
|
||||||
CONFIG_BOARDCTL_RESET=y
|
CONFIG_BOARDCTL_RESET=y
|
||||||
CONFIG_CONNECTION_FRAMEWORK_DEBUG=y
|
|
||||||
CONFIG_CONNECTION_ADAPTER_WIFI=y
|
CONFIG_CONNECTION_ADAPTER_WIFI=y
|
||||||
CONFIG_ADAPTER_ESP07S_WIFI=y
|
CONFIG_ADAPTER_ESP07S_WIFI=y
|
||||||
CONFIG_ADAPTER_WIFI_ESP07S="esp07s_wifi"
|
CONFIG_ADAPTER_WIFI_ESP07S="esp07s_wifi"
|
||||||
CONFIG_ADAPTER_ESP07S_DRIVER="/dev/ttyS2"
|
CONFIG_ADAPTER_ESP07S_DRIVER="/dev/ttyS2"
|
||||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||||
|
CONFIG_SUPPORT_CONNECTION_FRAMEWORK=y
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue