Hello,
I'm using RL-TCPnet with RTX in order to develop an Modbus TCP application. Everything works fine until the application tries to send some packet greater than 1460 bytes of data.
I'm using tcp_max_dsize and tcp_send to handle the response packets, but tcp_send only accepts packets up to 1460 bytes. When I tried to split the big packet in smaller chuncks of data the tcp_send functions returned FALSE after the first packet had been sent.
I belive that TCP stack should handle large packets and split then when its size are greater than maximum packet size.
Should I use other function?
Is there a better way to send large bunch of data using tcp sockets?
My MDK is 4.7.
Best regards.
Hello again,
Until now still cannot make it work =/.
Application works fine with BSD sockets, but, when I try to send packets larger than 1460B, the send() function send only 1460B (non blocking) or stall the RTX system (blocking mode). I have tried to put main_tcpNET function in other tasks without success.
Have anyone some tip/advice on using BSD sockets, server mode, with RTX?
Best regards,
Take a look at BSD_client example configuration.
Reporting here that I manage to make TCPNet library works in my application and correctly fragment packets, however, I would like to share some difficulties that I faced: * BSD sockets must be in blocking mode to fragment packet; * In multi-thread system, blocking BSD sockets may halt execution of other low prio tasks (USB tasks in my case); * To make my application work properly, I'm using non-blocking sockets and, when fragmentation is needed, changing the sockets to blocking mode, send data and switch back to non-blocking; * Data exchange with blocking BSD API is slower than TCP API. For my application, data transfers that are done at 100kbps using USB goes up to max 40kbps using ethernet BSD; * BSD API is poorly documented and have only a few examples that does not cover many applications.
Thank you guys, for the support.