Hi.
When read rssi value long time need in connection status.
1. Test AP : CISCO "WPA-150"
2. AP connection authentication : PEAP
3. Symptom : read time is random, max 2 minute used..
This is code..
static int _get_ap_rssi(int *rssi) {
~~~~~~~~~~~ SKIP~~~~~~~~~~~~~~~~~~~~~~~
SockID = sl_Socket(SL_AF_RF, SL_SOCK_RX_MTR, 0);
SlRxMetricsEnableDisableRXOnBSS_t flag;
flag.enableDisable = 1;
//set option to receive frames of other devices in the BSS
sl_SetSockOpt(SockID, SL_SOL_PHY_OPT, SL_SO_PHY_RX_BSSID_DATA_FRAMES, &flag, sizeof(flag));
uint8_t buffer[256];
size_t actualLength = sizeof(buffer);
memset(buffer, 0x00, sizeof(buffer));
actualLength = sl_Recv(SockID, buffer, actualLength, 0); // <= reponse time is randon..
uint8_t *bufferOffset = buffer;
while(bufferOffset < buffer + actualLength) {
SlRxMetrics_TLV_t *tlv = (SlRxMetrics_TLV_t *)bufferOffset;
SlTransceiverRxOverHead_t *header = (SlTransceiverRxOverHead_t *)(buffer + sizeof(SlRxMetrics_TLV_t));
if(rssi) {
rssi[0] = header->Rssi;
}
bufferOffset += sizeof(tlv->type) + tlv->length;
}
sl_Close(SockID);
return 0;
}
We want item is next...
1. Why does it take so long to read data?
2. Is there any other way to read RSSI value?