- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Solved! Go to Solution.
- Labels:
-
TCPIP
-
Wi-Fi Direct
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, I change another wifi ap solve my problem.
It's seems to be the problem of wifi ap.
Wiced not dump any problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, I change another wifi ap solve my problem.
It's seems to be the problem of wifi ap.
Wiced not dump any problem.