Using Serial port to interact with Tello TT

In the SDK 3.0 manual I read:

Open-source Controller->Tello Commands

To program the open-source controller ESP32, sending "[TELLO] (space)"+ UDP->Tello command through a serial port can achieve the same effect as UDP->Tello command description. Note that all commands that the open-source controller ESP32 receives from TELLO contain the "ETT (space)" prefix and "\r\n" (line break) suffix.

For example: Instruct the drone to take off via open-source controller ESP32. ESP32->Tello: "[TELLO] takeoff"
Tello->ESP32: "ETT ok\r\n"

Does anyone know how to make this work? I have connected to the controller with a USB connection and the arduino environment sees the serial port. I open the Arduino Serial monitor and it does connect. But the [TELLO] command does not do anything.

I presume the controller needs to also be connected to the Tello for this to happen.

Dennis has opened up a can of worms with the sensor programming course I think.

Glad you’re digging into it, Jim! I don’t have a lot of time right now, but maybe this code will be helpful. This will do a takeoff and land mission using the ESP32 based on how the SDK describes it. Keep in mind that it’s a less ideal way than using the sendTelloCtrlMessage function. This function sends the command and listens for an “ok” from Tello. The way I demonstrate below is less intelligent and does not wait for Tello to respond. That’s why I’ve included a 10s delay between takeoff and land. Leave a reply and I can get back to you later. Thanks.

#include <RMTT_Libs.h>
#include <Wire.h>

RMTT_Protocol tt_sdk;

void setup() {
  Serial.begin(115200);

  // Serial port where we communicate with Tello from ESP32
  Serial1.begin(1000000, SERIAL_8N1, 23, 18);

  // Necessary so that we can launch the mission from button press on ESP32
  tt_sdk.startUntilControl();

  // Send takeoff command to Tello from ESP 32
  Serial1.print("[TELLO] takeoff");

  // Delay 10 seconds
  delay(10000);

  // Send land command to Tello from ESP 32
  Serial1.print("[TELLO] land");
  
//  tt_sdk.sendTelloCtrlMsg("takeoff");
//  tt_sdk.sendTelloCtrlMsg("left 30");
//  tt_sdk.sendTelloCtrlMsg("right 30");
//  tt_sdk.sendTelloCtrlMsg("land");
//  tt_sdk.sendTelloCtrlMsg("takeoff");
//  tt_sdk.sendTelloCtrlMsg("up 30");
//  tt_sdk.sendTelloCtrlMsg("down 30");
//  tt_sdk.sendTelloCtrlMsg("land");
}

void loop() {

}

OK, thanks for the suggestion. I will check it out.

What I was thinking I could try was to wire up a USB to Serial converter to the ESP 32 pins exposed with the breakout board and then I could use the Arduino Serial monitor to interact with the Tello. I would start with non-flight commands since the ESP32 in the expansion would be cable connected to my computer.

I want the Serial monitor to allow me to enter [TELLO] commands if that seems possible.

What is the significance of the numbers 23 and 18 in the Serial1.begin command? Maybe I should look at the header files RMTT_Libs and Wire.h to learn this. GPIO pins 23 and 18 are NOT exposed via the breakout board but pins 27 and 26 are so naively I was going to connect the USB to Serial to those pins thinking I could then communicate over the connected cable from Serial Monitor.

If we use the tt_sdk style commands what serial port do we listen to see the OK messages, if it makes sense to ask that question.

Here is something that works to use Serial2 to enter commands to pass to the Tello via Serial1:

#include <RMTT_Libs.h>
#include <Wire.h>

RMTT_Protocol tt_sdk;

void setup() {
  Serial.begin(115200);
  Serial2.begin(115200, SERIAL_8N1, 27, 26);
  Serial1.begin(1000000, SERIAL_8N1, 23, 18);

}
void loop() {
  while (Serial2.available() == 0) {
  }
  String Command = Serial2.readStringUntil('\n');
  Serial1.print(Command);
  Serial.println(Command);
  delay(2000);
}

I wonder why we can’t see the results of the commands sent to the Tello in some serial connection. Means that sending the command [TELLO] battery? won’t report battery status.

I am using the Controller breakout board to connect Serial2. Looks like my pin connections freshly soldered are working. Of course I can’t fly the Tello this way because of the serial connection cables.

Better version with a Serial2 port. AND, I see the command responses.


#include <RMTT_Libs.h>
#include <Wire.h>

RMTT_Protocol tt_sdk;

void setup() {
  Serial.begin(115200);
  Serial2.begin(115200, SERIAL_8N1, 27, 26);
  Serial1.begin(1000000, SERIAL_8N1, 23, 18);

void loop() {
  if (Serial2.available()) {
    String Command = Serial2.readStringUntil('\n');
    Serial.println(Command); 
    Serial1.print(Command);   
  }
  if (Serial1.available()) {
    String CommandResponse = Serial1.readStringUntil('\r\n');
    Serial2.println(CommandResponse);    
  }
}

One more simplification is that you can use Serial to do the command entry. Don’t really need Serial2.
Here is what the Arduino Serial Monitor looks like:

This is great, Jim! Thanks for sharing and I’m looking forward to giving this a try over the weekend. Will report back with my findings.