Bird
Raised Fist0
IOT Protocolsdevops~5 mins

ESP8266 and ESP32 WiFi capabilities in IOT Protocols - Cheat Sheet & Quick Revision

Choose your learning style10 modes available
Recall & Review
beginner
What WiFi standards do ESP8266 and ESP32 support?
ESP8266 supports 802.11 b/g/n (2.4 GHz). ESP32 supports 802.11 b/g/n (2.4 GHz) and also has Bluetooth capabilities.
Click to reveal answer
intermediate
How does ESP32 improve WiFi capabilities compared to ESP8266?
ESP32 offers dual-core processing, supports both WiFi and Bluetooth, has better power management, and supports more advanced WiFi features like WPA3 and multiple connections.
Click to reveal answer
beginner
What is the typical WiFi range of ESP8266 and ESP32 modules?
Both ESP8266 and ESP32 typically have a WiFi range of about 100 meters in open space, similar to common WiFi devices, but actual range depends on environment and antenna design.
Click to reveal answer
beginner
Can ESP8266 and ESP32 act as WiFi access points?
Yes, both ESP8266 and ESP32 can operate as WiFi access points, allowing other devices to connect directly to them without a router.
Click to reveal answer
intermediate
What power-saving modes related to WiFi are available on ESP32?
ESP32 supports several WiFi power-saving modes including modem sleep, light sleep, and deep sleep, which help extend battery life in IoT projects.
Click to reveal answer
Which WiFi frequency band do ESP8266 and ESP32 primarily use?
A60 GHz
B5 GHz
C900 MHz
D2.4 GHz
Which device supports Bluetooth alongside WiFi?
AESP8266
BBoth ESP8266 and ESP32
CESP32
DNeither
Can ESP8266 and ESP32 act as WiFi access points?
AYes, both can
BOnly ESP8266 can
COnly ESP32 can
DNeither can
Which ESP module supports advanced WiFi power-saving modes?
AESP32
BESP8266
CBoth equally
DNeither
What is the typical open space WiFi range for ESP8266 and ESP32?
AAbout 50 meters
BAbout 100 meters
CAbout 10 meters
DAbout 500 meters
Explain the main WiFi capabilities of ESP8266 and how they differ from ESP32.
Think about frequency bands, additional wireless tech, and power-saving.
You got /4 concepts.
    Describe how ESP32's power-saving modes help in IoT projects.
    Consider different levels of sleep and their impact on power.
    You got /4 concepts.

      Practice

      (1/5)
      1. What is the main purpose of the WiFi.begin() function on ESP8266 and ESP32 devices?
      easy
      A. To start connecting the device to a WiFi network
      B. To disconnect the device from the WiFi network
      C. To check the current WiFi connection status
      D. To get the device's IP address

      Solution

      1. Step 1: Understand the function purpose

        WiFi.begin() is used to initiate the connection process to a WiFi network by providing the network credentials.
      2. Step 2: Differentiate from other functions

        WiFi.status() checks connection status, WiFi.localIP() gets IP, and disconnecting uses WiFi.disconnect().
      3. Final Answer:

        To start connecting the device to a WiFi network -> Option A
      4. Quick Check:

        WiFi.begin() starts connection [OK]
      Hint: Remember: begin means start connection [OK]
      Common Mistakes:
      • Confusing WiFi.begin() with WiFi.status()
      • Thinking WiFi.begin() returns IP address
      • Mixing up connect and disconnect functions
      2. Which of the following is the correct way to check if the ESP32 is connected to WiFi?
      easy
      A. if (WiFi.connected()) { ... }
      B. if (WiFi.begin() == true) { ... }
      C. if (WiFi.localIP() != 0) { ... }
      D. if (WiFi.status() == WL_CONNECTED) { ... }

      Solution

      1. Step 1: Identify the correct status check method

        The function WiFi.status() returns the connection status, and WL_CONNECTED means connected.
      2. Step 2: Evaluate other options

        WiFi.connected() does not exist, WiFi.begin() starts connection but doesn't return boolean, and WiFi.localIP() returns IP object, not a number.
      3. Final Answer:

        if (WiFi.status() == WL_CONNECTED) { ... } -> Option D
      4. Quick Check:

        WiFi.status() == WL_CONNECTED checks connection [OK]
      Hint: Use WiFi.status() to check connection status [OK]
      Common Mistakes:
      • Using WiFi.begin() to check connection
      • Assuming WiFi.connected() exists
      • Comparing IP address directly to zero
      3. Given this code snippet on an ESP8266 device:
      WiFi.begin("MySSID", "MyPass");
      while (WiFi.status() != WL_CONNECTED) {
        delay(500);
      }
      Serial.println(WiFi.localIP());

      What will be printed if the device successfully connects to the WiFi?
      medium
      A. WL_CONNECTED
      B. The SSID of the WiFi network
      C. The IP address assigned to the device
      D. An error message

      Solution

      1. Step 1: Understand the code flow

        The code waits until WiFi.status() returns WL_CONNECTED, meaning connection is successful.
      2. Step 2: Identify the output of WiFi.localIP()

        This function returns the device's IP address on the network, which is printed by Serial.println().
      3. Final Answer:

        The IP address assigned to the device -> Option C
      4. Quick Check:

        WiFi.localIP() prints IP address [OK]
      Hint: WiFi.localIP() shows device IP after connection [OK]
      Common Mistakes:
      • Expecting SSID instead of IP
      • Thinking WiFi.status() prints status automatically
      • Confusing connection status with output
      4. You wrote this code to connect ESP32 to WiFi:
      WiFi.begin("HomeNetwork", "password123");
      if (WiFi.status() = WL_CONNECTED) {
        Serial.println("Connected!");
      }

      Why does this code fail to print "Connected!" even when WiFi is connected?
      medium
      A. Because Serial.println() cannot print strings
      B. Because the assignment operator '=' is used instead of '==' in the if condition
      C. Because WiFi.status() returns a string, not a constant
      D. Because WiFi.begin() must be called inside the if statement

      Solution

      1. Step 1: Identify the error in the if condition

        The code uses '=' which assigns value instead of '==' which compares values. This causes a logic error.
      2. Step 2: Understand the impact on execution

        Because of assignment, the condition does not properly check connection status, so "Connected!" is never printed.
      3. Final Answer:

        Because the assignment operator '=' is used instead of '==' in the if condition -> Option B
      4. Quick Check:

        Use '==' to compare in if conditions [OK]
      Hint: Use '==' for comparison, not '=' [OK]
      Common Mistakes:
      • Using '=' instead of '==' in conditions
      • Calling WiFi.begin() inside if statement
      • Misunderstanding Serial.println() capabilities
      5. You want your ESP32 to connect to WiFi and print its IP address only after a successful connection, but also retry connection up to 5 times with 1 second delay each. Which code snippet correctly implements this?
      hard
      A. int retries = 0; WiFi.begin("SSID", "pass"); while (WiFi.status() != WL_CONNECTED && retries < 5) { delay(1000); retries++; } if (WiFi.status() == WL_CONNECTED) { Serial.println(WiFi.localIP()); }
      B. WiFi.begin("SSID", "pass"); for (int i = 0; i < 5; i++) { if (WiFi.status() == WL_CONNECTED) { Serial.println(WiFi.localIP()); break; } delay(1000); }
      C. WiFi.begin("SSID", "pass"); while (WiFi.status() != WL_CONNECTED) { delay(1000); } Serial.println(WiFi.localIP());
      D. WiFi.begin("SSID", "pass"); int retries = 0; while (retries < 5) { if (WiFi.status() == WL_CONNECTED) { Serial.println(WiFi.localIP()); break; } retries++; delay(1000); }

      Solution

      1. Step 1: Analyze retry logic with condition and counter

        int retries = 0; WiFi.begin("SSID", "pass"); while (WiFi.status() != WL_CONNECTED && retries < 5) { delay(1000); retries++; } if (WiFi.status() == WL_CONNECTED) { Serial.println(WiFi.localIP()); } uses a while loop that checks connection status and retries count, delaying 1 second each time, stopping after 5 tries or success.
      2. Step 2: Confirm printing IP only after successful connection

        int retries = 0; WiFi.begin("SSID", "pass"); while (WiFi.status() != WL_CONNECTED && retries < 5) { delay(1000); retries++; } if (WiFi.status() == WL_CONNECTED) { Serial.println(WiFi.localIP()); } prints IP only if WiFi.status() == WL_CONNECTED after retry loop, meeting requirements.
      3. Final Answer:

        Option A correctly implements retry with delay and prints IP after connection -> Option A
      4. Quick Check:

        Retry loop with condition and counter works best [OK]
      Hint: Use while loop with counter for retries [OK]
      Common Mistakes:
      • Not limiting retries causing infinite loops
      • Printing IP before confirming connection
      • Using for loop without checking connection inside
      Recommended

      Ready to prove it?

      Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

      10 questions~5 mineasy hard