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.

cc3000 recv error

Other Parts Discussed in Thread: MSP430G2553

I'm now using CC3000 Boost and MSP430G2553

CC3000 works as server , laptop works as client , 

I have succeed in Wlan connect, socket(), bind,listen and accept, the return values are all correct.

but when i try to recv data from client。 i have sent data , the cc3000  interrupted by HCI_EVNT_RECV( operation code :0x1004 ) occurs, but the HCI payload arguments is 

 

1byte

4 bytes

4 bytes

4 bytes

 

Status

SD(Socket Descriptor)

Number of Bytes Received

Flags

Expected arguments

0

0000 0000~0700 0000

(Socket handle scope is 0~7)

0000 0000 or bigger

 

0000 0000

Actual received arguments

0

FEFF FFFF

(-2)

FFFF FFFF

(-1)

0000 0000

I didn't find the specification or definition of -2(socket descriptor) and -1 (number length), could someone explain it??

great thanks!

----------

sionsi

  • Although no one answers, i have solved the problem. the socket discriptor = -2 is caused by accept() function. because the accept is non-blocking mode(default), so i moved the accept function into a while() loop, wait until the return socket discriptor >= 0 .