Incorrectly using wiced_packet_get_data return params

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

cross mob
Anonymous
Not applicable

Hi,

I tested ota_fr with this config  (BCM943438  custom platform with sam4s cpu and 4343 wifi-ble chip )

snip.ota_fr-FreeRTOS-LwIP-BCM943438-SDIO-debug download run VERBOSE=1 JTAG=atmel

I found that incorectly using return params of function:

wiced_packet_get_data(temp_packet, 0, (uint8_t**)&request_string, &request_length, &available_data_length);

Using request_length  but need use available_data_length. Because  request_length is size in first receiver buffer,  available_data_length total  data size.

If received 1 buffer its ok, but if received 2 buffer  request_length show 1 buffer full size etc.: 1152,   available_data_length show total size in all buffers.

In this state ota_server hung...

I found that in others applications (ota2,  maybe in all?) have are same bug . Same in 3.7.0 SDK.

Possible this bug actual  in  FreeRTOS-lwip  config.

1 Solution

If my understanding is correct:

With current wiced_packet_get_data() implementation, the caller of wiced_packet_get_data() can only get the data/request_length of a single frame from a packet. i.e. the data in other frames of the packet are not read at all.

But all the users of wiced_packet_get_data() does not check if all data are read.

All the usage of wiced_packet_get_data() call needs fix.

This looks like a critical issue, can someone from cypress team response on this issue?

mwf_mmfae

View solution in original post

2 Replies
AxLi_1746341
Level 7
Level 7
10 comments on KBA 5 comments on KBA First comment on KBA

darius1 wrote:

Possible this bug actual  in  FreeRTOS-lwip  config.

Not a FreeRTOS-lwip config bug.

The same issue also has impact on ThreadX-NetX.

0 Likes

If my understanding is correct:

With current wiced_packet_get_data() implementation, the caller of wiced_packet_get_data() can only get the data/request_length of a single frame from a packet. i.e. the data in other frames of the packet are not read at all.

But all the users of wiced_packet_get_data() does not check if all data are read.

All the usage of wiced_packet_get_data() call needs fix.

This looks like a critical issue, can someone from cypress team response on this issue?

mwf_mmfae