From 37b1e810b180b7710c434eca258bdf7249f69d0d Mon Sep 17 00:00:00 2001 From: zylx Date: Thu, 25 Apr 2019 17:58:49 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9log=E7=9A=84=E6=89=93=E5=8D=B0=E7=AD=89=E7=BA=A7?= =?UTF-8?q?=EF=BC=8C=E5=BB=B6=E9=95=BF=E5=9F=9F=E5=90=8D=E8=BD=AC=E6=8D=A2?= =?UTF-8?q?=E7=9A=84=E8=B6=85=E6=97=B6=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- at_socket_esp8266.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/at_socket_esp8266.c b/at_socket_esp8266.c index 48fd9ee..df9a93e 100644 --- a/at_socket_esp8266.c +++ b/at_socket_esp8266.c @@ -346,7 +346,7 @@ static int esp8266_domain_resolve(const char *name, char ip[16]) RT_ASSERT(name); RT_ASSERT(ip); - resp = at_create_resp(128, 0, rt_tick_from_millisecond(5000)); + resp = at_create_resp(128, 0, rt_tick_from_millisecond(20000)); if (!resp) { LOG_E("No memory for response structure!"); @@ -833,7 +833,7 @@ static int esp8266_netdev_set_addr_info(struct netdev *netdev, ip_addr_t *ip_add /* send addr info set commond "AT+CIPSTA_CUR=[,,]" and wait response */ if (at_exec_cmd(resp, "AT+CIPSTA_CUR=\"%s\",\"%s\",\"%s\"", esp8266_ip_addr, esp8266_gw_addr, esp8266_netmask_addr) < 0) { - LOG_E("esp8266 set addr info failed."); + LOG_D("esp8266 set addr info failed."); result = -RT_ERROR; } else @@ -879,9 +879,9 @@ static int esp8266_netdev_set_dns_server(struct netdev *netdev, uint8_t dns_num, rt_mutex_take(at_event_lock, RT_WAITING_FOREVER); /* send dns server set commond "AT+CIPDNS_CUR=[,,]" and wait response */ - if (at_exec_cmd(resp, "AT+CIPDNS_CUR=1,\"%s\"", inet_ntoa(dns_server)) < 0) + if (at_exec_cmd(resp, "AT+CIPDNS_CUR=1,\"%s\"", inet_ntoa(*dns_server)) < 0) { - LOG_E("set dns server(%s) failed", inet_ntoa(dns_server)); + LOG_E("set dns server(%s) failed", inet_ntoa(*dns_server)); result = -RT_ERROR; } else @@ -968,7 +968,7 @@ static int esp8266_netdev_ping(struct netdev *netdev, const char *host, size_t d /* send domain commond "AT+CIPDOMAIN=" and wait response */ if (at_exec_cmd(resp, "AT+CIPDOMAIN=\"%s\"", host) < 0) { - LOG_E("ping: send commond AT+CIPDOMAIN= failed"); + LOG_D("ping: send commond AT+CIPDOMAIN= failed"); result = -RT_ERROR; goto __exit; } @@ -984,7 +984,7 @@ static int esp8266_netdev_ping(struct netdev *netdev, const char *host, size_t d /* send ping commond "AT+PING=" and wait response */ if (at_exec_cmd(resp, "AT+PING=\"%s\"", host) < 0) { - LOG_E("ping: unknown remote server host"); + LOG_D("ping: unknown remote server host"); result = -RT_ERROR; goto __exit; }