请问如何获取 station的RSSI呢?
有关RSSI只找到一个相关函数如下:
sl_WlanGetNetworkList(0,10,&netEntries[0]);
——– netEntries[i].rssi
注释是说,station扫网过程中扫描的所有的AP的RSSI,这个RSSI是怎么得到的呢?只计算收到AP ACK包的RSSI?
gaoyang9992006:
在调用sl_WlanGetNetworkList前,要先scan下,
// enable scanpolicyOpt = SL_SCAN_POLICY(1);
// set scan policy – this starts the scanlRetVal = sl_WlanPolicySet(SL_POLICY_SCAN , policyOpt,(unsigned char *)(IntervalVal), sizeof(IntervalVal));ASSERT_ON_ERROR(lRetVal);
参考:
http://www.deyisupport.com/question_answer/wireless_connectivity/wifi/f/105/t/78023.aspx
Terry Han:
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; }