Coder Social home page Coder Social logo

esptellocli's Introduction

ESPTelloCLI -- Experiments with Tello drone and ESP32/ESP8266

The Tello SDK is based on UDP packets so an ESP32/ESP8266 board with WiFi can easily communicate with the Tello. The Tello only works as an Access Point (AP) so one ESP board is required for each Tello. This project is designed to work with the original Tello so it does not depend on the newer features of the Tello EDU or the RMTT. No testing has been done with the Tello EDU and RMTT due to lack of access to the newer drones. This program may work with newer drones and/or newer versions of the SDK because it acts as a bi-directional pass through.

PC (Win,Mac,Linux) <-USB Serial-> ESP board <-WiFi-> Tello

The ESP board is a bridge between the PC and the Tello drone. It communicates with the Tello using Tello SDK UDP packets. It communicates with the PC over USB serial. For example, if the PC sends "battery?" out the USB serial port, the ESP board forwards "battery?" using a UDP packet to the Tello. When the Tello responds, the ESP board extracts the response then sends it to the PC over USB serial. The program running on the ESP board is named ESPTelloCLI because it presents a bi-directional Command Line Interface (CLI) via USB serial port. For the PC programmer, juggling multiple serial ports is easier than juggling multiple USB WiFi interfaces. ESP boards are cheaper and widely available compared to other boards with WiFi and USB serial.

One ESP board running ESPTelloCLI is required for each Tello. Each ESPTelloCLI board appears as a USB serial COM port.

From a terminal program or from the Arduino Serial monitor send commands to connect to Tello like this. SSID and PSK are case-sensitive so be careful.

 connect TELLO-xxxxxx

or

connect TELLO-xxxxxx yyyyyyyy

Check for the Tello connection status by sending connect?

 connect?

connect? returns ok if connected and error if not.

At this point, commands sent to ESPTelloCLI are passed on to the Tello via the Tello command UDP port. The SDK response is returned without modification.

After connecting to Tello enable SDK mode send command

 command

At this point any SDK command may be sent such as battery?, takeoff, land, etc.

These are the additional commands implemented by ESPTelloCLI.

  connect SSID PASSWORD
  connect?
  telemetryon
  telemetryoff

telemetryon turns on output from the Tello SDK State UDP port. The data is formatted in exactly the same way as specified in the SDK document. telemetryoff turns this feature off.

If Tello Telemetry is on, set the Arduino Serial port to the highest possible baud rate. The maximum baud depends on the USB serial chip and the OS driver for the chip.

If using ESP32-S2 or ESP32-S3, use the hardware USB port because it much faster than any UART port. The baud rate is ignored when using the USB hardware port. Regular ESP32 and ESP8266 do not have hardware USB.

There is no support for forwarding video data from the Tello. This might be too much work for an ESP32. The new ESP32-S3 may work but it has not yet been tried.

Installation

Arduino IDE

Arduino Libraries

References

esptellocli's People

Contributors

touchgadget avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

gargravish mz0in

esptellocli's Issues

tello.py program won't connect to Tello

I can operate ESPTelloCLI via the Arduino Serial Monitor.

I close the Serial monitor and then try the tello program. I get this:

connect TELLO-AA6D73

