Flash Esp32
For any more information please refer to the official Drone Wifi Bridge documentation
The first section should be enough, in case of trouble you might need to recompile the binary file from scratch with help of section 2.
How to flash XIAO ESP32 C3 with esptool-js
- Download the drone_wifi_bridge.bin firmware from this git repo : git repo drone wifi bridge
There are three versions depending on your Xiao board C3, C6 or C5.
see procedure in section 2 to regenerate the bin file - Open https://espressif.github.io/esptool-js/ in a browser supporting webserial (google chrome for example, but NOT FIREFOX)
- Plug the esp32 to the computer
- Click on “Connect” and select the serial port
- In the “Flash Address” write 0x0 if it is the merged.bin file, or 0x10000 (add a 0) if it is only the code
- Click on “Choose file” and select the " drone_wifi_bridge_XIAO_ESP32C*_v2.1.0.merged.bin" file with * the number of your XIAO chip (3 / 5 / 6 ).
- Click on “Program”
- The flash is finished when “Leaving…” is displayed
- Test the system by unpluging the ESP and pluging it again
- wait at least 30s
- the wifi network “drone_wifi_bridge” should eventually display
- connect to it with password “password”
If you are on the version <2 :
13. Go to following url : 192.168.4.1/wifi and put the Wifi informations of your router and disable “Hotspot”
If you are on the version >=2 :
13. On the left, in the wifi spot, select Station instead of Acess point.
- add the SSID and password of your network and click the save button
- restart the esp and you are good to go
In case of problems you might erase the memory of the Esp32 and reflash from start
- Open https://espressif.github.io/esptool-js/ in a browser supporting webserial (google chrome for example, but NOT FIREFOX)
- Plug the esp32 to the computer
- Click on “Connect” and select the serial port
- In the “Flash Address” write 0x10000 (add a 0)
- Push the “erase the flash” button
- Disconect and reconnect the ESP32 to the computer BY PRESSING THE “B” BUTTON ON THE DEVICE
- download and install the arduino ide program
- install the librairy to be able to connect to the esp32 xiao c3 hardware, in edit->Preferences->Add URL and add following url .
- setup the port
- flash the blinck example (and not any other file, you can change LED_BUILTIN by 12 in the ino script in case that the example doesn’t compile)
- Disconect and reconnect the ESP32 to the computer
- in the navigator, click connect again
- start again from step 5. from above -> reflash the drone_wifi_bridge program
Build firmware
Compile the bin to be flashed in the esp32 (if there is a problem with section 1)
Drone Wifi Bridge firmware is an Arduino project based on the ESP32 platform. To build the firmware, you can use the Arduino IDE or the arduino-cli command line tool.
Using Arduino IDE
- Install the Arduino IDE from the official website.
- Install the ESP32 board support by following the instructions in the ESP32 Arduino core documentation.
- Clone recursively the Drone Wifi Bridge repository and open the
drone_wifi_bridge.inofile in the Arduino IDE.
git clone --recursive https://gricad-gitlab.univ-grenoble-alpes.fr/open-perform/drone_wifi_bridge.git
- Install the required libraries by going to
Sketch > Include Library > Manage Librariesand searching for the following libraries:- Preferences
- Async TCP
- ESP Async WebServer
- ArxTypeTraits
- Eigen
- ArduinoJson
- ElegantOTA
- Select the appropriate board and port from the Tools menu.
- Set the partition scheme to “Minimal SPIFFS” in the Tools menu.
- Click the Upload button to build and upload the firmware to your ESP32.
Using arduino-cli
- Install the arduino-cli tool by following the instructions in the official documentation.
- Install the ESP32 board support by running the following command:
arduino-cli core update-index --config-file .arduino-cli.yaml
arduino-cli core install esp32:esp32 --config-file .arduino-cli.yaml
- Install the required libraries by running the following command:
arduino-cli lib install "Preferences"
arduino-cli lib install "Async TCP"
arduino-cli lib install "ESP Async WebServer"
arduino-cli lib install "ArxTypeTraits"
arduino-cli lib install "Eigen"
arduino-cli lib install "ArduinoJson"
arduino-cli lib install "ElegantOTA"
- Clone recursively the Drone Wifi Bridge repository :
git clone --recursive https://gricad-gitlab.univ-grenoble-alpes.fr/open-perform/drone_wifi_bridge.git
- Compile and upload the firmware using the provided scripts (for instance for the Xiao ESP32-C3 board) :
cd drone_wifi_bridge
./compile_xiao_esp32_c3.sh
./flash_xiao_esp32_c3.sh
