0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

wifiの研究 その2

Last updated at Posted at 2018-07-16

#概要
wifiを理解したかった。
wemosで、wifi scanしてみた。

#結果
11aが、見つからない。

16 networks found
1: aterm-34e11b-g (-73)*
2: B0C7456B8141 (-80)*
3: B0C7456B8141-1 (-77)*
4: aterm-34e11b-gw (-73)*
5: 000A79A44485 (-79)*
6: keyenceautoid (-80)*
7: aterm-24820d-g (-88)*
8: Buffalo-G-A6F4 (-75)*
9: aterm-4c4c3c-g (-64)*
10: 001D738791F4 (-68)*
11: aterm-be5422-g (-84)*
12: DIRECT-D3EA284F (-87)*
13: 001D736531AA_G (-56)*
14: Buffalo_11n/g/b (-81)*
15: Buffalo-G-E128 (-75)*
16: 0024A50BC93C (-75)*

#サンプルコード

#include "ESP8266WiFi.h"

void setup() 
{
	Serial.begin(115200);
	WiFi.mode(WIFI_STA);
	WiFi.disconnect();
	delay(100);
	Serial.println("Setup done");
}
void loop() 
{
	Serial.println("scan start");
	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)
		{
			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("");
	delay(5000);
}




以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?