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

How to grab state data, flight logs, and video with java only

javapilot

New member
Joined
Nov 25, 2018
Messages
2
Reaction score
0
Hi people. A lot of great work on this forum. I bought one of these over the holiday and made the port 8889 cmd and read stuff work on java with the following code:

send code in one thread below

sentenceOut = "command";
comm=false;
byte [] dataOut = sentenceOut.getBytes();
DatagramPacket packetOut= new DatagramPacket(dataOut, dataOut.length, telloIpAddress, 8889);
telloCmdSocket.send(packetOut);

// where telloIpAddress is of type InetAddress and made from new byte[]{(byte)192,(byte)168,(byte)10,(byte)1};
// where telloCmdSocket is of type DatagramSocket and made with null constructor




receive code in another thread

byte[] dataIn= new byte[2000];
DatagramPacket packetIn = new DatagramPacket(dataIn, dataIn.length);
String sentenceIn;
while(true) {
telloCmdSocket.receive(packetIn);
sentenceIn = new String(packetIn.getData(), StandardCharsets.UTF_8);
Log.d("data from tello 0", sentenceIn);
}



The problem is, despite a lot of effort, I can't see state data, flight logs, and video with java only on the other ports and Ip addresses. So, how would you go about grabbing those three items using java only in a custom app (not using tello's app at all) with the above approach? Thanks.

Fw 01.03.33.01
 
Last edited:
Hi people. A lot of great work on this forum. I bought one of these over the holiday and made the port 8889 cmd and read stuff work on java with the following code:

send code in one thread below

sentenceOut = "command";
comm=false;
byte [] dataOut = sentenceOut.getBytes();
DatagramPacket packetOut= new DatagramPacket(dataOut, dataOut.length, telloIpAddress, 8889);
telloCmdSocket.send(packetOut);

// where telloIpAddress is of type InetAddress and made from new byte[]{(byte)192,(byte)168,(byte)10,(byte)1};
// where telloCmdSocket is of type DatagramSocket and made with null constructor




receive code in another thread

byte[] dataIn= new byte[2000];
DatagramPacket packetIn = new DatagramPacket(dataIn, dataIn.length);
String sentenceIn;
while(true) {
telloCmdSocket.receive(packetIn);
sentenceIn = new String(packetIn.getData(), StandardCharsets.UTF_8);
Log.d("data from tello 0", sentenceIn);
}



The problem is, despite a lot of effort, I can't see state data, flight logs, and video with java only on the other ports and Ip addresses. So, how would you go about grabbing those three items using java only in a custom app (not using tello's app at all) with the above approach? Thanks.

Fw 01.03.33.01

I have video and the 10hz state dAta working now. Still working on the flight logs if anyone has that.
 

New Posts

Members online

Forum statistics

Threads
5,690
Messages
39,934
Members
17,023
Latest member
Repiv

New Posts