Преглед изворни кода

Merge pull request #203 from yangpengya/master

guo пре 2 година
родитељ
комит
dbb0e87984

+ 1 - 1
class/a9g/at_device_a9g.c

@@ -814,7 +814,7 @@ static int a9g_init(struct at_device *device)
     struct at_device_a9g *a9g = (struct at_device_a9g *) device->user_data;
 
     /* initialize AT client */
-    at_client_init(a9g->client_name, a9g->recv_line_num);
+    at_client_init(a9g->client_name, a9g->recv_line_num, a9g->recv_line_num);
 
     device->client = at_client_get(a9g->client_name);
     if (device->client == RT_NULL)

+ 1 - 1
class/air720/at_device_air720.c

@@ -873,7 +873,7 @@ static int air720_init(struct at_device *device)
     struct at_device_air720 *air720 = (struct at_device_air720 *)device->user_data;
 
     /* initialize AT client */
-    at_client_init(air720->client_name, air720->recv_line_num);
+    at_client_init(air720->client_name, air720->recv_line_num, air720->recv_line_num);
 
     device->client = at_client_get(air720->client_name);
     if (device->client == RT_NULL)

+ 1 - 1
class/bc26/at_device_bc26.c

@@ -897,7 +897,7 @@ static int bc26_init(struct at_device *device)
     bc26->sleep_status = RT_FALSE; //default sleep is disabled.
 
     /* initialize AT client */
-    at_client_init(bc26->client_name, bc26->recv_line_num);
+    at_client_init(bc26->client_name, bc26->recv_line_num, bc26->recv_line_num);
 
     device->client = at_client_get(bc26->client_name);
     if (device->client == RT_NULL)

+ 1 - 1
class/bc28/at_device_bc28.c

@@ -857,7 +857,7 @@ static int bc28_init(struct at_device *device)
     rt_device_close(serial);
 
     /* initialize AT client */
-    at_client_init(bc28->client_name, bc28->recv_bufsz);
+    at_client_init(bc28->client_name, bc28->recv_bufsz, bc28->recv_bufsz);
 
     device->client = at_client_get(bc28->client_name);
     if (device->client == RT_NULL)

+ 1 - 1
class/ec20/at_device_ec20.c

@@ -925,7 +925,7 @@ static int ec20_init(struct at_device *device)
     struct at_device_ec20 *ec20 = (struct at_device_ec20 *) device->user_data;
 
     /* initialize AT client */
-    at_client_init(ec20->client_name, ec20->recv_line_num);
+    at_client_init(ec20->client_name, ec20->recv_line_num, ec20->recv_line_num);
 
     device->client = at_client_get(ec20->client_name);
     if (device->client == RT_NULL)

+ 1 - 1
class/ec200x/at_device_ec200x.c

@@ -1030,7 +1030,7 @@ static int ec200x_init(struct at_device *device)
     ec200x->sleep_status = RT_FALSE;//default sleep is disabled.
 
     /* initialize AT client */
-    at_client_init(ec200x->client_name, ec200x->recv_line_num);
+    at_client_init(ec200x->client_name, ec200x->recv_line_num, ec200x->recv_line_num);
 
     device->client = at_client_get(ec200x->client_name);
     if (device->client == RT_NULL)

+ 14 - 14
class/esp32/at_device_esp32.c

@@ -38,7 +38,6 @@ static void esp32_get_netdev_info(struct rt_work *work, void *work_data)
     char gateway[AT_ADDR_LEN] = {0}, netmask[AT_ADDR_LEN] = {0};
     char dns_server1[AT_ADDR_LEN] = {0}, dns_server2[AT_ADDR_LEN] = {0};
     const char *resp_expr = "%*[^\"]\"%[^\"]\"";
-    const char *resp_dns = "+CIPDNS:%s";
     ip_addr_t ip_addr;
     rt_uint32_t mac_addr[6] = {0};
     rt_uint32_t num = 0;
@@ -107,8 +106,8 @@ static void esp32_get_netdev_info(struct rt_work *work, void *work_data)
         goto __exit;
     }
 
