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

Tello. Whats possible?

Please try to bypass the height limit. Face tracking should happen on the app/smartphone side I think.

Thanks a lot for getting back!
Hi, trelo,

Height limit can be bypassed with TELLO_CMD_SET_HEIHT(88) command.
The setting is stored on the drone side once it is changed.
I'll update python script to set the height limit.
If you run it once, height limit will be changed.
 
  • Like
Reactions: trelo
Can you please provide a link to your code once you update it? This is great news!!!

Just to make sure I got it right, once I change the value it sticks until a FW update? After setting it to a higher value I can use the official app and fly more than 10m high?

BTW, I am without a Pc at the moment. Would pythonista running on an iPad be okay for running your script? Are there any special libraries?

Thanks a lot
 
Last edited:
Can you please provide a link to your code once you update it? This is great news!!!

Just to make sure I got it right, once I change the value it sticks until a FW update? After setting it to a higher value I can use the official app and fly more than 10m high?

BTW, I am without a Pc at the moment. Would pythonista running on an iPad be okay for running your script? Are there any special libraries?

Thanks a lot

Yes, You can use the official app after setting the height limit because it doesn't send any alt limit packet to the drone.
Update codes are here

And I don't know if the scripts are running well in pythonista, but I think you can install the libraries easily.
 
Yes, You can use the official app after setting the height limit because it doesn't send any alt limit packet to the drone.
Update codes are here

And I don't know if the scripts are running well in pythonista, but I think you can install the libraries easily.

Thank you so much. I will try that and get back to you.

BTW, is there a help file? How can I run the set height command?
 
Thank you so much. I will try that and get back to you.

BTW, is there a help file? How can I run the set height command?
The script sends 30m height limit if you run it.
You can see the original height limit and new limit in the console.
Find NEW_ALT_LIMIT in tello.py
 
The script sends 30m height limit if you run it.
You can see the original height limit and new limit in the console.
Find NEW_ALT_LIMIT in tello.py

Hey there thanks for getting back! Does the Tello and the computer running python have to be on the same wireless network! What is the exact set up!?
 
