ESP8266 wifi telemetry

../_images/esp8266-telemetry.jpg

The ESP8266 wifi module is an inexpensive programmable wifi modules available from many sources. It also comes included with most Pixracers.

Where to Buy

The adafruit HUZZAH ESP8266 breakout board is recommended because it can be connected to a flight controller without the need for 3.3V regulator or level shifters.

Connecting to a flight controller

../_images/esp8266-telemetry-pixhawk.jpg

If connected to Serial1/Telem1 these parameters should be set on the flight controller (if using another telemetry port, replace the “1” in the parameter name with the telemetry port’s number):

If you have problems connecting, it may help to set BRD_SER1_RTSCTS = 0 to disable flow control although this is not normally necessary

Connecting from a Ground Station

  • load the MAVESP8266 firmware to the device if you haven’t already (see below)
  • on your PC, open the wifi network connections screen and select the wifi access point (SSID “ArduPilot” or “PixRacer” with a lower case password “ardupilot” or “pixracer” respectively)
  • on the ground station, set the connection type to UDP and press “Connect”

If all is well the ground station will connect, download parameters and the HUD should move as the vehicle is moved.

Flashing the device with the MAVESP8266 firmware

We recommend flashing the ArduPilot specific version of MAVESP8266 (binaries, source code) over the original MAVESP8266 because it includes two additional features:

  • mavlink2 support
  • subsequent firmware uploads can be done over wifi
  • simple configuration web interface

An FTDI Cable like this one from SparkFun is required for at least the first time the firmware is upload to the device.

If you are using the Adafruit HUZZAH ESP8266 board and are flashing from a Windows PC then you should:

  • solder a 6pin header to the narrow end of the board that has the TX, RX, VCC and GND pins

  • connect the device to your computer using the FTDI cable

  • put the device into bootloader mode by pressing both the Reset and GPIO0 buttons, then release the Reset button followed by the GPIO0 button. the red LED should remain dimly lit.

  • download the ArduPilot specific version of MAVESP8266 from this directory

  • Windows users should download and run the NodeMCU flasher (64bit or 32bit)

    • on the Advanced page ensure the Flash size is set to 4MByte

    • on the Config page push the gear and select the firmware downloaded above

    • on the Operation page select the “COM Port” and push the “Flash” button. If successful the blue bar will slowly stretch from left to right and the icon on the bottom left will turn green.

      ../_images/esp8266-telemetry-flash.jpg
  • Mac and Linux users should use the esptool

Changing the Wifi SSID and Password

  • connect from your PC to the wifi access point (initial access point ID is “ArduPilot”, and password is “ardupilot”)

  • open a browser to 192.168.4.1 and a simple web interface will appear like below

  • click on the “Setup” link

  • set the “AP SSID” and “AP Password” fields (both must between 8 and 16 characters), push the “Save” button and reboot the device

    ../_images/esp8266-telemetry-web-setup.png

Thanks to Ray’s blog which was the source for some of this page’s advice.