Download the current version (MAVLink V2) from here: Firmware version 1.2.2
Download the legacy version (MAVLink V1) from here: Firmware version 1.1.1
This was developed using a NodeMCU v2 Dev Kit as it conveniently provides a secondary UART for debugging. It has been tested with the ESP-01 shipped with the PixRacer and it is stable at 921600 baud.
The build enviroment is based on PlatformIO. Follow the instructions found here: http://platformio.org/#!/get-started (only tested on Mac OS) for installing it but skip the platform init
step as this has already been done, modified and it is included in this repository. In summary:
brew install platformio
git clone --recursive https://github.com/dogmaphobic/mavesp8266.git
cd mavesp8266
platformio run
When you run platformio run
for the first time, it will download the toolchains and all necessary libraries automatically.
platformio run -e espwroom32 -t upload
platformio run
- process/build all targetsplatformio run -e esp12e
- process/build just the ESP12e target (the NodeMcu v2, Adafruit HUZZAH, etc.)platformio run -e esp12e -t upload
- build and upload firmware to embedded boardplatformio run -t clean
- clean project (remove compiled files)
platformio run
- process/build all targetsplatformio run -e esp01_1m
- process/build just the ESP01 target with 1MB Amazonplatformio run -e esp01_1m -t upload
- build and upload firmware to embedded boardplatformio run -t clean
- clean project (remove compiled files)
The resulting image(s) can be found in the directory .pioenvs
created during the build process.
The git clone --recursive
above not only cloned the MavESP8266 repository but it also installed the dependent MavLink sub-module. To upated the module (when needed), use the command:
git submodule update --init
User level (as well as wiring) instructions can be found here for px4 and here for ArduPilot
- Resetting to Defaults: In case you change the parameters and get locked out of the module, all the parameters can be reset by bringing the GPIO02 pin low (Connect GPIO02 pin to GND pin).
Get the ESP-01 adapter board here on Amazon; commonly called an "ESP01 programmer", this one has a little rocker switch on the side (UART side for serial TTL debugging by AT commands, PROG for firmware programming) and a yellow pin header which allows you plugin the ESP01 module without any wires. It defaults to 115200 and enumerates under Ubuntu as a ch341-uart converter.
The MavESP8266 handles its own set of parameters and commands. Look at the PARAMETERS page for more information.
There are some preliminary URLs that can be used for checking the WiFi Bridge status as well as updating firmware and changing parameters. You can find it here.
- Investigate https://github.com/DroneBridge/ESP32
- Connect to local wifi network
- Works on ESP32-C3 and ESP32-S3 (bonus)
- Reliable on QGC setup
- Smooth, reliable, responsive and no lag (even during flights)
- If everything above checks out, then ignore the things below. If any of them doesn't checkout go below
- Investigate mavlink messages into QGC
- KakutehH7 takes a long time to boot and send mavlink messages into QGC to indicate its ready.
- Investigate any flag messages before the ready flag is sent to QGC (if any)
- If there is any flag messages that is sent before the ready flag is sent, show them in the /getstatus page
- Refactor keywords to ESP32 instead of ESP8266
- Function names and variables
- If there is any legacy ESP8266 specific variables / functions remove them
- The code architecture is abit too convulated, esp8266 class, esp8266 component & vehicle (?) Might need 2 refactor them
- Decouple USB UART debugging and Mav link UART
- Print out CPU load in get status page
- On the /getstatus page there is
RAM Left
indicator, if possible indicate %CPU usage - %CPU usage will only be possible if is some sort of task scheduler inside the code.
- If there is no task scheduler, %CPU usage will always be 100% (not sleeping or waiting)
- At first glance in the code, there doesn't seem to be any task scheduling activities.
- However the WIFI/HTTPD stack might be using them