Quantcast
Channel: Wireless Connectivity
Viewing all articles
Browse latest Browse all 116964

Forum Post: RE: CC3000 : Error in loop back MSG (PC-CC300-PC)

$
0
0

Hi, At least regarding the second scenario, the problem is that you try to receive data of size CC3000_TX_BUFFER_SIZE which is the size of your RX buffer (defined in CC3000_common.h). But this size should contain the payload data and also the SPI header, HCI header and arguments. You can see explanations in the same file (CC3000_common.h): Given the maximal data size MAX_DATA that is expected to be received by application, the required buffer is: Using recv() or recvfrom(): max(CC3000_MINIMAL_RX_SIZE, MAX_DATA + HEADERS_SIZE_DATA + fromlen + ucArgsize + 1) Since TCP is a stream data, when you stress from the PC, the data gets piled up at the Network Stack of CC3000. When you try to receive data of CC3000_TX_BUFFER_SIZE (1520 bytes), it actually gets: 1520+10 (SPI and HCI headers)+24 (args) = 1554 bytes. This is why you get the overrun. And this is why you see in the SPI the large value. When you add a delay between packets, any receive would give you what is already in the CC3000 RX buffers which is probably a single packet, i.e. 1200 bytes and then you are OK. Please use 1460 bytes when you invoke recv() API. Regarding the first scenario, I still need to take a look. Shlomi


Viewing all articles
Browse latest Browse all 116964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>