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的两个问题



1.cc3000用tcp/ip通过ap连接到server端,40秒左右socket会自动断开连接!该如何解决?

cc3000代码如下

while ((ulCC3000DHCP == 0) || (ulCC3000Connected == 0))
    {
        __delay_cycles(1000);
    }
    long theSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
    Socket=&theSocket;

    firstTimeConnected=NotFirstTimeConnect ;
    SocketConnected=-1;
    // the family is always AF_INET
    tSocketAddr.sa_family = AF_INET;
    // the destination port
    tSocketAddr.sa_data[0] = (ClientPort)>>8;
    tSocketAddr.sa_data[1] = (unsigned char)(ClientPort);

    // the destination IP address
    tSocketAddr.sa_data[2] = ServerIPaddress[0];
    tSocketAddr.sa_data[3] = ServerIPaddress[1];
    tSocketAddr.sa_data[4] = ServerIPaddress[2];
    tSocketAddr.sa_data[5] = ServerIPaddress[3];

    while(SocketConnected==-1)
    {
        SocketConnected=connect(*Socket,&tSocketAddr,sizeof(sockaddr));
        if(SocketConnected==0)
        {
            turnLedOn(6);
        }
        else
        {
            turnLedOn(6);
            __delay_cycles(600000);
            turnLedOff(6);
            __delay_cycles(600000);
        }
    }

2.有没有办法能够获得cc3000 当前的与ap之间的信号强度?