Hi,
I am using cc3000 as udp client but not able to send data to server, the server is working fine which i tested with another udp client .my code as follows
uint16_t udp_socket_handle;
sockaddr udp_struct_data_sock;
uint8_t buff_send_udpData[100] = "hi arun hru";
char *buff_send_point;
uint8_t buff_recv[1500];
uint8_t *buff_recv_point = buff_recv;
uint32_t recvPacketlength = sizeof( udp_struct_data_sock);
uint16_t udp_send_num;
uint16_t udp_recv_num;
uint8_t udp_socket_close ;
void func_connect (void)
{
buff_send_point = buff_send_udpData ; // for udp to handle
udp_struct_data_sock.sa_family = AF_INET ;
udp_struct_data_sock.sa_data[0] = (UDPPORT & 0xFF00)>> 8;
udp_struct_data_sock.sa_data[1] = (UDPPORT & 0x00FF);
udp_struct_data_sock.sa_data[2] = 0xc0; //192
udp_struct_data_sock.sa_data[3] = 0xa8; //168
udp_struct_data_sock.sa_data[4] = 0x03; //03
udp_struct_data_sock.sa_data[5] = 0xff; //255 // broad cast
memset(&udp_struct_data_sock.sa_data[6],0,8);
udp_socket_handle = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
udp_send_num = sendto (udp_socket_handle, buff_send_udpData,50,0,&udp_struct_data_sock,sizeof(sockaddr));
udp_socket_close = closesocket(udp_socket_handle);
}