This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

always wait for revfrom() function ---- CC3000

Hello, 

I have a question about the receiving of the data from my PC.

i use the MSP430f5438a MCU and i have tried to connect the CC3000 to my router and until now it is ok. 

I send the command 04( Sending data) , in order to send a data to my PC, with UDP and it works very well.

But, when i try to receive the data , it fails always. That is the code :

/**********************************************************************************************************************/

iReturnValue = recvfrom(ulSocket, pucCC3000_Rx_Buffer, CC3000_RX_BUFFER_SIZE, 0, &tSocketAddr, &tRxPacketLength) ;


//Test for revfrom
P1OUT ^= BIT1 ;      // only for test.

if (iReturnValue <= 0)

{
// No data receibed by device
DispatcherUartSendPacket(pucUARTNoDataString, sizeof(pucUARTNoDataString)) ;

}

else

{
// Send data to UART...
DispatcherUartSendPacket(pucCC3000_Rx_Buffer, CC3000_RX_BUFFER_SIZE) ;

}

/**********************************************************************************************************************/

after i send a data "54321" from PC to CC3000, the program waits always near the function revfrom().

I always use this function after i send a data from CC3000 to PC. 

 I think my SPI works well because the sending of data is ok. 

I tried to shut down the socket after sending a data and build a new one for receiving, but it fails too. Or my idea is wrong?

I think my programm watis near the funcktion SimpleLinkWaitData(), but i dont know which part is wrong.

And i know there is an API for configuration of the socket, it that useful for this probelem ?

Thanks for help ,

Shaguar