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.

CC3200 是否能获取路由器MAC 地址、RSSI、信噪比?

Other Parts Discussed in Thread: CC3200

如标题,如果有,是怎么实现的? 结构体参数有哪些?

  • 直接调用

    lRetVal = sl_WlanGetNetworkList(ucIndex, (unsigned char)WLAN_SCAN_COUNT,
    &netEntries[ucIndex]);

    函数就可以得到扫描到的AP的RSSI值,具体可以参考scan_policy例程

  • 在调用sl_WlanGetNetworkList前,要先scan下,

    // enable scan
    policyOpt = SL_SCAN_POLICY(1);

    // set scan policy - this starts the scan
    lRetVal = sl_WlanPolicySet(SL_POLICY_SCAN , policyOpt,
    (unsigned char *)(IntervalVal), sizeof(IntervalVal));
    ASSERT_ON_ERROR(lRetVal);

    _
    参考这个

    http://processors.wiki.ti.com/index.php/CC31xx_%26_CC32xx_Transceiver_Mode 

  • CC3200读取RSSI的值方法:

    具体代码请参考如下:

    SlGetRxStatResponse_t rxStatResp;
    sl_WlanRxStatStart();       获取无线AP的信号质量
    delay(2000);
    sl_WlanRxStatStop();
    lRetVal = sl_WlanRxStatGet(&rxStatResp , 0);
    if(0 == lRetVal)
    {
     PRINT("Rssi: %d \n\r",rxStatResp.AvarageDataCtrlRssi);
     PRINT("Rssi: %d \n\r",rxStatResp.AvarageMgMntRssi);
    return rxStatResp.AvarageDataCtrlRssi;
    }