Other Parts Discussed in Thread: AM3352
Hi,
We are running the latest NDK (2.24.0.11) with Code Composer 6.0.1.00040 on a AM3352 using the CPSW interface. We are running a static IP configuration that is pingable and all of the NDK calls prior to recv() come back without error ( socket, bind, listen and accept). We are trying to receive packets on a TCP socket (socket(AF_INET, SOCK_STREAM, IPPROTO_TCP))) where the initial packet is TCP with an 11 byte payload from a PC application.The call:
if ((g_nRXLength = recv(ClientSocket, g_cRXBuff, 1200, MSG_WAITALL)) > 0)
With the maximum packet size set to 1200 the recv() call will not return until the PC application is stopped and then the recv() call returns with a error 54 (connection reset by peer) and the console spits out a "recv() failed: Domain error".
If we set the max packet size to 1 the recv() call comes back with a receive size of 1, but since our packet processing is expecting a full packet this does not work. We have read the Developers Kit API and it seems we should be able to use the 1200 byte max packet size with recv flags of "MSG_WAITALL" to receive all the different size packets we expect to come across on this TCP socket. Is there some obvious reason why we are not able to receive the 11 byte payload packet (yes we see the packet come from the PC application on WireShark.)?
Thanks,
John C.
Code Composer 6.0.1.00040
Compiler 5.1.6
XDC Tools 3.30.3.47_core
SYS/BIOS 6.40.3.39
NDK 2.24.0.11