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

Emulating a RMTT Open-Source Controller with an Espressif ESP32 board

Carlosulm

New member
Joined
Jan 16, 2022
Messages
4
Reaction score
0
Hello everybody,

I started exploring the possibility to emulate a RMTT open-source controller with a Espressif ESP32 board.
RoboMaster has published on GitHub a repository called RMTT_Libs. The documentation is very basic, but basically to program the ESP32 of the RMTT you just need to install this repo on our Arduino environment (/libraries), compile one of the example Arduino sketches, flash the ESP32 of the RMTT and you are all set.
I have analyzed the source code, and there are two serial (UART) interfaces that are being configured, one as debug interface (115200 bauds) and the second one (1000000 bauds) for sending the SDK commands to Tello.
I compiled the default example scketch and flashed my ESP32 board with it. It works well, I can see the on the serial interface the traffic with the tello commands ( [TELLO] wifiversion? is continuously requested ). However when I connect the ESP32 board to Tello, nothing happens. It might be that serial-to-USB converter is not recognezed by Tello.
So I have not been successful yet to establish communication between my ESP32 board the the Tello. The SDK 3.0 document is a good source of information, but it doesn't indicates if the ESP32 of the RMTT does communicate directly with the Tello via USB-Serial interface, of if there is another controller acting as a bridge between the Tello and the ESP32 controller.

Does any body have information about that? Are there any schematic or block diagram available describing the RMTT hardware? Unfortunately I don't count with a oscilloscope of logic analyzer to capture the traffic on the USB line to decipher which type of communication is taking place.

Any information is welcome :)

Carlos
 
Hello @Carlosulm,
First questiom: Do you use Tello EDU with latest firmware? Otherwise SDK 3.0 commands for communication with RMTT expansion are not avialable.
Second question: What type of ESP32 board are you using? Does it have a serial-to-USB converter chip (like CP2102 or so) onboard or do you use a seperate converter? Your first post in the other thread indicates this.
Third question: Do you use a cable that behaves as USB OTG cable when connected to Tello's micro USB port?

As you already have seen here (No WiFi being broadcast by Tello EDU after plugging in USB OTG cable), Tello EDU with latest disables WiFi, when you connect a USB OTG compatible device BEFORE switching on Tello. If you switch on Tello first without your ESP32 connected, it will bring up it's WiFi hotspot. But it in that case it will not power up the 5V line on the USB port, so your ESP32 will not be powered up by Tello it it is connected after Tello is already switched on.
These problems are discussed here as well: Onboard Raspberry Pi
From that discussion it looks like in that case you can measure 3V (or may be 3.3V) on the line that should deliver the 5V but for me it is not clear, if this is just a "high" signal (on 3.3V level) or if it could provide enough current to power a 3.3V device.

As this behaviour started as of the 02.05.01.13 firmware, there must be some logic. My assumption is that the RMTT expansion kit has some kind of electrical signalling so that Tello recognizes it as RMTT and not just a plain ESP32.

In order to get behind that "secret", it would require more detailed analysis about the way how the RMTT connects to the Tello.

But even then there may be some kind of communication possible, when you connect the ESP32 first. The question is, what for example happens, when your ESP32 sends the "motoron" command via the serial interface to Tello? Even when Tello does not bring up it's own Wifi, it may be possible to send commands via serial and you could see the propellers spin slowly. As the ESP32 also has a 2.4 GHz WiFi, you could either bring this into AP mode or let it act as a WiFi client on your WLan. So you could add some code that receives commands via the ESP32 WiFi and translates / forwards it to Tello via serial.

