The 52235 tcp issue

"Sanjay Morab" <[email protected]> Fri, 12 Sep 2008 13:10:19 +0530
Newsgroups gmane.comp.hardware.motorola.microcontrollers.coldfire
Message-ID <[email protected]>
Dear All

 

The Sample code "Coldfire_lite"  which is provided by Freescale had
"ColdFire_lite_tcp_server" project. I am using this project for the my
application. The original sample code I am using with The development board.


 

When I start the PC side application up to 25 packets it woks fine but after
25 packet transmission the communication hanges.. Select
Coldfire_Lite_tcp_server. Replace the code listed below. Try to use The
Hyperterminal for sending the data in winsock mode.

 

void emg_tcp_rx( void )

{

            int                                             length, i;

            unsigned long   rate;

            

            // PARAM1: M_SOCK socket,

            // PARAM2: char * buffer

            // PARAM3: unsigned length

            //

            // RETURNS: number of bytes actually read, or -1 if error. 

            // int m_recv(M_SOCK so, char * buf, unsigned buflen)

            length = m_recv( emg_tcp_communication_socket, (char *)buffer,
RX_BUFFER_SIZE );

 

            

            if( length > 5)

            {

                                    buffer[length] = '\0';

                                    

                                                            

                        printf("\n Received String %s Length
%d\r\n",buffer,length);

 
m_send(emg_tcp_communication_socket,(char *)buffer,length);

            

            }

}

 

Regards

Sanjay Morab