Lets talk about what is missing. There doesn't seem to be any yaw feedback from the drone. The offical sdk can do a yaw to X degrees but I don't see a way to accomplish that with cmd api. :-(
 
Yes, You can use the official app after setting the height limit because it doesn't send any alt limit packet to the drone.
Update codes are here

And I don't know if the scripts are running well in pythonista, but I think you can install the libraries easily.

Hello Bluejune.

Just a little feedback on your python scripts :
I'm running py3.6 under Win10 so I had to tweak a few things :
- Syntax : Changes in the print command and exception command
- Differences between Py2.7 and Py3.6 about the way strings are handled :
  1. I had the error : wrong object in function "fileVideo.write(data[2:size])", string was expected, and data is a Bytearray type object
  2. I tried to convert data in str using data.decode('whatevercodec') but it failed (impossible to know the good codec)
  3. Finally made it by changing the write method and allow the write command to write binary data (i.e in the command fileVideo = open('video.h264', 'wb')) (i won't tell you how long it took me to solve this problem, even if it looks obvious afterward.....)
  4. Successfully generated the .h264 file but very poor quality in ffplay and many error messages, see screenshots below
- Control commands are working just fine, for some reason the keyboard arrows don't work (up/down/left/right) but the numpad arrows work

Thank you for the great job, and please if you have any clue on how to solve my video issue, that would be greatly appreciated.

I continue my tests.

Hugh

Screenshots of my ffplay issue :
1525134050477.png
1525134220881.png
 

Attachments

  • 1525134137559.png
    1525134137559.png
    691.3 KB · Views: 15
What platform are you running the Go/Tello software on? I have a Mac running High Sierra, the latest OS for the platform. Will this run there?
The simple Go demo with just TakeOff and Land works for me on my Mac. The more complex one with a Forward and Backward command does not execute either of these. The Tello just takes off and then lands.

But the battery was less than 50% when I tried this and I have read elsewhere that programmed flight will sometimes ignore steps in the logic if the Tello's battery is not at full strength.

Also when I run the program from the command line (e.g. go run tello.go) the logic gets executed but the go program does not terminate. I have to Ctrl-C to leave the program. Is that normal? I confess to being a go language novice.
 
More info on my Mac experience with Go and the Tello.

I was able to get the video feed example to display using mplayer that I installed into Mac OS X with homebrew.

And I could get some of the other Go examples from the blog that had flight steps inside to work on a fresh battery.

And I even managed to edit the video example to have some flight steps in the work logic and the video feed that was established showed the video of the flight. It was a little choppy but in my basement lighting conditions aren't optimal.

Impressed -- thanks to all for the investigation and work.
 
Has anybody got any example code in Java for establishing a connection with the drone? Or any resources to aid in doing so?
 
Hello Bluejune.

Just a little feedback on your python scripts :
I'm running py3.6 under Win10 so I had to tweak a few things :
- Syntax : Changes in the print command and exception command
- Differences between Py2.7 and Py3.6 about the way strings are handled :
  1. I had the error : wrong object in function "fileVideo.write(data[2:size])", string was expected, and data is a Bytearray type object
  2. I tried to convert data in str using data.decode('whatevercodec') but it failed (impossible to know the good codec)
  3. Finally made it by changing the write method and allow the write command to write binary data (i.e in the command fileVideo = open('video.h264', 'wb')) (i won't tell you how long it took me to solve this problem, even if it looks obvious afterward.....)
  4. Successfully generated the .h264 file but very poor quality in ffplay and many error messages, see screenshots below
- Control commands are working just fine, for some reason the keyboard arrows don't work (up/down/left/right) but the numpad arrows work

Thank you for the great job, and please if you have any clue on how to solve my video issue, that would be greatly appreciated.

I continue my tests.

Hugh

Screenshots of my ffplay issue :
View attachment 284
View attachment 286
Hi Hugh,

I updated the codes to save the video stream after receiving SPS NAL unit.

And I think you need to turn the Bluetooth off on your PC while testing because it disturbs WiFi signal.
Check the update codes..
 
More random stuff I have figured out.
  • The Tello app for Android will run on the Nox PC emulator and successfully connect to the drone if on the same wifi network. This should make sniffing the connection traffic easier. All the phone app is doing is connecting to 192.168.10.1 no matter what network it is actually on.
  • On android at least the flight logs are much larger than I would expect. A few seconds is 100k. They don't seem to be compressed or encrypted. But I can't figure out what they contain. From looking at the code it seems to be a subset of the raw packet data sent from the drone to the phone. Each chunk of data starts with 0x55 xx. Where xx=length of chunk. Camera info maybe?
  • You can get the android debugging logs (adb logcat) and see that there is a fair amount of debug logging that might be helpful. Especially around video decoding. Some of it is in Chinese but google translate does a great job.
  • The udp video port is probably 6038 on the phone. I haven't gotten any data out of it yet tho.

I continue to be impressed by the tech on this drone. It is amazing to just watch it hover. Its using a complex ballet of atmo pressure, ir cameras and optical flow.

Hi Krag, I came to this forum based on your reply, I tried Bluestacks and Andy Nougat emulators and both failed, however, the Nox emulator works a dream, however, I am connected to my router by ethernet and the done is not being picked up by wi-fi for almost obvious reasons, do you or anyone else have any ideas how to connect whilst being hard wired? (p.s I don't want to get a wi-fi dongle as I need the speed for when live streaming)
 
Hi Krag, I came to this forum based on your reply, I tried Bluestacks and Andy Nougat emulators and both failed, however, the Nox emulator works a dream, however, I am connected to my router by ethernet and the done is not being picked up by wi-fi for almost obvious reasons, do you or anyone else have any ideas how to connect whilst being hard wired? (p.s I don't want to get a wi-fi dongle as I need the speed for when live streaming)
As far as I know the only way is via Wifi dongle.
 
Hi Hugh,

I updated the codes to save the video stream after receiving SPS NAL unit.

And I think you need to turn the Bluetooth off on your PC while testing because it disturbs WiFi signal.
Check the update codes..

Thank you BlueJune,
I tried your updated code.
Unfortunately it does not improve the quality issue. My BT was turned off. There is a lot of WiFi interference in my house, but when I use the phone app the video quality is better than that. There may be some missing/extra bytes in the binary output file. Maybe the SPS info should be resent periodicaly or we should set a coding rate like deadprogram suggested here.

I'm having a lot of fun.

Hugh
 
Just published a new blog post about hacking the Tello:

Hello, Tello - Hacking Drones With Go

Thank you to everyone on this group who has helped make it happen!
Hi deadprogram, I'm having some trouble changing the video output from mplayer to gocv so I can do image tracking.
Here is my main function, but I am not correctly converting the image data from the drone to an opencv mat. What is the correct way to do this?
Code:
func main() {

    drone := tello.NewDriver("8890")

    window := gocv.NewWindow("Hello")
    img := gocv.NewMat()

    work := func() {

        drone.On(tello.ConnectedEvent, func(data interface{}) {
            fmt.Println("Connected")
            drone.StartVideo()
            drone.SetVideoEncoderRate(4)
            gobot.Every(100*time.Millisecond, func() {
                drone.StartVideo()
            })
        })

        drone.On(tello.VideoFrameEvent, func(data interface{}) {
            pkt := data.([]byte)
            img = gocv.IMDecode(pkt, 0)
            window.IMShow(img)
            window.WaitKey(1)
        })
    }

    robot := gobot.NewRobot("tello",
        []gobot.Connection{},
        []gobot.Device{drone},
        work,
    )

    robot.Start()
}
 

Members online

No members online now.

Forum statistics

Threads
5,711
Messages
40,008
Members
17,133
Latest member
Magtinez