e51f7ce5432d196f76187f81bb79c740ebf5c750
ESP32-P4-NANO Network Auditing Tool
A portable network auditing and diagnostic tool built on the ESP32-P4-NANO development board.
Hardware Setup
Pin Connections
Ethernet (IP101GRI PHY)
- MDC: GPIO 31
- MDIO: GPIO 52
- Reset: GPIO 51
- REF_CLK: GPIO 50
- TX_EN: GPIO 49
- TX0: GPIO 34
- TX1: GPIO 35
- RX0: GPIO 30
- RX1: GPIO 29
- CRS_DV: GPIO 28
Status LEDs
- Blue LED (Status): GPIO 8
- Red LED (Error): GPIO 15
SD Card (Default SPI Pins)
- MOSI: GPIO 11
- MISO: GPIO 13
- CLK: GPIO 12
- CS: GPIO 10
Quick Start
-
Setup Environment:
- Open a PowerShell terminal.
- Run the following command to set up the ESP-IDF environment:
. .\esp-idf\export.ps1
-
Insert SD Card:
- Insert a formatted microSD card with the following structure:
/sdcard ├── config/ │ ├── network_config.json │ └── mac_vendors.csv ├── logs/ ├── scripts/ └── www/ └── index.html
- Insert a formatted microSD card with the following structure:
-
Build and Flash:
- Build the project:
idf.py build - Flash the firmware:
Replace
idf.py -p (PORT) flash(PORT)with the serial port of your ESP32-P4-NANO board.
- Build the project:
-
Connect to Target Network:
- Connect the ESP32-P4-NANO to the target network via Ethernet.
-
Connect to Wi-Fi AP:
- Connect to the Wi-Fi Access Point:
- SSID: audit-tool (configurable)
- Password: esp12345 (configurable)
- Connect to the Wi-Fi Access Point:
-
Access Web Interface:
- Open a web browser and navigate to:
- URL: http://192.168.4.1
- Default login: admin/admin123
- Open a web browser and navigate to:
Configuration
All settings can be configured via sdcard/config/network_config.json:
- WiFi AP settings
- Static IP configuration
- Web server settings
Features
- Ethernet Network Scanning:
- ARP Scan
- TCP Port Scan
- ICMP Ping Sweep
- Wi-Fi AP for Control Interface:
- Uses ESP-Hosted-FG solution with the onboard ESP32-C6.
- Web Dashboard:
- Real-time status updates.
- Control and monitor scans.
- SD Card Logging:
- Logs scan results and system events.
- OTA Updates:
- Update the firmware over the air.
- Status LED Indicators:
- Visual feedback for system status.
Memory Usage
Task stack sizes:
- Ethernet core: 8KB
- WiFi core: 8KB
- LED task: 2KB
Troubleshooting
-
No Ethernet Connection:
- Check the Ethernet cable.
- Verify the PHY pin connections in
include/network_manager.h. - Check the link LED on the Ethernet port.
-
No Wi-Fi AP:
- Check the
sdcard/config/network_config.jsonfile. - Verify the ESP-Hosted-FG component is correctly configured.
- Check the
-
Web Server Issues:
- Verify the SD card is inserted and has the correct file structure.
- Check the file permissions on the SD card.
- Confirm you are connected to the correct Wi-Fi AP and using the correct IP address.
Languages
C
91.4%
C++
7.7%
CMake
0.9%