Perhaps, analyzing this repo may give additional insights: I made an arduino board package to program the tellotalent`s esp32 controller in the Arduino IDE

I also ask myself which device shows the RMTT-xxxx AP when the original RMTT expansion module is connected. Does the ESP32 on the RMTT show this AP or does it still come from Tello (just with another SSID). If the WiFi AP is provided by the RMTT, there should be some code in the GitHub repo controlling that. But in that case, I ask myself, how also the video stream from the camera can be received when using RMTT. This would mean, the video stream data must be handed over somehow via the serial interface and then transmitted by the RMTT WiFi AP. Not realistic due to the low bitrate (only 1000000 baud would not be sufficient for a good video stream).

Even more strange is that you can also configure RMTT to 5 GHz WiFi and this must come from a seperate Wifi chip on the RMTT board because ESP32 does not support 5 GHz Wifi. So in that case, the video stream definitely must be first transferred over the connector cable somehow before it could be provided also on the 5 GHz WiFi...

So you see, there is still quite some magic to be analyzed in order to fully replace RMTT by your own ESP32. So although they call the RMTT an "open source" controller, there is still a huge lack of information. Also the MindPlus RMTT documentation does not really help here: RoboMaster TT - MindPlus wiki
 
Last edited:
Hello Hacky,

Thank you for all the information and tips.

To answer your questions:
- I'm using Tello EDU with latest firmware v02.05.01.17 (support for sdk 3, according to the "sdk?" command).
- I'm working with a TTGO Lora32-OLED v1.0 board equipped with a ESP32 and a USB-UART bridge CP2102 from Silicon Labs. The second USB-UART bridge is a generic HW-597 module equiped with a CH340.
- I'm using a USB OTG adapter to attach the TTGO board or the HW597 bridge to the Tello EDU.

The USB power issue I have noticed while doing my tests. But it is easy to workaround. I think I read it on Mind+ wiki, that before attaching the RMTT to the Tello, you must connect your smartphone/tablet to the Tello wifi, then open the application and after that your are ready to attach the RMTT. I have done test following the procedure described in the wiki as well as attaching before, suring or after the start of the Tello. I think I will update the thread with my observations.

I have observed that according to the specs, the 2x USB-UART bridges I'm using doesn't support 1,000,000 bauds (the CP2102 advertise this device as "up to 1,000,000 bauds", but in the specs it supports maximum 9216003). On the other hand the CH340 supports up to 2,000,000 but in the specs says it can be configured with all the standars baudrates, including 921600 and 1500000 bauds, but not 1,000,000. When I have verified the UART communication between TTGO and PC with the USB-UART bridge configured at 1,000,000 bauds, the CP2101 shows some bit errors (that convert on strange characters), but on other cases the message is decoded correctly. the CH340 show no issues, the payload is decoded correctly.

I continuously transmit the following messages with 1 second between them:

[TELLO] command
[TELLO] battery?
[TELLO] motoron

The ESP32 sends this data on Serial port 0, and any answer from the Tello should be reflected on Serial port 1. I have never received any character from the Tello.
I have tried terminating the messages with /n/r, /n and /0. But still no reaction from Tello.

I have also tried to send data to the RMTT with the Tello EDU app. As an example, send some character to the RMTT LED screen. But still no character is received on the TTGO board.

[Next Steps]
- Try using a USB-UART bridge that actually supports the 1,000,000 baudrate (in specs and in practice).
- Get a RMTT and check which bridge is used, how is the programming and operation procedure and try to deduct if there is a layer between ESP and the Tello.

The ESP32 communication with Tello via WiFi / UDP messages works without any problems. We still have the possibility to communicate with the ESP32 via BLE to send or receive commands or information.

Let's see if we can come further with the emulation of the RMTT. Unfortunately it is not as Open-Source as advertised, at least in HW.

Thank you again for the information.

Regards,

Carlos
 
Thank you for this complicated discussion. It may help with some o four problems. We spent the holiday weekend. working o a method to decade the hex code of IR transmitters. with the Arduino. So far, we got most of of it working. We are using the DFROBOY & Elegoo Arduino. Our nest step is to use a IR transmitter to fly the RMTT. We are following the Chinese video from Mind+ RMTT instructions. We need to get a working library for the RMTT. Here is a copy of our on line instruction session on the IR receiver demo program. It is step by step on ho0w to use the Arduino and setup the library. W3 will now start working on the Mind_ graphics code to insert the hex codes for control of LED's. There is much available in Chinese on the RMTT. They have their own Youtube channel worth looking at called BiliBili, Also on youtube you will see a new DJI distributor that is selling the 3 x 3 M flight carpet for $ 800.
 
Sorry, i cannot find the read on use of Lidar systems, even with a search, so I will post this here, so it can be passed on to those interested. Here is a well done video on the use of Lidar intensive systems available from DFROBOT. Looks like the mini version may be worth some research. There are libraries available for these devices. We use a lot of their products;
 
Thank you for this complicated discussion. It may help with some o four problems. We spent the holiday weekend. working o a method to decade the hex code of IR transmitters. with the Arduino. So far, we got most of of it working. We are using the DFROBOY & Elegoo Arduino. Our nest step is to use a IR transmitter to fly the RMTT. We are following the Chinese video from Mind+ RMTT instructions. We need to get a working library for the RMTT. Here is a copy of our on line instruction session on the IR receiver demo program. It is step by step on ho0w to use the Arduino and setup the library. W3 will now start working on the Mind_ graphics code to insert the hex codes for control of LED's. There is much available in Chinese on the RMTT. They have their own Youtube channel worth looking at called BiliBili, Also on youtube you will see a new DJI distributor that is selling the 3 x 3 M flight carpet for $ 800.
Hi Dan,

Thank you for sharing details about the porject you are working on. I have seen some of the YouTube videos while I was looking for information about the RMTT. I was also interested on the project where they controlled the Tello with the IR remote control. Are you documenting your project on GitHub or any other site?
I'm really interested on the RMTT, I think this opens lots of possibilities to do creative projects. Once I put my hands on the RMTT I will document my findings. So far I have not seen any information on what components are inside the RMTT and how is the communication done between Tello and RMTT.

Regards,

Carlos
 
Hi Dan,

Thank you for sharing details about the porject you are working on. I have seen some of the YouTube videos while I was looking for information about the RMTT. I was also interested on the project where they controlled the Tello with the IR remote control. Are you documenting your project on GitHub or any other site?
I'm really interested on the RMTT, I think this opens lots of possibilities to do creative projects. Once I put my hands on the RMTT I will document my findings. So far I have not seen any information on what components are inside the RMTT and how is the communication done between Tello and RMTT.

Regards,

Carlos
We would be pleased to work with you on the RMTT. Where are you located? We are in Central Texas USA. We are sophisticated users that mentor youth in STEAM. We publish mostly on Youtube channel MECATX. My email is [email protected]. We are waking on swarm/formation flying with the RMTT and the Makerfire LiteBee Wing FM., ( swarm flights with live music and dance ) using flight carpets. We usually do this on Sunday afternoons from 2 to 4 CST USA. Here is a link to last week session that was done on ZOOM because of the virus quarantines. This is using the Aruino and IR to get the hex codes for the RMTT.

 
If you looking for small boards with RGB LEDs, WiFi, and Bluetooth check this out.


I ordered the ESP32 C3 version even though it costs a few dollars more than the ESP32 Pico D4 version so I can try out the ESP32 C3. In terms of capability the C3 is between the ESP8266 and ESP32 but seems to cost more than the old ESP32.

There is additional information on programming these boards on github. GitHub - andypiper/fivebyfive: Polyglot examples for the 01Space ESP32-C3FH4-RGB board
 
Hey guys, very interesting information. I bought two RMTT's but unfortunately the dog got to them right after delivery.
One of the drones got some scars, but both of them work fine. The expansion board however, did not survive the encounter.
Learning that the expansion boards are actually esp32's I found the expansion pack rather expensive plus I have one unused esp32.
So, I'd like to help on this research wherever I can (some usb and wifi sniffing perhaps)
I played around a bit with the python repo for the tello on gitlab.
So I tried to send the command the put the drone's wifi adapter in ap mode: ap ssid password (which should be used only with the RMTT connected and it wasn't)
That command executed successfully, but the drone wasn't connecting to my wifi, I suppose it switched off the Tello's wifi in favor of the esp32.
I can't find a way to switch it back to adhoc mode, only in recovery mode it is activated, and restting the drone does not reset the ap mode.
I don't know if this indicates the Tello is indeed sending the video over the USB.

One of the expansion cards has no real visible damage, and the drone does boot with it, but then no wifi is transmitted (so I assume the wifi in the esp32 can't be switched on cause there is some internal damage)

Hopefully this is helpful in some way
 
Hi,
RMTT_Libs send Tello commands to the drone over Serial1. From some googling Serial1 refers to RX/TX pins so you may need to connect these pins to the USB port on the drone. There are places (Sparkfun, ebay) that sell USB-TTL converters either as cables, or boards. But I don't know if this will solve your problem. I want to buy Tello and use it with a generic ESP32 board, but I am holding back until someone can confirm it works.
 
  • Like
Reactions: Jonngan

New Posts

Members online

No members online now.

Forum statistics

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

New Posts