zoukankan      html  css  js  c++  java
  • WIFI扫描

    https://www.netspotapp.com/cn/what-is-rssi-level.html

    RSSI测试代表设备接收信号的相对品质。RSSI表明了天线和电缆等级上在发生任何可能的丢失之后所收到的信号的强度等级。RSSI值越高,信号越强。当以负数测试时,接近于0的读数意味着更强的信号。例如,-50是非常好的信号,-75是相对合理的,-100是完全没有信号。

    即使RSSI和dBm是测试的不同单元,但是它们指示的都是信号强度。dBm是测量强度的功率系数,推荐值是1mW。而dBm是纯粹指标,RSSI是相对指标。

    欲获得良好的信号测试,将噪音从信号功率中减去。信号和噪音更大的不同意味着更好的信号强度。

    一般情况下,应该都是信号优先,也就是哪个路由信号更强,你的手机就会先连哪个。

    还有一种情况是5G信号优先。也就是一个路由同时开启2.4G和5G时,路由优先连上5G,具体要视路由器的系统策略。(这种情况不是伪造WiFi范畴,但可以被利用)

    用两款路由搭设同名WiFi环境,并在手机上打开“WiFi分析仪”app监测它们的信号强度,得到的结果也是信号优先。

    /*
        This sketch demonstrates how to scan WiFi networks.
        The API is almost the same as with the WiFi Shield library,
        the most obvious difference being the different file you need to include:
    */
    #include "ESP8266WiFi.h"
    
    void setup() {
      Serial.begin(115200);
    
      // Set WiFi to station mode and disconnect from an AP if it was previously connected
      WiFi.mode(WIFI_STA);
      WiFi.disconnect();
      delay(100);
    
      Serial.println("Setup done");
    }
    
    void loop() {
      Serial.println("scan start");
    
      // WiFi.scanNetworks will return the number of networks found
      int n = WiFi.scanNetworks();
      Serial.println("scan done");
      if (n == 0) {
        Serial.println("no networks found");
      } else {
        Serial.print(n);
        Serial.println(" networks found");
        for (int i = 0; i < n; ++i) {
          // Print SSID and RSSI for each network found
          Serial.print(i + 1);
          Serial.print(": ");
          Serial.print(WiFi.SSID(i));
          Serial.print(" (");
          Serial.print(WiFi.RSSI(i));
          Serial.print(")");
          Serial.println((WiFi.encryptionType(i) == ENC_TYPE_NONE) ? " " : "*");
          delay(10);
        }
      }
      Serial.println("");
    
      // Wait a bit before scanning again
      delay(5000);
    }
    

      

  • 相关阅读:
    5.14事务
    5.13Mysql数据库Database
    未来打算
    浅谈P NP NPC
    1222
    1219
    Linux初等命令
    惩罚因子(penalty term)与损失函数(loss function)
    12 14
    java 泛型思考
  • 原文地址:https://www.cnblogs.com/kekeoutlook/p/10703857.html
Copyright © 2011-2022 走看看