We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sparesparrow/mcp-prompts'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
esp32-network-ap-mode-configuration.json•4.91 kB
{
"id": "esp32-network-ap-mode-configuration",
"name": "ESP32 Network AP Mode Configuration",
"description": "Configure ESP32 as WiFi access point for standalone operation with web server",
"content": "# ESP32 Access Point Mode Configuration\n\n## Problem\nSet up ESP32 as WiFi access point for standalone operation when no WiFi network is available. This enables device configuration and monitoring without requiring connection to existing network.\n\n## Solution Steps\n\n### 1. Configure AP Settings\n```cpp\n// In config.h or main.cpp\n#define AP_SSID \"ESP32-BPM-Detector\"\n#define AP_PASSWORD \"bpm12345\"\n#define AP_CHANNEL 1 // Optional: specify channel\n#define AP_MAX_CONNECTIONS 4 // Max simultaneous clients\n```\n\n### 2. Initialize WiFi AP Mode\n```cpp\n#include <WiFi.h>\n\nvoid setup() {\n Serial.begin(115200);\n \n // Start Access Point\n bool apStarted = WiFi.softAP(AP_SSID, AP_PASSWORD, AP_CHANNEL, false, AP_MAX_CONNECTIONS);\n \n if (apStarted) {\n delay(1000); // Wait for AP to stabilize\n \n IPAddress apIP = WiFi.softAPIP();\n Serial.println(\"\\n=== WiFi Access Point Started ===\");\n Serial.print(\"SSID: \"); Serial.println(AP_SSID);\n Serial.print(\"IP Address: \"); Serial.println(apIP);\n Serial.print(\"Password: \"); Serial.println(AP_PASSWORD);\n } else {\n Serial.println(\"Failed to start Access Point!\");\n }\n}\n```\n\n### 3. Verify AP is Running\n```cpp\nvoid loop() {\n // Check AP status\n int numClients = WiFi.softAPgetStationNum();\n Serial.print(\"Connected clients: \"); Serial.println(numClients);\n \n // Get AP IP\n IPAddress apIP = WiFi.softAPIP();\n Serial.print(\"AP IP: \"); Serial.println(apIP);\n \n delay(5000);\n}\n```\n\n## Gotchas & Constraints\n\n### SSID and Password Limits\n- **SSID**: Maximum 32 characters\n- **Password**: Maximum 63 characters (WPA2)\n- **Channel**: 1-13 (region dependent)\n\n### Memory Usage\n- AP mode uses approximately **40KB more RAM** than Station (STA) mode\n- Monitor with: `ESP.getFreeHeap()` - should stay > 50KB for stable operation\n\n### Channel Selection\n- Auto-selection may pick congested frequency\n- Manually specify channel if experiencing connectivity issues\n- Use WiFi analyzer to find least congested channel\n\n### Network Configuration\n- Default AP IP: **192.168.4.1**\n- Subnet: **255.255.255.0**\n- Gateway: **192.168.4.1**\n- Client IPs: **192.168.4.2 - 192.168.4.254**\n\n## Validation Checklist\n\n- [ ] Device appears in WiFi network scan with configured SSID\n- [ ] Can connect to AP from client device (phone/laptop)\n- [ ] Web server responds on `http://192.168.4.1/`\n- [ ] Serial monitor shows AP IP address\n- [ ] `WiFi.softAPgetStationNum()` returns connected client count\n- [ ] Free heap remains > 50KB during operation\n\n## Testing Commands\n\n### From Host Machine (Linux/Mac)\n```bash\n# Scan for AP\nnmcli device wifi list | grep ESP32\n\n# Ping AP\nping -c 3 192.168.4.1\n\n# Test web server\ncurl -v http://192.168.4.1/\n\n# Check network route\nip route show | grep 192.168.4\n```\n\n## Troubleshooting\n\n### AP Not Starting\n- Check SSID/password length constraints\n- Verify WiFi hardware is not disabled\n- Check for conflicting WiFi operations\n- Monitor serial output for error messages\n\n### Clients Can't Connect\n- Verify password is correct (case-sensitive)\n- Check channel congestion with WiFi analyzer\n- Ensure client device supports 2.4GHz (ESP32 doesn't support 5GHz)\n- Try reducing `AP_MAX_CONNECTIONS` if memory constrained\n\n### Web Server Not Responding\n- Verify AsyncWebServer is started: `httpServer->begin()`\n- Check port 80 is not blocked\n- Test with `curl` or browser\n- Monitor serial for HTTP request logs\n\n## Related Patterns\n\n- Use with `esp32-mcp-server-http-api-integration` for API endpoints\n- Combine with `esp32-platformio-serial-upload-debugging` for full setup\n- See `embedded-audio-fft-memory-constraints` for memory optimization\n\n## Success Metrics\n\n- **Setup Time**: < 2 minutes from code to working AP\n- **Connection Time**: < 5 seconds for client to connect\n- **Stability**: AP remains active for > 24 hours without restart\n- **Memory**: Free heap stays > 50KB during operation",
"isTemplate": false,
"tags": ["embedded", "esp32", "networking", "wifi", "ap-mode", "configuration"],
"category": "esp32",
"version": 1,
"createdAt": "2026-01-01T03:00:00.000Z",
"updatedAt": "2026-01-01T03:00:00.000Z",
"metadata": {
"context": ["embedded", "esp32", "networking", "wifi"],
"problem": "Set up ESP32 as WiFi access point for standalone operation",
"success_count": 1,
"confidence": "low",
"related_prompts": [
"esp32-mcp-server-http-api-integration",
"esp32-platformio-serial-upload-debugging",
"embedded-audio-fft-memory-constraints"
]
}
}