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 firmware is not stable and buggy?



Hi,

I have been working on networking code using the socket API of the CC3000. When I call send function to send data over the socket, it seems like the CC3000 never return the 1003 (HCI_EVNT_SEND) response (it only return the 4100 code).

When I use the select call to monitor the incoming data and specify the timeout to be 1 second, the CC3000 never return a status stating that there is incoming data even though I input some data to the connection. If I specify no timeout, then it does work.

I am wondering anybody has the similar issue? It is kind of frustrated.

Thanks

  • Hi,

    The CC3000 is being used for a while and problems as you are describing are not known.
    Can you please share a bit more information on your environment:
    1. Example code not which is not working for you
    2. System description: which host processor are you using? which development platform? which IDE?

    Thanks,
    Alon.S

  • Hi,

    I am using Atmel ATSAM4 chip. The following is the code (using polling scheme to receive all the data from the CC3000 through SPI bus). And CC3000 software/firmware architure I think is not easy to use and not doing right...

    #define SERVER_PORT        10003
    #define INADDR_ANY        0x0
    #define SOMAXCONN        1

    static uns8    cc3000State;
    static int listenSocket;
    static int clientSocket;
    static sockaddr saServer;
    static sockaddr saClient;
    uns8 requestBuffer[128];

    void cc3000_task(void)
    {
        cc3000State = CC3000_STARTUP;
        int    iRetStatus;
        socklen_t addrLen;
        //hci_status_t status;
        short  nonBlocking = 1;
        short Status;
       
        while (true)
        {
            switch (cc3000State)
            {
                case CC3000_STARTUP:
                    cc3000_startup_sequence();
                    cc3000State = CC3000_IP_CONFIG;
                    break;
                   
                case CC3000_IP_CONFIG:
                    if (1 == cc3000_dhcp_complete)
                    {
                        cc3000State = CC3000_SOCKET_IDLE;
                        break;
                    }
                    SimpleLinkWaitEvent(0, &iRetStatus);        // 0 -> wait for nothing                   
                    //debug_var("\nmain loop status=", status);
                    break;

                case CC3000_SOCKET_IDLE:
                    listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
                    if (listenSocket == -1)
                    {
                        cc3000State = CC3000_STARTUP;        // start over
                        break;
                    }
                    cc3000State = CC3000_SOCKET_BIND;
                    break;

                case CC3000_SOCKET_BIND:
                    memset( &saServer, 0, sizeof(saServer) );
    #if 0               
                    saServer.sin_family = AF_INET;
                    saServer.sin_addr.s_addr = INADDR_ANY;
                    saServer.sin_port = SERVER_PORT;
    #endif
                    int port = SERVER_PORT;
                    saServer.sa_family = AF_INET;
       
        // Set the Port Number
                    saServer.sa_data[0] = (port & 0xFF00)>> 8;
                    saServer.sa_data[1] = (port & 0x00FF);
       
                    memset (&saServer.sa_data[2], 0, 4);
           
                    //iRetStatus = bind( listenSocket, (sockaddr *) &saServer, sizeof(saServer) );
                    // if ( -1 == iRetStatus)
                    if (bind(listenSocket, &saServer, sizeof(sockaddr)) != 0)
                    {
                        cc3000State = CC3000_STARTUP;        // start over
                        break;
                    }
                    cc3000State = CC3000_SOCKET_LISTEN;
                    break;

                case CC3000_SOCKET_LISTEN:
                    iRetStatus = listen( listenSocket, SOMAXCONN );
                    if ( 0 != iRetStatus)
                    {
                        cc3000State = CC3000_STARTUP;        // start over
                        break;
                    }

                    Status = setsockopt(listenSocket, SOL_SOCKET, SOCKOPT_NONBLOCK, &nonBlocking, sizeof(nonBlocking));

                    if( Status < 0 )
                    {
                        while(1); //error
                    }

                    cc3000State = CC3000_SOCKET_ACCEPT;
                    clientSocket = -1;
                    break;

                case CC3000_SOCKET_ACCEPT:
               
                    //while (1)
                    //{
                    //    status = cc3000_hci_wait_for(0);
                    //    debug_var("\nstatus=", status);
                    //}
                   
                    while ( (clientSocket == -1) || (clientSocket == -2) )
                    {
                       
                        clientSocket = accept( listenSocket, (sockaddr *) &saClient, &addrLen );
                        OSSleep(200);
                    }
                    Console_Printf("Client socket = %d\n", clientSocket )
                   
     #if 0
                    while (1)
                    {
                        status = cc3000_hci_wait_for(0);
                        debug_var("\nstatus=", status);
                    }
               
                    if ( -1 == clientSocket )
                    {
                        // Failure
                        console_write_string("cc3000_task: accept failed"NL );
                        cc3000State = CC3000_SOCKET_LISTEN;
                        return;
                    }
                    while (1)
                    {
                        status = cc3000_hci_wait_for(0);
                        debug_var("\nstatus=", status);
                    }
    #endif               
                    cc3000State = CC3000_SOCKET_DELIVER;
                    break;
                   
                case CC3000_SOCKET_DELIVER:
                    cc3000SocketDeliver();
                    break;
                default:
                    break;
            }
        }

    #if 0
        while (1)
        {
            status = cc3000_hci_wait_for(HCI_NETAPP_DHCP);
            debug_var("\nmain loop status=", status);
            // OSSleep(500);
        }
    #endif

    }

    unsigned char testSendBuff[128];
    uint16_t testSendLen;

    void cc3000SocketDeliver(void)
    {
        //hci_status_t status;
        uns16 retEvt;
        tBsdReadReturnParams tSocketReadEvent;
        tBsdSelectRecvParams tParams;
        fd_set readsds;
        int maxFD;
        timeval timeout;
        int ret;
        memset(&timeout, 0, sizeof(timeval));
       
        timeout.tv_sec = 5;
        timeout.tv_usec = 0;


        //recv(clientSocket, requestBuffer, sizeof(requestBuffer), 0);

        testSendLen = 0;
        tSLInformation.usNumberOfFreeBuffers = g_free_buffers;
        tSLInformation.usSlBufferLength = g_buffer_length;

        FD_SET(clientSocket, &readsds);
        maxFD = clientSocket + 1;
        //select(maxFD, &readsds, NULL, NULL, &timeout);
        send(clientSocket, "Welcome To CC3000", 17, 0);
        while (true)
        {
            // send a RECV command to ready for the receive? No we need this?
           
            // check for IRQ first for receive
            if (cc3000_read_irq_pin() == 0)
            {
                // go and process the packet
                // retEvt = SimpleLinkWaitEvent(0, &tSocketReadEvent);
                retEvt = SimpleLinkWaitEvent(0, &tParams);

                if (HCI_EVNT_SELECT == retEvt)
                {
                     if (tParams.iStatus >= 0)
                     {
                        ret = recv(clientSocket, requestBuffer, sizeof(requestBuffer), 0);
                        if (ret != -1)
                        {
                            debug_str("Receive Data...\n");
                       
                            for (uns16 count = 0; count < ret; count++)
                            {
                                debug_int_hex(requestBuffer[count]);
                                debug_putc(' ');
                            }
                            debug_str("\n");
                            testSendLen = ret;
                            memmove(testSendBuff, requestBuffer, ret);                       
                        }
                         
                     }
                     select(maxFD, &readsds, NULL, NULL, NULL);
                     continue;
                }           
                else if (HCI_EVNT_RECV == retEvt)
                {
                    if (tSocketReadEvent.iNumberOfBytes > 0)
                    {
                        // Wait for the data in a synchronous way. Here we assume that the bug is
                        // big enough to store also parameters of receive from too....
                        SimpleLinkWaitData(requestBuffer, (unsigned char *)0, (unsigned char *)0);
                   
                        debug_str("Receive Data...\n");
       
                        for (uns16 count = 0; count < tSocketReadEvent.iNumberOfBytes; count++)
                        {
                            debug_int_hex(requestBuffer[count]);
                            debug_putc(' ');
                        }
                        debug_str("\n");   
                        testSendLen = tSocketReadEvent.iNumberOfBytes;
                        memmove(testSendBuff, requestBuffer, tSocketReadEvent.iNumberOfBytes);
                                   
                        recv(clientSocket, requestBuffer, sizeof(requestBuffer), 0);
                        continue;
                    }
                    else if (tSocketReadEvent.iNumberOfBytes == ERROR_SOCKET_INACTIVE)
                    {
                        closesocket(clientSocket);
                        cc3000State = CC3000_SOCKET_ACCEPT;
                        clientSocket = -1;
                        return;           
                    }
                }
                else if (HCI_EVNT_BSD_TCP_CLOSE_WAIT == retEvt)
                {
                    closesocket(clientSocket);
                    cc3000State = CC3000_SOCKET_ACCEPT;
                    clientSocket = -1;
                    return;           
                }
                else if (HCI_EVNT_WLAN_UNSOL_DISCONNECT == retEvt)
                {
                    closesocket(clientSocket);
                    cc3000State = CC3000_STARTUP;
                    clientSocket = -1;
                    return;           
                }           
               
                //status = cc3000_hci_wait_for(0);        // 0 -> wait for nothing   
                //debug_var("\ncc3000SocketDeliver status=", status);
               
                // Check the status, and see if we need to return and re-initialize the module           
            }
            else if ((ret = select(maxFD, &readsds, NULL, NULL,  0)) > 0)
            {
                ret = recv(clientSocket, requestBuffer, sizeof(requestBuffer), 0);
                if (ret != -1)
                {
                    debug_str("Receive Data...\n");
                       
                    for (uns16 count = 0; count < ret; count++)
                    {
                        debug_int_hex(requestBuffer[count]);
                        debug_putc(' ');
                    }
                    debug_str("\n");
                    testSendLen = ret;
                    memmove(testSendBuff, requestBuffer, ret);                       
                }           
            }
            // Check if there is any transmit packet pending
            if (testSendLen != 0)
            {
                if (send(clientSocket, testSendBuff, testSendLen, 0) == -1)
                {
                    closesocket(clientSocket);
                    cc3000State = CC3000_SOCKET_ACCEPT;
                    clientSocket = -1;
                    return;           
                }
                testSendLen = 0;

            }
           
            OSRelinquish();        // and loop again
           
        }
    }

    void cc3000_callback_connect_status(uns8 connected, uns8 dhcp) {
       
        console_write_string("Status change! ");
        if (connected) {
            console_write_string(" <Connected> ");
        } else {
            console_write_string(" <Disconnected> ");
        }
        if (dhcp) {
            console_write_string(" <IP address good> ");
        } else {
            console_write_string(" <No IP address yet> ");
        }
        console_write_string(NL);
           
    }

    void wlan_start(unsigned short usPatchesAvailableAtHost);
    void cc3000_startup_sequence(void)
    {
        uns8 sp_maj, sp_min;
        hci_status_t status;
        ap_entry_t result;
        unsigned long aucIP, aucSubnetMask, aucDefaultGateway, aucDNSServer;
       
        aucIP = 0;
        aucSubnetMask = 0;
        aucDNSServer = 0;
        aucDefaultGateway = 0;

        console_write_string("\nStart cc3000...\n");

        wlan_start(0);
        cc3000_general_startup(0);

        status = cc3000_nvmem_read_sp_version(&sp_maj, &sp_min);
        debug_var("\nstatus=", status);
       
        console_write_string("\nSet scan params...");
        cc3000_wlan_set_scan_params(60, 0x1fff);
        console_write_string("done!\n");

        status = cc3000_wlan_get_scan_result(&result);
        console_write_string("\nEntry count: ");
        debug_int(result.entry_count);
        console_write_string("\nScan Status = ");

        switch (result.scan_status)
        {
            case 0: console_write_string("Aged results"); break;
            case 1: console_write_string("Results valid"); break;
            case 2: console_write_string("No result"); break;
        }
        console_write_string("\nThis entry valid: ");
        if (result.entry_valid) {
            console_write_string("Yes");
        } else
        {
            console_write_string("No");
        }
        console_write_string("\nRSSI: ");
        debug_int(result.rssi);
        console_write_string("\nSecurity: ");
        switch (result.security)
        {
            case 0: console_write_string("Open"); break;
            case 1: console_write_string("WEP"); break;
            case 2: console_write_string("WPA"); break;
            case 3: console_write_string("WPA2"); break;
            default: break;
        }
        console_write_string("\nSSID: ");
        console_write_string(result.ssid);
        console_write_string(NL);
       
        console_write_string("Connecting to AP...\n");
        status = cc3000_wlan_connect((uns8 *)"belkin.b3e", WLAN_SEC_WPA2, (uns8 *)"12345678");
        //status = cc3000_wlan_connect((uns8 *)"MTILGuest", WLAN_SEC_WPA2, (uns8 *)"trad7cRufR");
        debug_var("\nstatus=", status);
       
        netapp_dhcp(&aucIP, &aucSubnetMask, &aucDefaultGateway, &aucDNSServer);
       
    #if 0   
        while (1)
        {
            status = cc3000_hci_wait_for(0);
            debug_var("\nstatus=", status);
        }
    #endif   
       
    }

    void cc3000_Wlan_Callback(long event_type, char * data, unsigned char length)
    {
        Console_Printf("Wlan Call back...%x\n", event_type );
        switch (event_type)
        {
            case HCI_EVNT_WLAN_UNSOL_DHCP:
                cc3000_dhcp_complete = 1;
                debug_str("***DHCP\nIP: ");   

                debug_int(wlan_rx_buffer[8]);
                debug_putc('.');
                debug_int(wlan_rx_buffer[7]);
                debug_putc('.');
                debug_int(wlan_rx_buffer[6]);
                debug_putc('.');
                debug_int(wlan_rx_buffer[5]);
                debug_str("GW: ");

                debug_int(wlan_rx_buffer[16]);
                debug_putc('.');
                debug_int(wlan_rx_buffer[15]);
                debug_putc('.');
                debug_int(wlan_rx_buffer[14]);
                debug_putc('.');
                debug_int(wlan_rx_buffer[13]);
                debug_nl();
                break;
            default:
                break;
        }
    }

    Here is the terminal output. As you can see, you never see the 1003 code from the CC3000.

    CS DISable
    !!!Waiting for 0x1005
    CS ENable

    SPI_READ: 5 bytes
    0x4 0x0 0x82 0x1 0x0
    CS DISable
    Wlan Call back...8200

    DONE RECEIVE : 0x8200
    CS ENable

    SPI_READ: 21 bytes
    0x4 0x5 0x10 0x11 0x0 0x0 0x0 0x0 0x0 0x1 0x0 0x0 0x0 0x2 0x0 0x17 0xe2 0x4 0x2 0xa8 0xc0
    CS DISable

    DONE RECEIVE : 0x1005
    Client socket = 1
    SpiWrite...
    0x1 0x0 0x27 0x0 0x0 0x2 0x81 0x10 0x21 0x0 0x1 0x0 0x0 0x0 0xc 0x0 0x0 0x0 0x11 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x57 0x65 0x6c 0x63 0x6f 0x6d 0x65 0x20 0x54 0x6f 0x20 0x43 0x43 0x33 0x30 0x30 0x30 0x0
    CS ENable
    Waiting for IRQ line to go low
    Got it

    CS DISable
    !!!Waiting for 0x0000
    CS ENable

    SPI_READ: 5 bytes
    0x4 0x0 0x82 0x1 0x0
    CS DISable
    Wlan Call back...8200

    DONE RECEIVE : 0x8200
    SpiWrite...
    0x1 0x0 0x31 0x0 0x0 0x1 0x8 0x10 0x2c 0x2 0x0 0x0 0x0 0x14 0x0 0x0 0x0 0x14 0x0 0x0 0x0 0x14 0x0 0x0 0x0 0x14 0x0 0x0 0x0 0x1 0x0 0x0 0x0 0x1a 0x9 0x0 0x20 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
    CS ENable
    Waiting for IRQ line to go low
    Got it

    CS DISable
    !!!Waiting for 0x1008
    CS ENable

    SPI_READ: 5 bytes
    0x4 0x0 0x82 0x1 0x0
    CS DISable
    Wlan Call back...8200

    DONE RECEIVE : 0x8200
    CS ENable

    SPI_READ: 5 bytes
    0x4 0x0 0x82 0x1 0x0
    CS DISable
    Wlan Call back...8200

    DONE RECEIVE : 0x8200
    CS ENable

    SPI_READ: 21 bytes
    0x4 0x8 0x10 0x11 0x0 0x1 0x0 0x0 0x0 0x2 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
    CS DISable

    DONE RECEIVE : 0x1008
    SpiWrite...
    0x1 0x0 0x11 0x0 0x0 0x1 0x4 0x10 0xc 0x1 0x0 0x0 0x0 0x80 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x14
    CS ENable
    Waiting for IRQ line to go low
    Got it

    CS DISable
    !!!Waiting for 0x1004
    CS ENable

    SPI_READ: 11 bytes
    0x4 0x0 0x41 0x7 0x0 0x1 0x0 0x1 0x1 0x1 0x0
    CS DISable

    DONE RECEIVE : 0x4100
    CS ENable

    SPI_READ: 17 bytes
    0x4 0x4 0x10 0xd 0x0 0x1 0x0 0x0 0x0 0x5 0x0 0x0 0x0 0x1 0x0 0x0 0x0
    CS DISable

    DONE RECEIVE : 0x1004
    ***Waiting for Data
    CS ENable

    SPI_READ: 35 bytes
    0x2 0x85 0x18 0x1d 0x0 0x1 0x0 0x0 0x0 0xc 0x0 0x0 0x0 0x5 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x61 0x62 0x63 0xd 0x0 0x0
    CS DISable

    DONE RECEIVE :
    Receive Data...
    0x61 0x62 0x63 0xd 0x0
    SpiWrite...
    0x1 0x0 0x1b 0x0 0x0 0x2 0x81 0x10 0x15 0x0 0x1 0x0 0x0 0x0 0xc 0x0 0x0 0x0 0x5 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x61 0x62 0x63 0xd 0x0 0x0
    CS ENable
    Waiting for IRQ line to go low
    Got it

    CS DISable
    SpiWrite...
    0x1 0x0 0x31 0x0 0x0 0x1 0x8 0x10 0x2c 0x2 0x0 0x0 0x0 0x14 0x0 0x0 0x0 0x14 0x0 0x0 0x0 0x14 0x0 0x0 0x0 0x14 0x0 0x0 0x0 0x1 0x0 0x0 0x0 0x2 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
    CS ENable
    Waiting for IRQ line to go low
    Got it

    CS DISable
    !!!Waiting for 0x1008
    CS ENable

    SPI_READ: 21 bytes
    0x4 0x8 0x10 0x11 0x0 0x1 0x0 0x0 0x0 0x2 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
    CS DISable

    DONE RECEIVE : 0x1008
    SpiWrite...
    0x1 0x0 0x11 0x0 0x0 0x1 0x4 0x10 0xc 0x1 0x0 0x0 0x0 0x80 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x14
    CS ENable
    Waiting for IRQ line to go low
    Got it

    CS DISable
    !!!Waiting for 0x1004
    CS ENable

    SPI_READ: 11 bytes
    0x4 0x0 0x41 0x7 0x0 0x1 0x0 0x1 0x1 0x1 0x0
    CS DISable

    DONE RECEIVE : 0x4100
    CS ENable

    SPI_READ: 17 bytes
    0x4 0x4 0x10 0xd 0x0 0x1 0x0 0x0 0x0 0x5 0x0 0x0 0x0 0x1 0x0 0x0 0x0
    CS DISable

    DONE RECEIVE : 0x1004
    ***Waiting for Data
    CS ENable

    SPI_READ: 35 bytes
    0x2 0x85 0x18 0x1d 0x0 0x1 0x0 0x0 0x0 0xc 0x0 0x0 0x0 0x5 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x61 0x62 0x63 0xd 0x0 0x0
    CS DISable

    DONE RECEIVE :
    Receive Data...
    0x61 0x62 0x63 0xd 0x0
    SpiWrite...
    0x1 0x0 0x1b 0x0 0x0 0x2 0x81 0x10 0x15 0x0 0x1 0x0 0x0 0x0 0xc 0x0 0x0 0x0 0x5 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x61 0x62 0x63 0xd 0x0 0x0
    CS ENable
    Waiting for IRQ line to go low
    Got it

    CS DISable
    SpiWrite...
    0x1 0x0 0x31 0x0 0x0 0x1 0x8 0x10 0x2c 0x2 0x0 0x0 0x0 0x14 0x0 0x0 0x0 0x14 0x0 0x0 0x0 0x14 0x0 0x0 0x0 0x14 0x0 0x0 0x0 0x1 0x0 0x0 0x0 0x2 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
    CS ENable
    Waiting for IRQ line to go low
    Got it

    CS DISable
    !!!Waiting for 0x1008
    CS ENable

    SPI_READ: 5 bytes
    0x4 0x0 0x82 0x1 0x0
    CS DISable
    Wlan Call back...8200

    DONE RECEIVE : 0x8200
    CS ENable

    SPI_READ: 21 bytes
    0x4 0x8 0x10 0x11 0x0 0x1 0x0 0x0 0x0 0x2 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
    CS DISable

    DONE RECEIVE : 0x1008
    SpiWrite...
    0x1 0x0 0x11 0x0 0x0 0x1 0x4 0x10 0xc 0x1 0x0 0x0 0x0 0x80 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x14
    CS ENable
    Waiting for IRQ line to go low
    Got it

    CS DISable
    !!!Waiting for 0x1004
    CS ENable

    SPI_READ: 11 bytes
    0x4 0x0 0x41 0x7 0x0 0x1 0x0 0x1 0x1 0x1 0x0
    CS DISable

    DONE RECEIVE : 0x4100
    CS ENable

    SPI_READ: 17 bytes
    0x4 0x4 0x10 0xd 0x0 0x1 0x0 0x0 0x0 0x5 0x0 0x0 0x0 0x1 0x0 0x0 0x0
    CS DISable

    DONE RECEIVE : 0x1004
    ***Waiting for Data
    CS ENable

    SPI_READ: 35 bytes
    0x2 0x85 0x18 0x1d 0x0 0x1 0x0 0x0 0x0 0xc 0x0 0x0 0x0 0x5 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x6d 0x6d 0x6d 0xd 0x0 0x0
    CS DISable

    DONE RECEIVE :
    Receive Data...
    0x6d 0x6d 0x6d 0xd 0x0
    SpiWrite...
    0x1 0x0 0x1b 0x0 0x0 0x2 0x81 0x10 0x15 0x0 0x1 0x0 0x0 0x0 0xc 0x0 0x0 0x0 0x5 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x6d 0x6d 0x6d 0xd 0x0 0x0
    CS ENable
    Waiting for IRQ line to go low
    Got it

    CS DISable
    SpiWrite...
    0x1 0x0 0x31 0x0 0x0 0x1 0x8 0x10 0x2c 0x2 0x0 0x0 0x0 0x14 0x0 0x0 0x0 0x14 0x0 0x0 0x0 0x14 0x0 0x0 0x0 0x14 0x0 0x0 0x0 0x1 0x0 0x0 0x0 0x2 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
    CS ENable
    Waiting for IRQ line to go low
    Got it

    CS DISable
    !!!Waiting for 0x1008
    CS ENable

    SPI_READ: 21 bytes
    0x4 0x8 0x10 0x11 0x0 0x1 0x0 0x0 0x0 0x2 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
    CS DISable

    DONE RECEIVE : 0x1008
    SpiWrite...
    0x1 0x0 0x11 0x0 0x0 0x1 0x4 0x10 0xc 0x1 0x0 0x0 0x0 0x80 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x14
    CS ENable
    Waiting for IRQ line to go low
    Got it

    CS DISable
    !!!Waiting for 0x1004
    CS ENable

    SPI_READ: 11 bytes
    0x4 0x0 0x41 0x7 0x0 0x1 0x0 0x1 0x1 0x1 0x0
    CS DISable

    DONE RECEIVE : 0x4100
    CS ENable

    SPI_READ: 17 bytes
    0x4 0x4 0x10 0xd 0x0 0x1 0x0 0x0 0x0 0x5 0x0 0x0 0x0 0x1 0x0 0x0 0x0
    CS DISable

    DONE RECEIVE : 0x1004
    ***Waiting for Data
    CS ENable

    SPI_READ: 35 bytes
    0x2 0x85 0x18 0x1d 0x0 0x1 0x0 0x0 0x0 0xc 0x0 0x0 0x0 0x5 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x6d 0x6d 0x6d 0xd 0x0 0x0
    CS DISable

    DONE RECEIVE :
    Receive Data...
    0x6d 0x6d 0x6d 0xd 0x0
    SpiWrite...
    0x1 0x0 0x1b 0x0 0x0 0x2 0x81 0x10 0x15 0x0 0x1 0x0 0x0 0x0 0xc 0x0 0x0 0x0 0x5 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x6d 0x6d 0x6d 0xd 0x0 0x0
    CS ENable
    Waiting for IRQ line to go low
    Got it

    CS DISable
    SpiWrite...
    0x1 0x0 0x31 0x0 0x0 0x1 0x8 0x10 0x2c 0x2 0x0 0x0 0x0 0x14 0x0 0x0 0x0 0x14 0x0 0x0 0x0 0x14 0x0 0x0 0x0 0x14 0x0 0x0 0x0 0x1 0x0 0x0 0x0 0x2 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
    CS ENable
    Waiting for IRQ line to go low
    Got it

    CS DISable
    !!!Waiting for 0x1008
    CS ENable

    SPI_READ: 5 bytes
    0x4 0x0 0x82 0x1 0x0
    CS DISable
    Wlan Call back...8200

    DONE RECEIVE : 0x8200
    CS ENable

    SPI_READ: 5 bytes
    0x4 0x0 0x88 0x1 0x0
    CS DISable
    Wlan Call back...8800

    DONE RECEIVE : 0x8800
    CS ENable

    SPI_READ: 5 bytes
    0x4 0x0 0x82 0x1 0x0
    CS DISable
    Wlan Call back...8200

    DONE RECEIVE : 0x8200
    CS ENable

    SPI_READ: 5 bytes
    0x4 0x0 0x82 0x1 0x0
    CS DISable
    Wlan Call back...8200

    DONE RECEIVE : 0x8200
    CS ENable

    SPI_READ: 5 bytes
    0x4 0x0 0x82 0x1 0x0
    CS DISable
    Wlan Call back...8200

    DONE RECEIVE : 0x8200
    CS ENable

    SPI_READ: 5 bytes
    0x4 0x0 0x82 0x1 0x0
    CS DISable
    Wlan Call back...8200

    DONE RECEIVE : 0x8200
    CS ENable

    SPI_READ: 5 bytes
    0x4 0x0 0x82 0x1 0x0
    CS DISable
    Wlan Call back...8200

    DONE RECEIVE : 0x8200

  • I have the same problem the HCI_EVNT_SEND message never seems to appear after TCP socket SEND. The only CC3000 response is HCI_EVNT_DATA_UNSOL_FREE_BUFF.  For course in blocking mode the firmware hangs waiting for HCI_EVNT_SEND. Did you solve this with timeouts?

  • Hello, I'm having the same problem. I'm connecting to an HTTP server and calling send() to send some data to the remote server. The data is definitely sent (I'm watching it with Wireshark) but I never get an HCI_EVNT_SEND response. 

    Can anyone at TI give us some workaround. Is it save not waiting for the HCI_EVNT_SEND response from the CC3000 chip?

    Thanks.