-    if (at_resp_parse_line_args(resp, 1, resp_dns, dns_server1) <= 0 &&
-            at_resp_parse_line_args(resp, 2, resp_dns, dns_server2) <= 0)
+    /* +CIPDNS:0,"208.67.222.222","8.8.8.8" */
+    if (at_resp_parse_line_args_by_kw(resp, "+CIPDNS:", "%*[^\"]\"%[^\"]\",\"%[^\"]\"", dns_server1, dns_server2) < 0)
     {
         LOG_E("%s device prase \"AT+CIPDNS?\" cmd error.", device->name);
         goto __exit;
@@ -134,7 +133,7 @@ static void esp32_get_netdev_info(struct rt_work *work, void *work_data)
         netdev_low_level_set_dns_server(netdev, 1, &ip_addr);
     }
 
-    /* send DHCP query commond " AT+CWDHCP_CUR?" and wait response */
+    /* send DHCP query commond " AT+CWDHCP" and wait response */
     if (at_obj_exec_cmd(client, resp, "AT+CWDHCP?") < 0)
     {
         goto __exit;
@@ -147,7 +146,7 @@ static void esp32_get_netdev_info(struct rt_work *work, void *work_data)
         goto __exit;
     }
 
-    /* Bit0 - SoftAP DHCP status, Bit1 - Station DHCP status */
+    /* Bit0 - Station DHCP status, Bit1 - SoftAP DHCP status */
     netdev_low_level_set_dhcp_status(netdev, dhcp_stat & 0x01 ? RT_TRUE : RT_FALSE);
 
 __exit:
