Introduction
With the provided scripts, you can control:
of your Parrot drone. This should work for all Parrot Drones, that are connected via wifi, as they are run a HTTP, FTP and telnet server by default.
If you put further work into scripts and dig deeper into your drone, you might be able to control almost everything.
I also uploaded a video, so you can see what's happening before you do it:
Background
I have a Parrot drone (Max), that makes annoying sounds and has lights, that I want to control (to light up dark rooms). And I just found out, that Parrot drones offer:
servers by default. So why not use them? :)
Using the Code
To create the web-interface for control, follow the steps given below:
- Connect your drone via wifi to your mobile device (in my case, that was necessary to keep up the wifi of the drone)
- Connect your computer to the drones wifi
- Connect via ftp to the drone (this should be the IP by default)
- Copy the provided www folder to the root directory of your FTP server
- If you want to use it, copy the provided sampleScriptForCopy.sh
- Connect via telnet to the drone (the FTP connection can stay up)
- telnet 192.168.2.1
- (no authentication required. You can use anonymous if you connect via putty)
- Run the sampleScriptForCopy.sh script on the drone
- Open http://192.168.2.1/control.html inside a browser of a device (any) that is connected to the drone
Points of Interest
Almost all the software for the drone is written as bash scripts. Therefore, almost everything is understandable and changable. Always be careful though, to not stop the wrong scripts. You might end up with expensive garbage.
What Happens Inside the Scripts (Backstage)
The control.html calls on cgi-scripts, that are simple shell scripts. The whole interface
is pretty easy. Turn of the sound:
gpio_out "nAMP_PWDN" "0"
Turn on right red LED:
source /bin/leds_lib.sh
led_set red right 1
Note: All the cgi-scripts don't return any value. Therefore your browser will always think that the site was unreachable, even, if it was.
How I Found Out About All This / My Source of Information
This is a Defcon talk, that gave me the idea about what you could do with a Parrot drone:
History