๐ WiFi & Network Troubleshooting
๐ฏ Lesson Objective
In this lesson, students will learn:
- How to identify WiFi and network-related issues
- How to troubleshoot ESP32 connection problems
- How internet speed affects robot performance
- How to ensure stable communication with Blynk
By the end of this lesson, students will be able to solve WiFi and network issues in IoT projects.
๐ Why Network Troubleshooting is Important
In IoT systems:
- Everything depends on internet connectivity
- Even perfect code and hardware will fail without network
๐ Most real-world IoT failures happen due to network issues
๐ 1. Common WiFi Problems
๐น 1. ESP32 Not Connecting to WiFi
Symptoms:
- Serial Monitor shows continuous dots
..... - No IP address assigned
Causes:
- Wrong SSID or password
- Weak WiFi signal
Solution:
- Check credentials
- Move ESP32 closer to router
๐น 2. Slow or Delayed Response
Symptoms:
- Robot reacts late
- Delay between button press and movement
Causes:
- Slow internet speed
- Network congestion
Solution:
- Use faster WiFi
- Avoid too many connected devices
๐น 3. Frequent Disconnection
Symptoms:
- Robot stops suddenly
- Blynk shows OFFLINE
Causes:
- Unstable network
- Power fluctuation
Solution:
- Use stable hotspot/router
- Ensure proper power supply
๐น 4. Blynk Device Offline
Symptoms:
- App shows device OFFLINE
- No response from robot
Causes:
- ESP32 not connected to internet
- Wrong Auth Token
Solution:
- Check WiFi connection
- Verify Auth Token
๐ง 2. Debugging WiFi Using Serial Monitor
๐น Basic WiFi Debug Code
ย
#include <WiFi.h>
void setup() {
Serial.begin(9600);
WiFi.begin(“YourWiFi”, “Password”);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(“.”);
}
Serial.println(“\nConnected!”);
Serial.print(“IP: “);
Serial.println(WiFi.localIP());
}
void loop() {
}
ย
๐ What to Check
- Is it connecting?
- Is IP address generated?
- Is connection stable?
๐ง 3. Signal Strength Concept
- Strong signal โ Fast response
- Weak signal โ Delay or disconnect
๐ ESP32 works best when:
- Near router
- No obstacles (walls, metal)
โ๏ธ 4. Best Practices for Stable Network
- Keep ESP32 within range
- Use good quality router
- Avoid crowded networks
- Restart router if needed
๐งช 5. Testing Network Stability
Activity:
- Move ESP32 away from router
- Observe delay
- Bring it closer โ compare response
โ ๏ธ 6. Common Mistakes
| Mistake | Result |
|---|---|
| Wrong WiFi password | No connection โ |
| Using weak hotspot | Delay โ |
| Ignoring signal strength | Unstable system โ |
| Not checking IP | Debugging difficult โ |
๐ 7. Real-World Scenario
๐ Example:
- Robot works at home
- Fails in classroom
Reason:
- Different network quality
๐ง Pro Troubleshooting Method
Always check in this order:
- WiFi connection
- Internet speed
- Blynk status
- ESP32 power
๐ Lesson Summary
In this lesson, students learned how to identify and fix WiFi and network-related issues. They understood how network quality affects IoT performance and how to ensure stable communication.
๐ Practice Task
- Connect ESP32 to different WiFi networks
- Compare performance
- Note delay differences