• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

main/11-Mar-2024-174138

CMakeLists.txtD11-Mar-2024228 75

MakefileD11-Mar-2024175 92

README.mdD11-Mar-20243.2 KiB8966

README.md

1# Wi-Fi Scan Example
2
3(See the README.md file in the upper level 'examples' directory for more information about examples.)
4
5This example shows how to scan for available set of APs.
6
7## How to use example
8
9Before project configuration and build, be sure to set the correct chip target using `idf.py set-target <chip_name>`.
10
11### Hardware Required
12
13* A development board with ESP32/ESP32-S2/ESP32-C3 SoC (e.g., ESP32-DevKitC, ESP-WROVER-KIT, etc.).
14* A USB cable for Power supply and programming.
15
16### Configure the project
17
18Open the project configuration menu (`idf.py menuconfig`).
19
20In the `Example Configuration` menu:
21
22* Set the Example configuration.
23    * Use `Max size of scan list` to set the maximum nunber of access points in the list.
24
25### Build and Flash
26
27Build the project and flash it to the board, then run the monitor tool to view the serial output:
28
29Run `idf.py -p PORT flash monitor` to build, flash and monitor the project.
30
31(To exit the serial monitor, type ``Ctrl-]``.)
32
33See the Getting Started Guide for all the steps to configure and use the ESP-IDF to build projects.
34
35* [ESP-IDF Getting Started Guide on ESP32](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html)
36* [ESP-IDF Getting Started Guide on ESP32-S2](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/get-started/index.html)
37* [ESP-IDF Getting Started Guide on ESP32-C3](https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/get-started/index.html)
38
39## Example Output
40
41As you run the example, you will see the following log:
42
43```
44I (443) wifi:wifi firmware version: 6bff005
45I (443) wifi:wifi certification version: v7.0
46I (443) wifi:config NVS flash: enabled
47I (443) wifi:config nano formating: disabled
48I (453) wifi:Init data frame dynamic rx buffer num: 32
49I (453) wifi:Init management frame dynamic rx buffer num: 32
50I (463) wifi:Init management short buffer num: 32
51I (463) wifi:Init dynamic tx buffer num: 32
52I (473) wifi:Init static tx FG buffer num: 2
53I (473) wifi:Init static rx buffer size: 1600
54I (473) wifi:Init static rx buffer num: 10
55I (483) wifi:Init dynamic rx buffer num: 32
56I (483) wifi_init: rx ba win: 6
57I (493) wifi_init: tcpip mbox: 32
58I (493) wifi_init: udp mbox: 6
59I (493) wifi_init: tcp mbox: 6
60I (503) wifi_init: tcp tx win: 5744
61I (503) wifi_init: tcp rx win: 5744
62I (513) wifi_init: tcp mss: 1440
63I (513) wifi_init: WiFi IRAM OP enabled
64I (513) wifi_init: WiFi RX IRAM OP enabled
65I (533) phy_init: phy_version 300,6e46ba7,Jan 25 2021
66I (683) wifi:set rx active PTI: 0, rx ack PTI: 0, and default PTI: 0
67I (683) wifi:mode : sta (7c:df:a1:40:23:84)
68I (683) wifi:enable tsf
69I (2783) scan: Total APs scanned = 17
70I (2783) scan: SSID 		IoTNetwork
71I (2783) scan: RSSI 		-50
72I (2783) scan: Authmode 	WIFI_AUTH_WPA2_PSK
73I (2783) scan: Pairwise Cipher 	WIFI_CIPHER_TYPE_CCMP
74I (2793) scan: Group Cipher 	WIFI_CIPHER_TYPE_CCMP
75I (2793) scan: Channel 		5
76
77I (2883) scan: SSID 		TP-Link_6872
78I (2883) scan: RSSI 		-70
79I (2883) scan: Authmode 	WIFI_AUTH_WPA_WPA2_PSK
80I (2893) scan: Pairwise Cipher 	WIFI_CIPHER_TYPE_CCMP
81I (2893) scan: Group Cipher 	WIFI_CIPHER_TYPE_CCMP
82I (2903) scan: Channel 		11
83...
84```
85
86## Troubleshooting
87
88For any technical queries, please open an [issue](https://github.com/espressif/esp-idf/issues) on GitHub. We will get back to you soon.
89