Azure-RTOS/Netx, how to transmit tcp data?

Showing results for 
Search instead for 
Did you mean: 

Azure-RTOS/Netx, how to transmit tcp data?

Contributor III


I am trying to make a TCP-Server application for the MIMXRT1020-EVK card using Netx.

My application needs to receive a command via TCP and transmit a 6144-byte buffer in response.

Using the function below, the application works correctly if len is up to 4096 bytes, otherwise send_tcp fails. 

What am I doing wrong in the code below? Is it necessary to segment the buffer into smaller packets and wait for each one to be transmitted before transmitting the next one?
Does anyone know any higher level way to transmit data via TCP on NetX?

void TCP_Send(void *buf, uint32_t len)


 UINT ret;

 NX_PACKET *send_packet;




ret = nx_tcp_socket_send(&TCPSocket, send_packet, NX_WAIT_FOREVER);

if(ret) nx_packet_release(send_packet);



0 Kudos
1 Reply

NXP Employee
NXP Employee

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
According to your statement,
nx_tcp_socket_send(&TCPSocket, send_packet, NX_WAIT_FOREVER) will fail to transfer the data whose size exceeds the 4096 bytes, is my understanding right?
If yes, can you tell the value of the return value: ret, as it can help us to figure the failure out.
And you can find the introduction of the nx_tcp_socket_send function in the below link.
Have a great day,

- If this post answers your question, please click the "Mark Correct" button. Thank you!


- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.


0 Kudos