Hello Tello!
Join our DJI Tello community & remove this banner.
Sign up

Python interface

microlinux

Well-known member
Joined
Mar 5, 2018
Messages
57
Likes
23
Location
Twin Cities, MN
#1
If anyone is feeling adventurous, I don't have a Tello yet - but I've been working on a Python interface.

Python interface for the Ryze Tello drone · GitHub

UPDATE: Code is now maintained at microlinux/tello

I ran it against a stupidly simple Tello "emulator" to verify it's not insane. Beyond that it's untested early code.

UPDATE: I now have a Tello. So far, it hasn't started on fire when using the module.
 
Last edited:
Joined
Mar 11, 2018
Messages
20
Likes
16
#4
Hey microlinux, it worked fine right up until the code asked it to move:

WARNING: THIS PROGRAM HAS NOT BEEN TESTED AGAINST A REAL TELLO

In theory, your Tello is about to ...

1.) Take off
2.) Set speed to 2 MPH
3.) Move up 2 feet
4.) Move foward 4 feet
5.) Move left 4 feet
6.) Rotate clockwise 90 degrees
7.) Rotate counter-clockwise 270 degrees
8.) Move forward 4 feet
9.) Land

The Tello will begin flying after entering the IP address of this computer

IP address of this computer: 192.168.10.2

Intiating take-off
Tello response: OK

Waiting 10 seconds before continuing

Setting speed to 2 MPH
Tello response: OK

Waiting 2 seconds before continuing

Moving up 2 feet
Traceback (most recent call last):
File "tello.py", line 417, in <module>
print 'Tello response: %s' % tello.move_up(2)
File "tello.py", line 271, in move_up
return self.move('up', distance)
File "tello.py", line 187, in move
return self.send_command('%s %s' % (direction, distance))
File "tello.py", line 299, in send_command
raise RuntimeError('No response to command')
RuntimeError: No response to command
 
Joined
Mar 11, 2018
Messages
20
Likes
16
#5
This I believe is an issue with the firmware. I don't get an error using Scratch or their Python3 code but it does stop responding.
 

microlinux

Well-known member
Joined
Mar 5, 2018
Messages
57
Likes
23
Location
Twin Cities, MN
#6
This I believe is an issue with the firmware. I don't get an error using Scratch or their Python3 code but it does stop responding.
Thanks for trying it out! I will hopefully have a Tello soon to do more testing.

Did it stop responding using Scratch or the Python3 code after issuing a couple of commands, or were you able to get further with those?
 

Krag

Well-known member
Joined
Mar 22, 2018
Messages
223
Likes
163
#11
btw. has anyone looked at the firmware, DAT files, raw network protocol yet? ;)
I took a look at it from the standpoint of examining the code in the Tello app. It would seem they are using ssl certs for encoding the net traffic. That shouldn't be a problem for someone who understands encryption. But thats not me. :)
 
Joined
Mar 20, 2018
Messages
23
Likes
11
#12
Hello microlinux, Python commands are working just fine for me using your script. Nice job !
Does anyone know if there is somewhere a full list of tello commands ?
 

Oic

Member
Joined
Mar 23, 2018
Messages
9
Likes
6
#13
I got this official response from Ryze on another forum regarding access to the video feed :(

RYZE Posted at 2018-3-24 21:09
Hi,sorry that it is impossible to get access to the videos in the fly. Tello actually does't have live view feature.
 
Joined
Mar 20, 2018
Messages
23
Likes
11
#14
Well I am not a specialist but Tello is broadcasting live to the phone app so this answer from Ryze does not make a lot of sense...
 
Likes: Supersonic

Oic

Member
Joined
Mar 23, 2018
Messages
9
Likes
6
#15
That was basically my answer ... but it looks like they don’t want/plan to share access with developers
 
Likes: Hugh

microlinux

Well-known member
Joined
Mar 5, 2018
Messages
57
Likes
23
Location
Twin Cities, MN
#16
Joined
Mar 20, 2018
Messages
23
Likes
11
#17

microlinux

Well-known member
Joined
Mar 5, 2018
Messages
57
Likes
23
Location
Twin Cities, MN
#18
Thank you. I already had this doc but finally your script is a good doc in itself.
I was more looking for commands for the photo/video features of the drone... can't find this anywhere.

Thank you again.

Hugh
At the moment, only the functions in the SDK docs are available.
 

microlinux

Well-known member
Joined
Mar 5, 2018
Messages
57
Likes
23
Location
Twin Cities, MN
#19
Here is an example application I threw together that uses the tello module. It's basically a slightly fancier version of the demo script that comes with the SDK. I tested have it briefly, but not thoroughly (need more batteries!).

Tello Advanced Remote Drone Interface System (TARDIS)

[[email protected] tardis]$ ./tardis.py -h
usage: tardis.py [-h] [-m] [local_ip] [local_port]

Tello Advanced Remote Drone Interface System (TARDIS)

positional arguments:
local_ip Local IP to bind (192.168.10.2)
local_port Local port to bind (8887)

optional arguments:
-h, --help show this help message and exit
-m, --metric Use metric (meters/KPH) instead of imperial (feet/MPH)
 
Joined
Mar 20, 2018
Messages
23
Likes
11
#20
Hello,

I tried your "tardis" script but I had to tweak things a little bit. My guess is that you use python 2 on linux, and I use python 3 on windows. I had to modify the syntax (basically add some '(' and ')' in some functions and also install a windows version of the curses library.
As I am not a code expert I was pretty proud of myself when I first saw the screen appearing with the list of commands and the history fields. Unfortunately commands didn't work and did not append the history list.
My guess is that I have a syntax error (even without error messages) and something should be modified in the script to use with py3, maybe in the "response=drone.command(param)"
or in the wrapper command at the end of the script.
Again, my knowledge of python is limited and old...

I'll retry because it is fun.

Hugh
 

New Threads

Forum statistics

Threads
1,124
Messages
7,318
Members
2,381
Latest member
lloydpearsoniv