Coding4Fun Drone posts
- Introduction to DJI Tello
- Analyzing Python samples code from the official SDK
- Drone Hello World ! Takeoff and land
- Tips to connect to Drone WiFi in Windows 10
- Reading data from the Drone, Get battery level
- Sample for real time data read, Get Accelerometer data
- How the drone camera video feed works, using FFMPEG to display the feed
- Open the drone camera video feed using OpenCV
- Performance and OpenCV, measuring FPS
- Detect faces using the drone camera
- Detect a banana and land!
- Flip when a face is detected!
The DJI Drone is a great device, you can have a lot of fun and also learn a lot. However, because the main way to interact with the device is via WIFI and UDP, you need to connect to the device WIFI. And, connecting and disconnecting to the is some times not a very happy moment.
So, there are 2 main tips to work in a more agile way with this.
Connect to the Drone WiFi via Command Line
You probably already know the command
netsh wlan connect name=<YOUR WIRELESS NAME>
This is the quickest way to connect to a wireless. Once you have your DJI Tello name and your home / work / whatever network name in your Windows Terminal, just key up until you find it.
Bonus: If you want to know the names of the network, you may want to use the command
netsh wlan show profiles
As you can see in the following image, in my home computer I got several IoT Devices connections, my phone, the DJI Tello WiFi and my home one
The command to connect to my drone will be
netsh wlan connect name=TELLO-589327
Once I want to connect to my default network, I simply disconnect from the drone and wait until my machine connect to the default Wireless Network. The command to disconnect is
netsh wlan disconnect
So, as a recap the only 2 commands you need are:
netsh wlan connect name=<TELLO-Your device number> netsh wlan disconnect
Ping your drone to check when you are connected
Once you connect to your drone WIFI, it may take a couple of seconds or more to establish the connection. If during this time, you launch an app to interact with the device, be prepared to some funny results.
The way that I use to see when the Wireless connection is ready is as simple as to use a ping -t command with
ping 192.168.10.1 -t
This is the default drone IP, and you can run this in a separate window and you will know when the drone is ready.