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
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: