Open Modular Drone - Project

Version 1.0.1

Site de ressource pour l'assemblage et l'utilisation des drones modulaires ouverts de la plateforme CNRS Open-perform

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

  1. 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
  2. Open https://espressif.github.io/esptool-js/ in a browser supporting webserial (google chrome for example, but NOT FIREFOX)
  3. Plug the esp32 to the computer
  4. Click on “Connect” and select the serial port
  5. In the “Flash Address” write 0x0 if it is the merged.bin file, or 0x10000 (add a 0) if it is only the code
  6. 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 ).
  7. Click on “Program”
  8. The flash is finished when “Leaving…” is displayed
  9. Test the system by unpluging the ESP and pluging it again
  10. wait at least 30s
  11. the wifi network “drone_wifi_bridge” should eventually display
  12. 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.

  1. add the SSID and password of your network and click the save button
  2. 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

  1. Open https://espressif.github.io/esptool-js/ in a browser supporting webserial (google chrome for example, but NOT FIREFOX)
  2. Plug the esp32 to the computer
  3. Click on “Connect” and select the serial port
  4. In the “Flash Address” write 0x10000 (add a 0)
  5. Push the “erase the flash” button
  6. Disconect and reconnect the ESP32 to the computer BY PRESSING THE “B” BUTTON ON THE DEVICE
  7. download and install the arduino ide program
  8. install the librairy to be able to connect to the esp32 xiao c3 hardware, in edit->Preferences->Add URL and add following url .
  9. setup the port
  10. 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)
  11. Disconect and reconnect the ESP32 to the computer
  12. in the navigator, click connect again
  13. 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

  1. Install the Arduino IDE from the official website.
  2. Install the ESP32 board support by following the instructions in the ESP32 Arduino core documentation.
  3. Clone recursively the Drone Wifi Bridge repository and open the drone_wifi_bridge.ino file in the Arduino IDE.
git clone --recursive https://gricad-gitlab.univ-grenoble-alpes.fr/open-perform/drone_wifi_bridge.git
  1. Install the required libraries by going to Sketch > Include Library > Manage Libraries and searching for the following libraries:
    • Preferences
    • Async TCP
    • ESP Async WebServer
    • ArxTypeTraits
    • Eigen
    • ArduinoJson
    • ElegantOTA
  2. Select the appropriate board and port from the Tools menu.
  3. Set the partition scheme to “Minimal SPIFFS” in the Tools menu.
  4. Click the Upload button to build and upload the firmware to your ESP32.

Using arduino-cli

  1. Install the arduino-cli tool by following the instructions in the official documentation.
  2. 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
  1. 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"
  1. Clone recursively the Drone Wifi Bridge repository :
git clone --recursive https://gricad-gitlab.univ-grenoble-alpes.fr/open-perform/drone_wifi_bridge.git
  1. 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
Last updated on 6 Jan 2025
Published on 6 Jan 2025
 Edit on GitHub

Open Modular Drone © 2024 by CNRS - Open-perform is licensed under CC BY 4.0