Course: ELE529E Embedded Systems
Objective: Real-time CSI data collection and visualization using ESP32 and FreeRTOS
- Real-time CSI data collection using ESP32
- FreeRTOS-based task management
- Web-based real-time visualization
- Configurable subcarrier selection
- Data logging and export functionality
├── main/
│ ├── main.c # ESP32 firmware with FreeRTOS implementation
│ └── CMakeLists.txt
├── web_app.py # Python web application for visualization
├── CMakeLists.txt
└── README.md
- ESP32 Development Board
- USB-to-Serial Cable
- Computer for running web visualization
- Wi-Fi Access Point
- ESP-IDF v5.4
- Python 3.x with Flask
- Web Browser (Chrome recommended)
- Install ESP-IDF v5.4
- Clone this repository
- Configure your WiFi credentials in
sdkconfig
# ESP32 CSI Collection Tool Config
CONFIG_SSID="myssid"
CONFIG_PASSWORD="mypassword"
# end of ESP32 CSI Collection Tool Config
- Build and flash the firmware:
idf.py build
idf.py -p (PORT) flash
or in VS Code, Command+Shift+P > Select 'ESP-IDF: Build Project' > Flash ! DO NOT monitor as doing so will block web application's access to serial port
- Install Python dependencies:
pip install flask pyserial
- Run the web application:
python web_app.py
- Open your browser and navigate to
http://localhost:5000
The project uses FreeRTOS for efficient task management:
- WiFi Initialization Task (Priority: 5)
- CSI Processing Task (Priority: 3)
- Inter-task communication using queues
- Task synchronization using semaphores
- Connect to ESP32 through the web interface
- Start CSI data collection
- Select subcarriers to plot
- Observe real-time CSI data visualization
- Export data for analysis
- If seeing squiggly lines, clean the build, then build again till succeeds. This usually solves ESP-IDF library problems.
- If there are include errors related to cmake, disable the "cmake tools" extension on VS Code.
- If encounter any other problem: Delete the build folder completely, then rebuild
- Make sure ESP32 is connected to an access point. The ESP32 does not work in monitor mode in this project, it needs to be connected.
- ESP-IDF Documentation
- ESP32 CSI Documentation
- FreeRTOS Documentation
- How to create your First ESP IDF project
- https://github.com/espressif/esp-csi
- Getting Started with ESP32 Wireless Networking in C
Feel free to submit issues and enhancement requests!