@@ -247,8 +246,8 @@ static int esp32_netdev_set_addr_info(struct netdev *netdev, ip_addr_t *ip_addr,
     else
         rt_memcpy(netmask_str, inet_ntoa(netdev->netmask), IPADDR_SIZE);
 
-    /* send addr info set commond "AT+CIPSTA_CUR=<ip>[,<gateway>,<netmask>]" and wait response */
-    if (at_obj_exec_cmd(device->client, resp, "AT+CIPSTA_CUR=\"%s\",\"%s\",\"%s\"",
+    /* send addr info set commond "AT+CIPSTA=<ip>[,<gateway>,<netmask>]" and wait response */
+    if (at_obj_exec_cmd(device->client, resp, "AT+CIPSTA=\"%s\",\"%s\",\"%s\"",
                         ip_str, gw_str, netmask_str) < 0)
     {
         LOG_E("%s device set address failed.", device->name);
@@ -303,8 +302,8 @@ static int esp32_netdev_set_dns_server(struct netdev *netdev, uint8_t dns_num, i
         return -RT_ENOMEM;
     }
 
-    /* send dns server set commond "AT+CIPDNS_CUR=<enable>[,<DNS    server0>,<DNS   server1>]" and wait response */
-    if (at_obj_exec_cmd(device->client, resp, "AT+CIPDNS_CUR=1,\"%s\"", inet_ntoa(*dns_server)) < 0)
+    /* send dns server set commond "AT+CIPDNS=<enable>[,<"DNS IP1">][,<"DNS IP2">][,<"DNS IP3">]" and wait response */
+    if (at_obj_exec_cmd(device->client, resp, "AT+CIPDNS=1,\"%s\"", inet_ntoa(*dns_server)) < 0)
     {
         LOG_E("%s device set DNS failed.", device->name);
         result = -RT_ERROR;
@@ -325,7 +324,8 @@ static int esp32_netdev_set_dns_server(struct netdev *netdev, uint8_t dns_num, i
 
 static int esp32_netdev_set_dhcp(struct netdev *netdev, rt_bool_t is_enabled)
 {
-#define ESP32_STATION     1
+#define ESP32_STATION       1 << 0
+#define ESP32_SOFTAP        1 << 1
 #define RESP_SIZE           128
 
     int result = RT_EOK;
@@ -348,8 +348,8 @@ static int esp32_netdev_set_dhcp(struct netdev *netdev, rt_bool_t is_enabled)
         return -RT_ENOMEM;
     }
 
-    /* send dhcp set commond "AT+CWDHCP_CUR=<mode>,<en>" and wait response */
-    if (at_obj_exec_cmd(device->client, resp, "AT+CWDHCP_CUR=%d,%d", ESP32_STATION, is_enabled) < 0)
+    /* send dhcp set commond "AT+CWDHCP=<operate>,<mode>" and wait response */
+    if (at_obj_exec_cmd(device->client, resp, "AT+CWDHCP=%d,%d", is_enabled, ESP32_STATION) < 0)
     {
         LOG_E("%s device set DHCP status(%d) failed.", device->name, is_enabled);
         result = -RT_ERROR;
@@ -408,7 +408,7 @@ static int esp32_netdev_ping(struct netdev *netdev, const char *host,
     }
 
     /* parse the third line of response data, get the IP address */
-    if (at_resp_parse_line_args_by_kw(resp, "+CIPDOMAIN:", "+CIPDOMAIN:%s", ip_addr) < 0)
+    if (at_resp_parse_line_args_by_kw(resp, "+CIPDOMAIN:", "+CIPDOMAIN:\"%[^\"]\"", ip_addr) < 0)
     {
         result = -RT_ERROR;
         goto __exit;
@@ -775,7 +775,7 @@ static int esp32_init(struct at_device *device)
     struct at_device_esp32 *esp32 = (struct at_device_esp32 *) device->user_data;
 
     /* initialize AT client */
-    at_client_init(esp32->client_name, esp32->recv_line_num);
+    at_client_init(esp32->client_name, esp32->recv_line_num, esp32->recv_line_num);
 
     device->client = at_client_get(esp32->client_name);
     if (device->client == RT_NULL)

+ 1 - 1
class/esp32/at_socket_esp32.c

@@ -327,7 +327,7 @@ static int esp32_domain_resolve(const char *name, char ip[16])
         }
 
         /* parse the third line of response data, get the IP address */
-        if (at_resp_parse_line_args_by_kw(resp, "+CIPDOMAIN:", "+CIPDOMAIN:\"%s\"", recv_ip) < 0)
+        if (at_resp_parse_line_args_by_kw(resp, "+CIPDOMAIN:", "+CIPDOMAIN:\"%[^\"]\"", recv_ip) < 0)
         {
             rt_thread_mdelay(100);
             /* resolve failed, maybe receive an URC CRLF */

+ 23 - 23
class/esp8266/at_device_esp8266.c

@@ -39,7 +39,6 @@ static void esp8266_get_netdev_info(struct rt_work *work, void *work_data)
     char gateway[AT_ADDR_LEN] = {0}, netmask[AT_ADDR_LEN] = {0};
     char dns_server1[AT_ADDR_LEN] = {0}, dns_server2[AT_ADDR_LEN] = {0};
     const char *resp_expr = "%*[^\"]\"%[^\"]\"";
-    const char *resp_dns = "+CIPDNS_CUR:%s";
     ip_addr_t ip_addr;
     rt_uint32_t mac_addr[6] = {0};
     rt_uint32_t num = 0;
@@ -101,17 +100,17 @@ static void esp8266_get_netdev_info(struct rt_work *work, void *work_data)
         netdev->hwaddr[num] = mac_addr[num];
     }
 
-    /* send dns server query commond "AT+CIPDNS_CUR?" and wait response */
-    if (at_obj_exec_cmd(device->client, resp, "AT+CIPDNS_CUR?") < 0)
+    /* send dns server query commond "AT+CIPDNS?" and wait response */
+    if (at_obj_exec_cmd(device->client, resp, "AT+CIPDNS?") < 0)
     {
-        LOG_W("please check and update %s device firmware to support the \"AT+CIPDNS_CUR?\" cmd.", device->name);
+        LOG_W("please check and update %s device firmware to support the \"AT+CIPDNS?\" cmd.", device->name);
         goto __exit;
     }
 
-    if (at_resp_parse_line_args(resp, 1, resp_dns, dns_server1) <= 0 &&
-            at_resp_parse_line_args(resp, 2, resp_dns, dns_server2) <= 0)
+    /* +CIPDNS:0,"208.67.222.222","8.8.8.8" */
+    if (at_resp_parse_line_args_by_kw(resp, "+CIPDNS:", "%*[^\"]\"%[^\"]\",\"%[^\"]\"", dns_server1, dns_server2) < 0)
     {
-        LOG_E("%d device prase \"AT+CIPDNS_CUR?\" cmd error.", device->name);
+        LOG_E("%s device prase \"AT+CIPDNS?\" cmd error.", device->name);
         goto __exit;
     }
 
@@ -135,21 +134,21 @@ static void esp8266_get_netdev_info(struct rt_work *work, void *work_data)
         netdev_low_level_set_dns_server(netdev, 1, &ip_addr);
     }
 
-    /* send DHCP query commond " AT+CWDHCP_CUR?" and wait response */
-    if (at_obj_exec_cmd(client, resp, "AT+CWDHCP_CUR?") < 0)
+    /* send DHCP query commond " AT+CWDHCP" and wait response */
+    if (at_obj_exec_cmd(client, resp, "AT+CWDHCP?") < 0)
     {
         goto __exit;
     }
 
     /* parse response data, get the DHCP status */
-    if (at_resp_parse_line_args_by_kw(resp, "+CWDHCP_CUR:", "+CWDHCP_CUR:%d", &dhcp_stat) < 0)
+    if (at_resp_parse_line_args_by_kw(resp, "+CWDHCP:", "+CWDHCP:%d", &dhcp_stat) < 0)
     {
         LOG_E("%s device prase DHCP status error.", device->name);
         goto __exit;
     }
 
-    /* Bit0 - SoftAP DHCP status, Bit1 - Station DHCP status */
-    netdev_low_level_set_dhcp_status(netdev, dhcp_stat & 0x02 ? RT_TRUE : RT_FALSE);
+    /* Bit0 - Station DHCP status, Bit1 - SoftAP DHCP status */
+    netdev_low_level_set_dhcp_status(netdev, dhcp_stat & 0x01 ? RT_TRUE : RT_FALSE);
 
 __exit:
     if (resp)
@@ -248,8 +247,8 @@ static int esp8266_netdev_set_addr_info(struct netdev *netdev, ip_addr_t *ip_add
     else
         rt_memcpy(netmask_str, inet_ntoa(netdev->netmask), IPADDR_SIZE);
 
-    /* send addr info set commond "AT+CIPSTA_CUR=<ip>[,<gateway>,<netmask>]" and wait response */
-    if (at_obj_exec_cmd(device->client, resp, "AT+CIPSTA_CUR=\"%s\",\"%s\",\"%s\"",
+    /* send addr info set commond "AT+CIPSTA=<ip>[,<gateway>,<netmask>]" and wait response */
+    if (at_obj_exec_cmd(device->client, resp, "AT+CIPSTA=\"%s\",\"%s\",\"%s\"",
                         ip_str, gw_str, netmask_str) < 0)
     {
         LOG_E("%s device set address failed.", device->name);
@@ -304,8 +303,8 @@ static int esp8266_netdev_set_dns_server(struct netdev *netdev, uint8_t dns_num,
         return -RT_ENOMEM;
     }
 
-    /* send dns server set commond "AT+CIPDNS_CUR=<enable>[,<DNS    server0>,<DNS   server1>]" and wait response */
-    if (at_obj_exec_cmd(device->client, resp, "AT+CIPDNS_CUR=1,\"%s\"", inet_ntoa(*dns_server)) < 0)
+    /* send dns server set commond "AT+CIPDNS=<enable>[,<"DNS IP1">][,<"DNS IP2">][,<"DNS IP3">]" and wait response */
+    if (at_obj_exec_cmd(device->client, resp, "AT+CIPDNS=1,\"%s\"", inet_ntoa(*dns_server)) < 0)
     {
         LOG_E("%s device set DNS failed.", device->name);
         result = -RT_ERROR;
@@ -326,7 +325,8 @@ static int esp8266_netdev_set_dns_server(struct netdev *netdev, uint8_t dns_num,
 
 static int esp8266_netdev_set_dhcp(struct netdev *netdev, rt_bool_t is_enabled)
 {
-#define ESP8266_STATION     1
+#define ESP8266_STATION     1 << 0
+#define ESP8266_SOFTAP      1 << 1
 #define RESP_SIZE           128
 
     int result = RT_EOK;
@@ -349,8 +349,8 @@ static int esp8266_netdev_set_dhcp(struct netdev *netdev, rt_bool_t is_enabled)
         return -RT_ENOMEM;
     }
 
-    /* send dhcp set commond "AT+CWDHCP_CUR=<mode>,<en>" and wait response */
-    if (at_obj_exec_cmd(device->client, resp, "AT+CWDHCP_CUR=%d,%d", ESP8266_STATION, is_enabled) < 0)
+    /* send dhcp set commond "AT+CWDHCP=<operate>,<mode>" and wait response */
+    if (at_obj_exec_cmd(device->client, resp, "AT+CWDHCP=%d,%d", is_enabled, ESP8266_STATION) < 0)
     {
         LOG_E("%s device set DHCP status(%d) failed.", device->name, is_enabled);
         result = -RT_ERROR;
@@ -409,7 +409,7 @@ static int esp8266_netdev_ping(struct netdev *netdev, const char *host,
     }
 
     /* parse the third line of response data, get the IP address */
-    if (at_resp_parse_line_args_by_kw(resp, "+CIPDOMAIN:", "+CIPDOMAIN:%s", ip_addr) < 0)
+    if (at_resp_parse_line_args_by_kw(resp, "+CIPDOMAIN:", "+CIPDOMAIN:\"%[^\"]\"", ip_addr) < 0)
     {
         result = -RT_ERROR;
         goto __exit;
@@ -422,7 +422,7 @@ static int esp8266_netdev_ping(struct netdev *netdev, const char *host,
         goto __exit;
     }
 
-    if (at_resp_parse_line_args_by_kw(resp, "+", "+%d", &req_time) < 0)
+    if (at_resp_parse_line_args_by_kw(resp, "+", "+PING:%d", &req_time) < 0)
     {
         result = -RT_ERROR;
         goto __exit;
@@ -730,9 +730,9 @@ static void urc_busy_s_func(struct at_client *client, const char *data, rt_size_
 static void urc_func(struct at_client *client, const char *data, rt_size_t size)
 {
     struct at_device *device = RT_NULL;
-    char *client_name = client->device->parent.name;
 
     RT_ASSERT(client && data && size);
+    char *client_name = client->device->parent.name;
 
     device = at_device_get_by_name(AT_DEVICE_NAMETYPE_CLIENT, client_name);
     if (device == RT_NULL)
@@ -776,7 +776,7 @@ static int esp8266_init(struct at_device *device)
     struct at_device_esp8266 *esp8266 = (struct at_device_esp8266 *) device->user_data;
 
     /* initialize AT client */
-    at_client_init(esp8266->client_name, esp8266->recv_line_num);
+    at_client_init(esp8266->client_name, esp8266->recv_line_num, esp8266->recv_line_num);
 
     device->client = at_client_get(esp8266->client_name);
     if (device->client == RT_NULL)

+ 1 - 12
class/esp8266/at_socket_esp8266.c

@@ -61,12 +61,7 @@ static const struct at_urc urc_table[] =
 #ifdef AT_USING_SOCKET_SERVER
 static const struct at_urc urc_table_with_server[] =
 {
-    {"SEND OK",          "\r\n",           urc_send_func},
-    {"SEND FAIL",        "\r\n",           urc_send_func},
-    {"Recv",             "bytes\r\n",      urc_send_bfsz_func},
     {"",                 ",CONNECT\r\n",   urc_connected_func},
-    {"",                 ",CLOSED\r\n",    urc_close_func},
-    {"+IPD",             ":",              urc_recv_func},
 };
 #endif
 
@@ -311,8 +306,6 @@ static int esp8266_socket_send(struct at_socket *socket, const char *buff, size_
     /* set current socket for send URC event */
     esp8266->user_data = (void *) device_socket;
 
-    at_obj_set_urc_table(device->client, urc_table, sizeof(urc_table) / sizeof(urc_table[0]));
-
     /* set AT client end sign to deal with '>' sign */
     at_obj_set_end_sign(device->client, '>');
 
@@ -381,10 +374,6 @@ __exit:
         at_delete_resp(resp);
     }
 
-#ifdef AT_USING_SOCKET_SERVER
-    at_obj_set_urc_table(device->client, urc_table_with_server, sizeof(urc_table_with_server) / sizeof(urc_table_with_server[0]));
-#endif
-
     return result > 0 ? sent_size : result;
 }
 
@@ -433,7 +422,7 @@ static int esp8266_domain_resolve(const char *name, char ip[16])
         }
 
         /* parse the third line of response data, get the IP address */
-        if (at_resp_parse_line_args_by_kw(resp, "+CIPDOMAIN:", "+CIPDOMAIN:%s", recv_ip) < 0)
+        if (at_resp_parse_line_args_by_kw(resp, "+CIPDOMAIN:", "+CIPDOMAIN:\"%[^\"]\"", recv_ip) < 0)
         {
             rt_thread_mdelay(100);
             /* resolve failed, maybe receive an URC CRLF */

+ 1 - 1
class/l610/at_device_l610.c

@@ -936,7 +936,7 @@ static int l610_init(struct at_device *device)
     struct at_device_l610 *l610 = (struct at_device_l610 *) device->user_data;
 
     /* initialize AT client */
-    at_client_init(l610->client_name, l610->recv_line_num);
+    at_client_init(l610->client_name, l610->recv_line_num, l610->recv_line_num);
 
     device->client = at_client_get(l610->client_name);
     if (device->client == RT_NULL)

+ 1 - 1
class/m26/at_device_m26.c

@@ -755,7 +755,7 @@ static int m26_init(struct at_device *device)
     struct at_device_m26 *m26 = (struct at_device_m26 *) device->user_data;
 
     /* initialize AT client */
-    at_client_init(m26->client_name, m26->recv_line_num);
+    at_client_init(m26->client_name, m26->recv_line_num, m26->recv_line_num);
 
     device->client = at_client_get(m26->client_name);
     if (device->client == RT_NULL)

+ 1 - 1
class/m5311/at_device_m5311.c

@@ -709,7 +709,7 @@ static int m5311_init(struct at_device *device)
     struct at_device_m5311 *m5311 = (struct at_device_m5311 *) device->user_data;
 
     /* initialize AT client */
-    at_client_init(m5311->client_name, m5311->recieve_line_num);
+    at_client_init(m5311->client_name, m5311->recieve_line_num, m5311->recieve_line_num);
 
     device->client = at_client_get(m5311->client_name);
     if (device->client == RT_NULL)

+ 1 - 1
class/m6315/at_device_m6315.c

@@ -860,7 +860,7 @@ static int m6315_init(struct at_device *device)
     struct at_device_m6315 *m6315 = (struct at_device_m6315 *) device->user_data;
 
     /* initialize AT client */
-    at_client_init(m6315->client_name, m6315->recv_line_num);
+    at_client_init(m6315->client_name, m6315->recv_line_num, m6315->recv_line_num);
 
     device->client = at_client_get(m6315->client_name);
     if (device->client == RT_NULL)

+ 1 - 1
class/me3616/at_device_me3616.c

@@ -827,7 +827,7 @@ static int me3616_init(struct at_device *device)
     me3616->sleep_status = RT_FALSE;//default sleep is disabled.
 
     /* initialize AT client */
-    at_client_init(me3616->client_name, me3616->recv_line_num);
+    at_client_init(me3616->client_name, me3616->recv_line_num, me3616->recv_line_num);
 
     device->client = at_client_get(me3616->client_name);
     if (device->client == RT_NULL)

+ 1 - 1
class/ml305/at_device_ml305.c

@@ -886,7 +886,7 @@ static int ml305_init(struct at_device *device)
     rt_device_control(serial, RT_DEVICE_CTRL_CONFIG, &serial_config);
 
     /* initialize AT client */
-    at_client_init(ml305->client_name, ml305->recv_buff_size);
+    at_client_init(ml305->client_name, ml305->recv_buff_size, ml305->recv_buff_size);
 
     device->client = at_client_get(ml305->client_name);
     if (device->client == RT_NULL)

+ 1 - 1
class/mw31/at_device_mw31.c

@@ -581,7 +581,7 @@ static int mw31_init(struct at_device *device)
     struct at_device_mw31 *mw31 = (struct at_device_mw31 *) device->user_data;
 
     /* initialize AT client */
-    at_client_init(mw31->client_name, mw31->recv_line_num);
+    at_client_init(mw31->client_name, mw31->recv_line_num, mw31->recv_line_num);
 
     device->client = at_client_get(mw31->client_name);
     if (device->client == RT_NULL)

+ 1 - 1
class/n21/at_device_n21.c

@@ -771,7 +771,7 @@ static int n21_init(struct at_device *device)
     struct at_device_n21 *n21 = (struct at_device_n21 *)device->user_data;
 
     /* initialize AT client */
-    at_client_init(n21->client_name, n21->recv_line_num);
+    at_client_init(n21->client_name, n21->recv_line_num, n21->recv_line_num);
 
     device->client = at_client_get(n21->client_name);
     if (device->client == RT_NULL)

+ 1 - 1
class/n58/at_device_n58.c

@@ -844,7 +844,7 @@ static int n58_init(struct at_device *device)
     struct at_device_n58 *n58 = (struct at_device_n58 *)device->user_data;
 
     /* initialize AT client */
-    at_client_init(n58->client_name, n58->recv_line_num);
+    at_client_init(n58->client_name, n58->recv_line_num, n58->recv_line_num);
 
     device->client = at_client_get(n58->client_name);
     if (device->client == RT_NULL)

+ 1 - 1
class/n720/at_device_n720.c

@@ -904,7 +904,7 @@ static int n720_init(struct at_device *device)
     n720->sleep_status = RT_FALSE;//default sleep is disabled.
 
     /* initialize AT client */
-    at_client_init(n720->client_name, n720->recv_line_num);
+    at_client_init(n720->client_name, n720->recv_line_num, n720->recv_line_num);
 
     device->client = at_client_get(n720->client_name);
     if (device->client == RT_NULL)

+ 1 - 1
class/rw007/at_device_rw007.c

@@ -231,7 +231,7 @@ static int rw007_init(struct at_device *device)
     struct at_device_rw007 *rw007 = (struct at_device_rw007 *) device->user_data;
 
     /* initialize AT client */
-    at_client_init(rw007->client_name, rw007->recv_line_num);
+    at_client_init(rw007->client_name, rw007->recv_line_num, rw007->recv_line_num);
 
     device->client = at_client_get(rw007->client_name);
     if (device->client == RT_NULL)

+ 1 - 1
class/sim76xx/at_device_sim76xx.c

@@ -744,7 +744,7 @@ static int sim76xx_init(struct at_device *device)
     struct at_device_sim76xx *sim76xx = (struct at_device_sim76xx *) device->user_data;
 
     /* initialize AT client */
-    at_client_init(sim76xx->client_name, sim76xx->recv_line_num);
+    at_client_init(sim76xx->client_name, sim76xx->recv_line_num, sim76xx->recv_line_num);
 
     device->client = at_client_get(sim76xx->client_name);
     if (device->client == RT_NULL)

+ 1 - 1
class/sim800c/at_device_sim800c.c

@@ -850,7 +850,7 @@ static int sim800c_init(struct at_device *device)
     struct at_device_sim800c *sim800c = (struct at_device_sim800c *) device->user_data;
 
     /* initialize AT client */
-    at_client_init(sim800c->client_name, sim800c->recv_line_num);
+    at_client_init(sim800c->client_name, sim800c->recv_line_num, sim800c->recv_line_num);
 
     device->client = at_client_get(sim800c->client_name);
     if (device->client == RT_NULL)

+ 1 - 1
class/w60x/at_device_w60x.c

@@ -732,7 +732,7 @@ static int w60x_init(struct at_device *device)
     struct at_device_w60x *w60x = (struct at_device_w60x *) device->user_data;
 
     /* initialize AT client */
-    at_client_init(w60x->client_name, w60x->recv_line_num);
+    at_client_init(w60x->client_name, w60x->recv_line_num, w60x->recv_line_num);
 
     device->client = at_client_get(w60x->client_name);
     if (device->client == RT_NULL)