(CYW943907) network_tcp_send_packet error with 0x49

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
HIUR_3769846
Level 3
Level 3
First like given Welcome!

When I used network_tcp_send_packe, error 0x49 [NX_TX_QUEUE_DEPTH] is occurs.Our application sends about 25kbytes data via wi-fi(2.4GHz) at regular intervals about 160ms. This problem is happened sometimes in a few hours.

I create the sample code based on snip.tcp_client and attached in this discussion.

Can you give me some advice to resolve this problem?

BTW, this problem is related to other discussion ((CYW943907) network_tcp_send_packet error with 0x39 )

Error log

+ network_tcp_send_packet() returns 0x49 [NX_TX_QUEUE_DEPTH]

+ wiced_tcp_send_buffer() returns WICED_ERROR

Environment:

+ SDK: WICED-Studio-6.2

+ Device: CYW943907AEVAL1F

+ MakeTarget: project.tcp_client2-CYW943907AEVAL1F ota2_image download_apps download run

0 Likes
10 Replies
HIUR_3769846
Level 3
Level 3
First like given Welcome!

I additionally attached the result of wireshark.

In the result, "TCP Spurious Retransmission" and "TCP DUP ACK" is occured around the error.

Please check around the end in file.

It's seem that when ACK from receiver is lost , CYW943907 could not catch up.

0 Likes

NX_TX_QUEUE_DEPTH means that the maximum queue depth has been reached during TCP transmission. Basically this queue is used for keeping track of transmit packets already sent and an ACK should be received back before the queue can be released. You can try increasing the NX_TCP_MAXIMUM_TX_QUEUE in NetX_Duo\ver5.10_sp3\nx_tcp.h and check if it reduces the frequency of occurrence of the issue.

GauravS_31 wrote:

You can try increasing the NX_TCP_MAXIMUM_TX_QUEUE in NetX_Duo\ver5.10_sp3\nx_tcp.h and check if it reduces the frequency of occurrence of the issue.

Actually, you should check *why* the default NX_TCP_MAXIMUM_TX_QUEUE setting (20) is not enough.

Blindly increasing the value just hide the real bug.

Hi, I changed the parameter NX_TCP_MAXIMUM_TX_QUEUE from 20 to 100. The same error was occured.

0 Likes

Hi GauravS_31,

I cannot resolve this error yet. Do you have any other resolution point of this?

In addition, changing NX_TCP_MAXIMUM_TX_QUEUE, maximum number of times of ping pong ("TCP Spurious Retransmission" and "TCP DUP ACK") is changed. I feel the parameter of NX_TCP_MAXIMUM_TX_QUEUE is not effect of error frequency.

I'm not sure why CYW943907 does not have action when "TCP DUP ACK" is received. Is reason 0x49 [NX_TX_QUEUE_DEPTH]?

0 Likes

The error is caused when nx_tcp_socket_transmit_sent_count > nx_tcp_socket_transmit_queue_maximum.

It appears that the device has not received ACK within the timeout period which is causing the TCP DUP ACK. Since no ACK is received, the queue is not released which is eventually causing the above condition to occur. TCP fast retransmission mechanism should be used in this scenario. Does the frequency of this issue reduce when the timeout is increased? Also do you observe similar issue in LwIP which has the mechanism for TCP DUP ACK?

0 Likes

Thanks for your reply.

I could understand that error is caused by ACK is lost. From your comment, I notice that I need to check whether receiver side (AP and receiver) doesn't have problems.

> Also do you observe similar issue in LwIP which has the mechanism for TCP DUP ACK?

I don't try to observe this in LwIP for now.

0 Likes

Hello:

   I just used your project to have a test,    my server is on my PC windows side,   seems it is hard to duplicate the issue,   So what is your TCP server side ?   and if there has a better way to duplicate the issue.

test for more than three hours with your code, no issue happened ,  so better to share the server side info to me.

Dear thread author "hiroyuki.urabayashi.xm_3769846",

There have been no update for long time (more than one month).

So, this thread will be closed/locked at this time.

if you need further support for this related issue, it would be appreciated if you post a new thread with reference of this thread.

I appreciate your comprehension for this.

0 Likes