This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Ethernet Stop working

Hello
Here is my program

int main (void) {
        net_initialize();
        socket = tcp_get_socket (TCP_TYPE_SERVER, 0, 20, tcp_callback);

                if (socket) {
                tcp_listen (socket, 4050);
                }

        if (tcp_check_send(socket) ){
        sprintf(msg,"W%04d%04d%04d%04d%04d%04d%04d%04d%05dR\n",10,20,30,40,50,60,70,80,90);
        len=sizeof(msg);
        sendbuf = tcp_get_buf (len);
        memcpy (sendbuf, msg, len);
        tcp_send (socket, sendbuf,len);
                                }

                                 osDelay (1000);

                }

}

when I remove this par

        if (tcp_check_send(socket) ){
        sprintf(msg,"W%04d%04d%04d%04d%04d%04d%04d%04d%05dR\n",10,20,30,40,50,60,70,80,90);
        len=sizeof(msg);
        sendbuf = tcp_get_buf (len);
        memcpy (sendbuf, msg, len);
        tcp_send (socket, sendbuf,len);
                                }


I can't connect to chip via TCP/IP protocol but it shows only

W0010002000300040005000600070008000090R

and the do nothing but connection is alive.and when I add

        if (tcp_check_send(socket) ){
        sprintf(msg,"W%04d%04d%04d%04d%04d%04d%04d%04d%05dR\n",10,20,30,40,50,60,70,80,90);
        len=sizeof(msg);
        sendbuf = tcp_get_buf (len);
        memcpy (sendbuf, msg, len);
        tcp_send (socket, sendbuf,len);
                                }

I can't open the port and I fail to connect to my chip.

what is my mistake?