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在Transceiver_Mode下获取rssi值

Other Parts Discussed in Thread: CC3200

请问CC3200在Transceiver_Mode下如何获取AP点的RSSI值以及mac的值呢?

在获取rssi值时,我用了wlan.h文件里面的例子

Sl_WlanNetworkEntry_t netEntries[10];
_i16 resultsCount = sl_WlanGetNetworkList(0,10,&netEntries[0]);
for(i=0; i< resultsCount; i++)
{
      printf("%s\n",netEntries[i].rssi);
}

但是运行到_i16 resultsCount = sl_WlanGetNetworkList(0,10,&netEntries[0]);这一行的时候就不动了。。

请问该怎么解决呢

  • 在调用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);


  • transeiver模式下是不能直接去拿扫描结果了,是通过RAW socket去直接把MAC层的包拿出来分析得到RSSI的结果的。

    请参考:

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