π 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
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