wiced_udp_send transmit stuck problem

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

cross mob
jats_2143151
Level 1
Level 1

I using STM32F4 to transmit camera capture jpep

form device to server via wifi udp

I do frame transmit, and packet size is 1460, speed 400 packet / second

it's often stuck on wiced_udp_send

it's my code

while(pp->length >0){

if(pp->length>1460){

if(cam_send_data((uint8_t *)pbuff, (uint16_t)1460 )!= WICED_SUCCESS){

WPRINT_MACRO(("socket send data : send data failed\r\n"));

return WICED_ERROR;

}

pbuff=(uint8_t *)(pbuff+1460);

pp->length=(uint32_t)(pp->length-1460);

} else {

if(cam_send_data((uint8_t *)pbuff, (uint16_t)pp->length )!= WICED_SUCCESS){

WPRINT_MACRO(("socket send data : send final data failed\r\n"));

return WICED_ERROR;

}

pp->length=0;

break;

}

}

and cam_send_data is do

const wiced_ip_address_t INITIALISER_IPV4_ADDRESS( peer_ip_addr, MAKE_IPV4_ADDRESS(192, 168, 1, 35) );

memcpy(tx_data, pp, data_length);

wiced_packet_set_data_end(packet, (uint8_t*)tx_data + data_length);

if (wiced_udp_send(&udp_socket, &peer_ip_addr, peer_port, packet) != WICED_SUCCESS)

{

WPRINT_APP_INFO(("UDP packet send failed\n"));

wiced_packet_delete(packet);

return WICED_ERROR;

}

Any solution can fix this problem?

0 Likes
1 Solution

Thanks, I change another wifi ap solve my problem.

It's seems to be the problem of wifi ap.

Wiced not dump any problem.

View solution in original post

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

tjskk wrote:

I using STM32F4 to transmit camera capture jpep

form device to server via wifi udp

I do frame transmit, and packet size is 1460, speed 400 packet / second

it's often stuck on wiced_udp_send

Then you should print out the return error code of wiced_udp_send() to figure out the root cause.

0 Likes

Thanks, I change another wifi ap solve my problem.

It's seems to be the problem of wifi ap.

Wiced not dump any problem.

0 Likes