|
1 | | -# vapicon-2025-hardware-workshop |
| 1 | +# VapiCon 2025 Hardware Workshop |
2 | 2 |
|
3 | | -## Platform/Device Support |
| 3 | +[Demo Video](https://www.youtube.com/watch?v=gPuNpaL9ig8) |
4 | 4 |
|
5 | | -* [AtomS3R](https://docs.m5stack.com/en/core/AtomS3R) |
6 | | -* [Atomic Echo Base](https://docs.m5stack.com/en/atom/Atomic%20Echo%20Base) |
| 5 | +## Prerequisites |
7 | 6 |
|
8 | | -## Configuration |
9 | | -Run `idf.py menuconfig` and navigate to `VapiCon 2025 Hardware Workshop Configuration`. |
| 7 | +1. **ESP-IDF**: Install ESP-IDF v5.5.1 or later |
10 | 8 |
|
11 | | -Inside this you need to set your Wifi Name/Wifi Password and Bearer Token. |
| 9 | + ### Quick Installation Steps |
12 | 10 |
|
13 | | -## Flashing |
14 | | -`idf.py flash monitor`, this installs your code and shows you the logs on the device. Useful for debugging/understanding what is happening. |
| 11 | + #### macOS/Linux |
| 12 | + |
| 13 | + ```bash |
| 14 | + # Install prerequisites (macOS) |
| 15 | + brew install cmake ninja dfu-util |
| 16 | + |
| 17 | + # Install prerequisites (Ubuntu/Debian) |
| 18 | + # sudo apt-get install git wget flex bison gperf python3 python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 |
| 19 | + |
| 20 | + # Clone ESP-IDF repository |
| 21 | + mkdir -p ~/esp |
| 22 | + cd ~/esp |
| 23 | + git clone -b v5.5.1 --recursive https://github.com/espressif/esp-idf.git |
| 24 | + |
| 25 | + # Install ESP-IDF tools |
| 26 | + cd ~/esp/esp-idf |
| 27 | + ./install.sh esp32s3 |
| 28 | + |
| 29 | + # Set up environment (run this each time you open a new terminal) |
| 30 | + source ~/esp/esp-idf/export.sh |
| 31 | + ``` |
| 32 | + |
| 33 | + #### Windows |
| 34 | + |
| 35 | + ```powershell |
| 36 | + # Download and run the ESP-IDF installer from: |
| 37 | + # https://dl.espressif.com/dl/esp-idf/ |
| 38 | +
|
| 39 | + # Or use the ESP-IDF command prompt installed by the installer |
| 40 | + # Then run: |
| 41 | + export.bat |
| 42 | + ``` |
| 43 | + |
| 44 | + ### Verify Installation |
| 45 | + |
| 46 | + ```bash |
| 47 | + idf.py --version |
| 48 | + # Should output something like: ESP-IDF v5.5.1 |
| 49 | + ``` |
| 50 | + |
| 51 | + ### Setting up Environment (Required for each terminal session) |
| 52 | + |
| 53 | + ```bash |
| 54 | + # Add this to your ~/.zshrc to avoid running it manually: |
| 55 | + alias get_idf='. ~/esp/esp-idf/export.sh' |
| 56 | + |
| 57 | + # Open a new terminal to apply the changes |
| 58 | + |
| 59 | + # Then you can simply run: |
| 60 | + get_idf |
| 61 | + ``` |
| 62 | + |
| 63 | + **Full Documentation**: [Official ESP-IDF Installation Guide](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html) |
| 64 | + |
| 65 | +2. **Hardware**: |
| 66 | + - [AtomS3R](https://docs.m5stack.com/en/core/AtomS3R) or |
| 67 | + - [Atomic Echo Base](https://docs.m5stack.com/en/atom/Atomic%20Echo%20Base) |
| 68 | + - [Atomic Battery Base](https://shop.m5stack.com/products/atomic-battery-base-200mah?srsltid=AfmBOoqrr_zX2RVCksgfggWRR2F-8hTZ4asWs7_DuLn3MWEXH9JYPSqN) |
| 69 | + |
| 70 | +## Project Setup |
| 71 | + |
| 72 | +### 1. Clone the Repository |
| 73 | + |
| 74 | +```bash |
| 75 | +git clone --recurse-submodules https://github.com/VapiAI/vapicon-2025-hardware-workshop.git |
| 76 | +cd vapicon-2025-hardware-workshop |
| 77 | +``` |
| 78 | + |
| 79 | +### 2. Configuration |
| 80 | + |
| 81 | +Run the configuration menu to set up your WiFi credentials and Bearer Token: |
| 82 | + |
| 83 | +```bash |
| 84 | +idf.py menuconfig |
| 85 | +``` |
| 86 | + |
| 87 | +Navigate to: |
| 88 | + |
| 89 | +- `VapiCon 2025 Hardware Workshop Configuration` |
| 90 | +- Set your **WiFi Name** and **WiFi Password** |
| 91 | +- Set your **Bearer Token** to `b3db41dc-f62e-4ca8-89dc-550eab564212` and press enter |
| 92 | +- Press `S` and enter to save |
| 93 | +- Press `Q` to quit. |
| 94 | + |
| 95 | +### Config values |
| 96 | + |
| 97 | +- `BEARER_TOKEN` - `b3db41dc-f62e-4ca8-89dc-550eab564212` |
| 98 | + |
| 99 | +## Building the Project |
| 100 | + |
| 101 | +### Build the firmware |
| 102 | + |
| 103 | +```bash |
| 104 | +idf.py build |
| 105 | +``` |
| 106 | + |
| 107 | +## Flashing to Device |
| 108 | + |
| 109 | +### Flash and monitor |
| 110 | + |
| 111 | +```bash |
| 112 | +idf.py flash monitor |
| 113 | +``` |
| 114 | + |
| 115 | +This command will: |
| 116 | + |
| 117 | +1. Flash the firmware to your connected ESP32-S3 device |
| 118 | +2. Open the serial monitor to view debug output |
| 119 | + |
| 120 | +To exit the monitor, press `Ctrl+]`. |
| 121 | + |
| 122 | +## Troubleshooting |
| 123 | + |
| 124 | +### Build Errors |
| 125 | + |
| 126 | +If you encounter compiler warnings treated as errors: |
| 127 | + |
| 128 | +1. **String truncation errors**: These may appear with GCC 13+ due to stricter checks |
| 129 | + |
| 130 | +2. **Missing enum cases**: This typically happens when using a different ESP-IDF version |
| 131 | + - **Solution**: Ensure you're using ESP-IDF v5.5.1 as specified in the prerequisites |
| 132 | + - Check your current version: `idf.py --version` |
| 133 | + - If incorrect, reinstall ESP-IDF v5.5.1 following the installation steps above |
| 134 | + |
| 135 | +### Missing Dependencies |
| 136 | + |
| 137 | +If the build fails with missing `libpeer` files: |
| 138 | + |
| 139 | +- Ensure submodules are properly initialized: `git submodule update --init --recursive` |
| 140 | +- Check that `deps/libpeer/src/` directory contains source files |
| 141 | + |
| 142 | +### Device Connection |
| 143 | + |
| 144 | +If flashing fails: |
| 145 | + |
| 146 | +- Check the USB connection |
| 147 | +- Try different USB ports or cables |
| 148 | +- Ensure the correct port is detected (it should auto-detect, or specify with `-p PORT`) |
| 149 | + |
| 150 | +## Project Structure |
| 151 | + |
| 152 | +``` |
| 153 | +vapicon-2025-hardware-workshop/ |
| 154 | +├── main/ # Main application source |
| 155 | +│ ├── http.h # HTTP client for Vapi API |
| 156 | +│ ├── webrtc.h # WebRTC implementation |
| 157 | +│ ├── wifi.h # WiFi connection management |
| 158 | +│ └── m5-atom-s3.h # Hardware abstraction |
| 159 | +├── deps/ |
| 160 | +│ └── libpeer/ # WebRTC library (git submodule) |
| 161 | +├── components/ |
| 162 | +│ └── peer/ # Peer connection component |
| 163 | +├── sdkconfig.defaults # Default configuration values |
| 164 | +└── partitions.csv # Flash partition table |
| 165 | +``` |
| 166 | + |
| 167 | +## Additional Resources |
| 168 | + |
| 169 | +- [ESP-IDF Documentation](https://docs.espressif.com/projects/esp-idf/en/latest/) |
| 170 | +- [M5Stack AtomS3R Documentation](https://docs.m5stack.com/en/core/AtomS3R) |
| 171 | +- [Vapi Documentation](https://docs.vapi.ai/) |
0 commit comments