Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

duplicate SSID in scanning wifi result

i'm trying to make an app that can create a list of available wifi access point. here's part of the code i used:

x = new BroadcastReceiver()
        {
            @Override
            public void onReceive(Context c, Intent intent) 
            {
                results = wifi.getScanResults();
                size = results.size();
                if (results != null) {
                    for (int i=0; i<size; i++){
                        ScanResult scanresult = wifi.getScanResults().get(i);
                        String ssid = scanresult.SSID;
                        int rssi = scanresult.level;
                        String rssiString = String.valueOf(rssi);
                        textStatus.append(ssid + "," + rssiString);
                        textStatus.append("\n");
                    }
                    unregisterReceiver(x); //stops the continuous scan
                    textState.setText("Scanning complete!");
                } else {
                    unregisterReceiver(x); 
                    textState.setText("Nothing is found. Please make sure you are under any wifi coverage");
                }
            }
        };

both textStatus and textState is a TextView. i can get this to work but sometimes the result shows duplicate SSID but with different signal level, in a single scan. there might be 3-4 same SSIDs but with different signal level.

is it really different SSIDs and what differs them? can anyone explain?

like image 540
randms26 Avatar asked Dec 11 '22 15:12

randms26


1 Answers

Are you having several router modems for the same network? For example: A company has a big wireless network with multiple router modems installed in several places so every room has Wifi. If you do that scan you will get a lot of results with the same SSIDs but with different acces points, and thus different signal level.

EDIT: According to Walt's comment you can also have multiple results despite having only one access point if your modem is dual-band.

like image 60
DuKes0mE Avatar answered Jan 22 '23 17:01

DuKes0mE