fixed the bug of wifi test on nuttx and remove warning

This commit is contained in:
wlyu 2022-09-28 19:45:32 +08:00
parent 48250b7285
commit ecba6148cb
5 changed files with 33 additions and 30 deletions

View File

@ -369,11 +369,12 @@ static int GetCompleteATReply(ATAgentType agent)
}
} else {
printf("maintain_len is_full ...\n");
printf("maintain_len is_full %d ...\n", read_len);
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) &&
(last_ch == agent->reply_end_last_char) && (agent->reply_end_last_char)) ||
((read_len == agent->reply_char_num) && (agent->reply_char_num))) {

View File

@ -99,8 +99,8 @@ int AdapterWifiInit(void)
/******************wifi TEST*********************/
int AdapterWifiTest(void)
{
char cmd[64];
int baud_rate = BAUD_RATE_57600;
// char cmd[64];
// int baud_rate = BAUD_RATE_57600;
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;

View File

@ -31,8 +31,8 @@
struct WifiParam
{
uint8_t wifi_ssid[128];
uint8_t wifi_pwd[128];
char wifi_ssid[128];
char wifi_pwd[128];
};

View File

@ -238,7 +238,7 @@ static int Esp07sWifiSetUp(struct Adapter *adapter)
result = GetReplyText(reply);
if (!result) {
printf("%s %n get reply failed.\n",__func__,__LINE__);
printf("%s %d get reply failed.\n",__func__,__LINE__);
ret = -1;
goto __exit;
}
@ -355,7 +355,7 @@ static int Esp07sWifiNetstat(struct Adapter *adapter)
result = GetReplyText(reply);
if (!result) {
printf("%s %n get reply failed.\n",__func__,__LINE__);
printf("%s %d get reply failed.\n",__func__,__LINE__);
ret = -1;
goto __exit;
}

View File

@ -47,15 +47,17 @@ CONFIG_SYSTEM_NSH=y
CONFIG_DEV_GPIO=y
CONFIG_READLINE_CMD_HISTORY=y
CONFIG_READLINE_CMD_HISTORY_LEN=100
CONFIG_READLINE_CMD_HISTORY_LINELEN=120
CONFIG_READLINE_TABCOMPLETION=y
CONFIG_FS_ROMFS=y
CONFIG_NSH_ROMFSETC=y
CONFIG_NSH_ARCHROMFS=y
CONFIG_BOARDCTL_RESET=y
CONFIG_CONNECTION_FRAMEWORK_DEBUG=y
CONFIG_CONNECTION_ADAPTER_WIFI=y
CONFIG_ADAPTER_ESP07S_WIFI=y
CONFIG_ADAPTER_WIFI_ESP07S="esp07s_wifi"
CONFIG_ADAPTER_ESP07S_DRIVER="/dev/ttyS2"
CONFIG_INIT_ENTRYPOINT="nsh_main"
CONFIG_SUPPORT_CONNECTION_FRAMEWORK=y