扫描wifi结果中重复的SSID [英] duplicate SSID in scanning wifi result

查看:597
本文介绍了扫描wifi结果中重复的SSID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试制作一个可以创建可用wifi接入点列表的应用.这是我使用的部分代码:

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");
                }
            }
        };

textStatus和textState都是TextView. 我可以使它工作,但有时结果在一次扫描中显示重复的SSID,但信号电平不同.可能会有3-4个相同的SSID,但信号电平不同.

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.

SSID真的不同吗?它们有什么不同?谁能解释?

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

推荐答案

您是否有多个路由器调制解调器用于同一网络?例如:一家公司的无线网络很大,在多个地方都安装了多个路由器调制解调器,因此每个房间都有Wifi.如果执行该扫描,则将获得具有相同SSID但具有不同acces点(因此信号电平也不同)的很多结果.

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.

根据Walt的评论,如果您的调制解调器是双频的,即使只有一个接入点,您也可以得到多种结果.

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

这篇关于扫描wifi结果中重复的SSID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