0
b'r\x82\x12nnnl|\x0cl\x90r\x92\x02\x82\x12nnn\xec\x9e\xe0\x8e\x02l\x9enn\xe0|\x82\x82n\xe3\x10\xe2b\x0elr\x92\x92nn|\xe2\x02\x0c\x9c\xf2r\x02\x02l\x82\x02\x0c\x0c\x82\x0c\x0c\x0c\x8c\xe2\xe2\x02\x8c\x0cl\x0c\xe4\x0c\x8e\x1c\x80\xec\x0c\x0c\x8c\x9cl\x0c\x9c\x0c\x8c\x0c\x0c\x8c\x0c\x0c\x0c\x8cl\xec\x8c\x8e\x0el\x0e\xf2n|\x12\x02\x0cl\x0c\x8c\x92\xf2\x12n|\x90\x92b\x02\x0c\x9c\xf2r\x02bl`\x02\x80r\x02\x0c\x0c\x0c\x0c\x0c\x8c\x0c\x0c\x0c\x82\x0c\x0c\x0c\x8c\xe2\xe2\xe2\x0c\x0c\x04\x92l\x00\x0c\x0c\x0c\x0c\x0c\x8c\x0c\x0c\x0c\x02\x0c\x0c\x8c\x8e\x8cr\x0c\x0c\x0cl\x02\x0c\x0c\x0c\x0c\x0c\x0c\x8c\x0c\x0c\x0c\x02\x0c\x0c\x0cl\x9c\x1c\x0e\x02\x0c\x0cl\x12\x0c\x0c\x04\x0c\x0c\x0c\x8c\x0c\x0c\x0cr\x8c\x9c\x9cp\x8c\x8c\x8ep\x80\x0c\x0cl`\x02\x02b\x0c\x0c\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\x04\x0c\x0c\x82\x0c\x0c\x0c\x9c\x1c\x8cl\xe2\x8c\x0c\x0cr\x8c\x9c\x9cp\x8c\xec\x8e\x0c\x0c\x0c\x0c\x82\x0c\x0c\x0c\x9c\x8e\x9c\x1c\x92\x8c\x0c\x0cr\x8c\x9c\x9cp\x8c\x0c\x8c\x0c\x0cl`\x02rlrlrlrl\x12\x82l\x90\x8c\x9c\xecp\x92\x02\xec\x12l\x80\x8cl\x8e\x8e\x1e\x00\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0cl`\x02rl\x8c\x92b\xf2nn\x9e\xec|\xf2\xe2bbb\x0elets Jun  8 2016 00:22:57\r\n\r\nrst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)\r\nconfigsip: 0, SPIWP:0xee\r\nclk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00\r\nmode:DIO, clock div:1\r\nload:0x3fff0030,len:1184\r\nload:0x40078000,len:12812\r\nload:0x40080400,len:3032\r\nentry 0x400805e4\r\n'
1
2

I am using a generic ESP32 Dev board. Software deployed with ESP board version 2.0.3.

Any ideas about this?

ESPTelloCLI Compile errors

Please see attached Screen shot

/Users/jjs/Documents/Arduino/libraries/ESPTelloCLI-main/examples/ESPTelloCLI/ESPTelloCLI.ino: In function 'void WiFiEvent(system_event_id_t)':
ESPTelloCLI:36:12: error: 'ARDUINO_EVENT_WIFI_STA_GOT_IP' was not declared in this scope
       case ARDUINO_EVENT_WIFI_STA_GOT_IP:
            ^
ESPTelloCLI:48:12: error: 'ARDUINO_EVENT_WIFI_STA_DISCONNECTED' was not declared in this scope
       case ARDUINO_EVENT_WIFI_STA_DISCONNECTED:
            ^
Multiple libraries were found for "WiFi.h"
 Used: /Users/jjs/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/libraries/WiFi
 Not used: /Applications/Arduino.app/Contents/Java/libraries/WiFi
exit status 1
'ARDUINO_EVENT_WIFI_STA_GOT_IP' was not declared in this scope

I have a generic ESP32-WROOM-32 Dev board. Running Arduino 1.8.19.
My ESP 32 support comes from this additional board manager URL inclusion.

https://dl.espressif.com/dl/package_esp32_index.json

Screen Shot 2022-06-14 at 7 56 00 PM

I am running on a Mac.

making the video feed work :)

Hey! i have noticed you wrote something about the video feed:
"There is no support for forwarding video data from the Tello. This might be too much work for an ESP32. The new ESP32-S3 may work but it has not yet been tried."

I though i can pick it up and make it work :)
what i have expereienced is its not a not enough processing power problem, i think theres a problem with the esp8266/32/32-s modules, that can't regfragment 802.11 packets. the video data from tello is fragmanted packets on the 802.11 layer, and only the packets that are in the end of each frame, which are not fragmanted, get picked up

so far i have tested this on 8266, 32, and 32-s

any thoughts on the subject? have you been able to receive the 1460 sized video packets?

(its not the 1460 thats the problem, i have received packets this size just fine from other esp devices, but the fact that its fragmanted)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.