donderdag 11 november 2021

Experimenting with Node-Red coding on a Raspberry Pi

Trying some coding  on a raspberry pi with a sense hat using node-red.

The environment variables(temperature, humidity and pressure) are shown on the node red dashboard in the background and streaming on the sense hat display.

I used these data 4 years ago to build a weather station using MySQL and R; here are the links:




woensdag 3 november 2021

Flying around (4)….Hacking the Tello

Tello creates its own based WiFi network. It uses 2.4 Ghz and UDP as protocol to communicate with a client over ports 8889 at the server and 8890 at the client.

Let’s first look at the WiFi. When you directly connect from your cellphone no security protocol is used; just an open WiFi connection between server and the client 192,168.10.2(phone).


* TELLO-627F4A Infra 4 54 Mbit/s 95 ▂▄▆█ --

If you create a password, an option in the settings of the app, WPA2 is used as the security protocol.


TELLO-TELLO-627F4A Infra 4 54 Mbit/s 100 ▂▄▆█ WPA2

You can remove the password by holding the start button for 10 sec. Tello will completely reset. 

Tello is equipped with SDK: software development kit. The Tello SDK 2.0 user guide gives an overview of programming commands. Download here:

Packet Sender

Is it possible to send SDK commands directly to the Tello?

When a computer is directly connected to the Tello network, you could give commands directly to to the Tello. Install ‘Packet Sender’ and send UDP packages to the Tello on address 8889. Tello will reply with OK.

Here is a screenshot showing battery, takeoff and land.

How about connecting the Tello to you home network with WiFi? Yes that is possible, then Tello is not an access point anymore but a client to the home WiFi network.More on this:

Home Network

Adding Tello to the home network:

Run the following python script: python -s [SSID] -p [PASSWORD]

Here is the response:

sending cmd command

from ('', 8889): b'ok'

sending cmd ap [SSID] [PSW]

from ('', 8889): b'OK,drone will reboot in 3s'

Now Tello is a client of you home network, and directly connecting to the Tello from the phone app is not possible anymore.

Next: We have to scan the network for the IP number of the Tello

nmap -sP or nmap -sT

Nmap scan report for _gateway (

Host is up (0.0080s latency).

Nmap scan report for

Host is up (0.015s latency).

Nmap scan report for

Host is up (0.081s latency).

Nmap scan report for

Host is up (0.034s latency).

Nmap scan report for

Host is up (0.035s latency).

The last one was newly added to the home network.

Ping on that address:

peter@Pegasus:~/Desktop/TELLO$ ping

PING ( 56(84) bytes of data.

64 bytes from icmp_seq=1 ttl=255 time=1.33 ms

We could check the connection by sending UDP packages with packet sender.

Or run python scripts to control a flight or a mission of  the Tello. But in the scripts you have to update/change the IP address of the Tello and the ID. Send sn? with packet sender to get the ID.

From the oneoffcoder site – – try the following scripts. and demo_status were working. Don’t forget to update the IP number and ID when connected to local wifi network.

You can also create a complete mission and save taht in a .txt file.

Then run:

python -f cmds-01.txt

See also my blog posting Flying Around(3).
Java Script

Not only Python but also JavaScript is possibility to control Tello from the command line.

But you have to install the environment to to load a JavaScript for execution. I used the Snapstore and searched for npm to install node.js.

The following GitHub repository has a few scripts to get started:

You can run for example:

node TelloCommandLine.js

this invites you to send commands to the drone

Tello Command Console


Tello> Enter a Tello SDK Command.

Tello> command

Command: command

Data received from server : ok

Tello> takeoff

Command: takeoff

Data received from server : ok

Tello> land

Command: land

Data received from server : ok

Tello> command

Command: command

Data received from server : ok

Tello> takeoff

Command: takeoff

(If the port is already in use; run sudo pkill -9 node)


A special case for controlling Tello with JavaScript is Node-Red. Here is the GitHub repository:

What exactly is Node-RED?

Node-RED is a programming tool for wiring together hardware devices, APIs and online services in new and interesting ways. It provides a browser-based editor that makes it easy to wire together flows using the wide range of nodes in the palette that can be deployed to its runtime in a single-click.

Node-RED allows you to create functionality by wiring together flows of data between nodes using a browser. And it has gained tremendous popularity in the IoT space, by modeling bits of application functionality between IoT devices like sensors, cameras, and wireless routers.

Node Red is developed by IBM and is block based coding in a browser. After deploying the code you can have the results. Here are two pictures that show the basics: left the block coding and right the result after deploying.

A desktop or laptop is not great fun for controlling the Tello. Node_red can also be installed on an android device, like a phone or tablet. A complete install is possible, but a bit complicated because you have to set up Termux on your phone/tablet.

For installing Termux, see also

After installing Termux is here the recipe for installing node red:

Much easier is to install an app RedMobile Lite – Node -RED on Android.

Node Red is especially interesting for IoT, internet of things, connecting devices and data streams. Connecting Tello with Amazon Alexa is an example. Here is the code: . After installing you will be able to control Tello with voice commands.