cancel
Showing results for 
Search instead for 
Did you mean: 

Wi-Fi Combo

MaFa_974161
Contributor

Hello,

I'm using CYW954907AEVAL1F to send WiFi UDP packets larger than 1KByte at a rate of 30x2Packets/s.

 

I'm using wiced_packet_create_tcp API and sometimes it fails : it returns 2 (TIMEOUT)

 

I run debugger and I see this situation ...

MaFa_974161_0-1638259951830.png

 

Can someone help me ?

0 Likes
1 Solution
Rakesh_BG
Moderator
Moderator

Hi @MaFa_974161 ,

WICED_TCPIP_TIMEOUT happens when internal packet creation doesn't happens because of unavailable memory in netbuf. you can check return value of netbuf_alloc function in internal_packet_create function in tcpip.c

Thanks,

Rakesh B G

View solution in original post

0 Likes
4 Replies
GauravS_31
Moderator
Moderator

If you want to send UDP packets, the function wiced_packet_create_udp() should be used and not TCP API. Please refer to snip.udp_transmit code example.

0 Likes
MaFa_974161
Contributor

You are right ... I explained my problem in a wrong way.

 

I obtain WICED_TCPIP_TIMEOUT sometimes when I call api

wiced_packet_create_tcp  

or when I call api

wiced_packet_create_udp .

 

My application sends realtime data on an Android Tablet via WiFi. The application configure processor as AP.

 

The data are sent to the tablet by using 1KByte UDP packets.

The source of data is an FPGA and generates 60packets/sec on an SPI but I retransmit every packet three times, so the final rate on WiFi is 180 packets/sec (180MBps).

 

My application also use TCP to get commands from Android Tablet

 

I use UDP for realtime data because UDP has no latency but it's not reliable (this explain why I retrasmit every packet three times: to ensure Tablet get it). I use TCP for commands because it is reliable but has latency.

 

What I observe is that sometimes, when I call wiced_packet_create_tcp  or when I call wiced_packet_create_udp, their return WICED_TCPIP_TIMEOUT (api code 2) ... 

 

What is this timeout due to ?

 

A timeout in wiced_packet_create_udp is not a problem for me ... but in TCP is a big problem.

0 Likes
Rakesh_BG
Moderator
Moderator

Hi @MaFa_974161 ,

WICED_TCPIP_TIMEOUT happens when internal packet creation doesn't happens because of unavailable memory in netbuf. you can check return value of netbuf_alloc function in internal_packet_create function in tcpip.c

Thanks,

Rakesh B G

0 Likes
MaFa_974161
Contributor

but why this behaviour ?

This occours when I receive UDP packets with some Android tablets.

I transmit UDP packets at a rate of 60packets/s and every packet is 1KByte.

0 Likes