Why does iwlist scan return cached results almost every time?

I have a prefix with the Linux 2.6.32 kernel (I can’t update, please do not offer this). I am using the Realtek 8192CU driver configured to use the WEXT driver. What can cause iwlist scan to constantly return cached results? It seems that when the STB loads and performs its first scan, it gets an accurate list and connects perfectly to the access point. However, subsequent scans return the same information (even signal strengths and qualities are identical).

Rarely, a scan will return new results, but I can’t find any template for the period of time between successful scans (sometimes hours).

When a new result set is available, the message "Event completed by polling (xx)" appears in dmesg.

Using wpa_cli, I run the following command and get a response.

>scan ra0 OK <3>CTRL-EVENT-SCAN-RESULTS 

However, 'wpa_cli scan_results' returns the same cached information as iwlist, and dmesg is missing the message about the absence of the event (xx)'.

Can anyone shed light on what can happen here? I would like to figure out how to reliably run a scan for new access points.

Thanks for any help in advance!

+4
source share
2 answers

Hope someone finds this helpful.

After thin copies through the 8192cu driver, it seems that it does not initiate scanning if it considers itself to be “busy” with traffic. It will simply return the results of the cached scan. In the environment where the equipment was installed, there was a lot of multicast traffic, which made it "busy" almost all the time.

To fix this, I had to edit one line in core / rtw_cmd.c. Here is the diff.

 1826c1826,1829 < if( pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > 100 || --- > // in large networks with lots of multicast traffic, > // I needed to increase the Rx threshold for bBusyTraffic > // so that AP scanning would work > if( pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > 500 || // 100 || 1831c1834 < if(pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > 100) --- > if(pmlmepriv->LinkDetectInfo.NumRxOkInPeriod > 500) // 100) 
+3
source

Get in the same problem. It was discovered that if you run the command as root, it will reset the cache every time.

+4
source

Source: https://habr.com/ru/post/1497466/


All Articles