I am investigating an Ethernet connection issue on our custom PCB with K66 MCU (LQFP package). The application is utilized with MQX, and RTCS from KSDK 1.3.0 by KDS 3.0.0. The application basically initialize the RTCS when boot-up, open and listen on two sockets. Once the host PC connect to the listen port, they start to exchange information. Most of time, the application runs pretty well. However, after certain time, the connection will be closed itself.
I had chance to observe the protocol from Wireshark, and found the issue always happened when the device application sent packets with raw sequence number zero. This cause the host side keep re-sending the acknowledgment and finally close the port.
In the following screenshot, on packet 1159669, our device (10.0.4.208) was trying to send data to the host PC (10.0.4.163). However, On packet 1159733, the Sequence number (raw) was reset to zero instead of 578995+5 = 579000. All the following packets sent from the device have the wrong sequence number. Eventually, the host side close the port. The Acknowledgement number seems OK all the time.

I am not sure what cause this happened and not sure if the issue is in the application or RTCS. I did applied the RTCS 4.2.0.2 software patch and it didn't help. If you have any idea or recommendation, please let me know. Thanks your support.
Peter Shih