diff --git a/components/net/at/at_socket/at_socket.c b/components/net/at/at_socket/at_socket.c index ffca0a5478b4242e0bf318c49e7c10d72685ea3b..a6d0b5ccadcf0b0b52ec9e1924a13f10c792bf4a 100644 --- a/components/net/at/at_socket/at_socket.c +++ b/components/net/at/at_socket/at_socket.c @@ -791,6 +791,7 @@ int at_sendto(int socket, const void *data, size_t size, int flags, const struct goto __exit; } sock->state = AT_SOCKET_CONNECT; + /* set AT socket receive data callback function */ at_dev_ops->at_set_event_cb(AT_SOCKET_EVT_RECV, at_recv_notice_cb); at_dev_ops->at_set_event_cb(AT_SOCKET_EVT_CLOSED, at_closed_notice_cb); }