Flight program
One big program, dragon-prog, holds the estimator and the controller. There’s no separate flight library.
Three firmware files sit in a folder. Somewhere inside them is the answer to a plain question: which board drives a Parrot Bebop 2’s motors, what numbers its flight controller is tuned with, and what happens when a wire goes quiet?
There’s one rule for this hunt, and it’s Ryan’s: only facts. A claim counts when it can be pinned to a file, a byte, or a second independent route that lands on the same answer. Anything short of that gets a label saying whose reading it is, or goes on the list of open questions.
The digging is done by Claude sessions and the agents they send out. One session does most of the checking against the files; another, the one watching the drone, contributes a few findings it checked in the root filesystem; agents read code, and their readings get spot-checked before anything counts. Every find wears a label:
Expect red boxes. Some first drafts are confidently wrong, and walking those wrong turns back to the files is how the right answers turn up. They stay in.
Before we open anything, here’s what’s in the crate, for anyone who wants the ending first:
Flight program
One big program, dragon-prog, holds the estimator and the controller. There’s no separate flight library.
Motor board
One Cypress microcontroller on an I2C bus, running its own firmware, BLDC.cyacd.
GPS
A u-blox 8 receiver on /dev/ttyPA1, with its firmware bundled in the image.
Cameras
Two sensors named in the firmware: MT9F002 in front, MT9V117 looking down.
Parrot ships its updates as PLF files. Think of a PLF as a shipping crate: one file outside, a pile of labelled sections inside.
The first bit of luck: all three images in the folder (Bebop 1 4.0.6, the Bebop 2 family’s 4.7.1, and a Skycontroller image) use the same format. One small extractor that needs nothing beyond Python’s standard library, tools/third_party/extract_plf.py, opens every one of them. A header field called target_application tells them apart.
| Image | Version | target_application |
Sections |
|---|---|---|---|
| Bebop 1 | 4.0.6 | 104 | 1183 |
| Bebop 2 family | 4.7.1 | 121 | 1313 |
| Skycontroller | 2.0.0 (per the header) | 103 | 1211 |
The Bebop 2 image alone holds 1309 filesystem entries and a 40 MB root filesystem. The Bebop 2 image is first unpacked inside a container with no network at all, a sensible habit with an unopened crate.
An early draft pictures the motors the classic way: four separate speed controllers, one per motor, each talked to over a UART (a plain serial line).
That’s not what’s in there.
The Bebop 2 drives its motors through a single Cypress microcontroller board, and the main computer talks to it over I2C. If you haven’t met I2C, it’s a little shared bus: several chips hang off the same pair of wires and each answers to its own address. The motor board lives on /dev/i2c-1. And the serial port the draft had in mind, /dev/ttyPA1? That’s the GPS.
The word Colibry turns up in a folder name, in a script and in the flight program’s own symbols, and one of the drafts assumes a libColibry somewhere doing the flying.
There isn’t one. Colibry is a configuration folder, etc/colibry/, read by the main flight program, dragon-prog. The estimator and the controller are compiled right into dragon-prog.
Then a second shiny thing: libCondor.so exports a function called Engine::setAttitude. That name sounds like flight control. It isn’t. libCondor.so is the image engine for the vertical camera, and it also exports condor::Prediction::*, which fits that job much better.
The folder holds one more wrinkle. This is a family image, carrying config sets for several boards (chimeraboard, milosboard, mykonos3board, and others), and it picks one at runtime from a system property called ro.hardware.
Which of those sets the drone loads is not written anywhere in the image. The answer turns up from a different direction. The session watching the drone finds a system log on the drone’s own storage, and the log says it in plain words: “My hardware is milosboard”, followed by a note that it read its settings from the milosboard folder.
One oddity travels with that log: a machine that calls itself a Milos board also prints two lines announcing a Mykonos3 board. The kernel is the place to look, and it is in the image, folded inside one of the raw partition blobs. Unwrap the PLF, gunzip the payload, and the strings are sitting there. The Mykonos3 name is typed into those two messages as plain text, while the Milos board gets its own separate line for exporting its GPIOs. The kernel’s version line, 3.4.11+ built on 2018-06-06, is also the one the log reports. Shared code announcing itself under the older name is the likely story, though the kernel’s code itself has not been read.
The /calib folder holds 13 files: a camera EEPROM image, four fisheye lens tables, and ISP tuning tables (the ISP is the image signal processor, the stage that turns raw sensor data into a picture). Meanwhile /data and /factory sit empty. The firmware names two sensors, the MT9F002 in front and the MT9V117 looking down, and most of the imaging libraries don’t ship as separate files (an agent reads them as built into dragon-prog).
The GPS firmware is in the crate too, a u-blox 8 image that introduces itself like this:
UBX8FWVER=SPG 3.01PROTVER=18.00Next we open the config files. They’re plain text, and plain text doesn’t hide much.
The estimator (the math that blends a bunch of noisy sensors into one best guess of where the drone is and how it’s tilted) samples at 198.3642578125 Hz according to its adcFsSet setting, right there in etc/colibry/milosboard/root.cfg.
The flight controller’s numbers. Everything here is read from the milosboard set except the altitude gains, which milosboard leaves to the shared common folder:
| What | Value |
|---|---|
| Pitch attitude gains | 264.7408 / 264.7408 / 33.0926 |
| Roll attitude gains | 242.5376 / 242.5376 / 30.3349 |
| Altitude “Default” gains | 4.170 / 1.158 / 5.800 |
| Mass | 0.500 kg |
| Motor range | 3000 to 12200 RPM |
| Thrust coefficient | 2.15e-8 N per RPM squared |
| Kv (RPM per volt) | 1630 rpm/V |
| Motor layout | rectangle, x = +/-0.0875 m, y = +/-0.115 m |
Those numbers check each other. The thrust coefficient is in newtons per RPM squared, so at the top of the range each motor gives 2.15e-8 times 12,200 squared, about 3.2 N, and four of them make 12.8 N. Half a kilo weighs about 4.9 N, so that’s 2.61 times the drone’s own weight. Run it backwards and a hover takes about 7552 RPM per motor.
The mixer is the part that turns “roll a little, climb a little” into four actual motor speeds.
The easy guess is a fixed table of pluses and minuses. Instead a class called QuadMixRPMController does the job, and an agent reads it as model-based control allocation over six inputs: it works the motor speeds out from a model of the drone rather than a sign chart.
The signs still fall out of it. Over motors 0 to 3, roll comes out (+,-,-,+) and pitch (+,+,-,-), in the right-handed, z-down frame an agent reads the mixer using, and the session doing the checking recomputes both from the motor positions rather than taking anyone’s word for them.
Here the hunt turns up something solid.
The motor board’s own firmware ships inside the drone’s image as BLDC.cyacd, in Cypress’s bootloader format. It’s laid out in 256-byte rows, and every row’s checksum verifies: each one is the two’s complement of the row’s byte sum (Cypress calls this checksum type 0), meaning the row plus its checksum adds up to zero.
It’s an 8051-core part, an 8-bit design. The application starts with an LJMP (a long jump) at 0x1900 in the Bebop 2 image, and it jumps to 0x3EF3. A metadata row at 0x7FC0 records the same 0x3EF3 as the entry address, and the Bebop 1 image does the same with its own pair of numbers. A file that agrees with itself. There it is.
Now we follow the wire to its other end. A host tool on the drone, BLDC_Test_Bench, talks to this board, and the protocol draft says the link is guarded by a CRC-16 (a proper error-detecting checksum) with sequential command numbers. Then the decompile of the host tool, done in Ghidra, comes back. The whole binary has exactly two eor (exclusive-or) instructions, each in a byte loop starting from zero. That’s an 8-bit XOR. No CRC on that link.
The 4.7.1 firmware’s dispatch table (the switchboard that routes each command byte to its handler) serves ten command bytes:
0x02, 0x20, 0x40, 0x4D, 0x60, 0x80, 0x82, 0x8D, 0xA0, 0xFA
And four bytes the host tool can send have no entry in that table at all: 0x06, 0x2B, 0xC0, 0xE0. The tool knows words the board doesn’t.
A watchdog is a timer that notices when something stops checking in, here the main computer going quiet on the I2C link. The fine print matters.
Reading the firmware’s own code in the radare2 disassembler, the default is 1024 ticks (0x0400). A reload value of 0 turns it off entirely. It only runs in closed loop. And a new error only replaces the current one if it ranks higher, so if an over-temperature or low-battery error is already latched, the timeout just gets swallowed for as long as that error stays latched.
One more line: a read-only poll counts as activity and feeds the watchdog. Something that only asks “how are you doing?” keeps it satisfied, with nobody sending instructions.
Over-temperature, on the Bebop 2 image, trips at 95 C (or at or below -10 C). It raises an error and a sound, and it does not leave closed loop.
Now we cross over to the controller. The Skycontroller image in the folder is a bit of a mystery guest. It calls itself Parrot project nap, build nap-linux-2.0.0-rc3, a release candidate, even though the PLF header says plain 2.0.0. Its startup script does set a model name, plain “Skycontroller”, and builds the USB product name from that plus the build version. It does not say a generation in words, but its own library decodes the model id it sets, 0x0913, as SKYCTRL_NG, and not as SKYCTRL_2, which is 0x090f. The library also files nap_update.plf under 0x0903, mpp_update.plf under 0x090f and mpp2_update.tar under 0x0915, and the ids shared with the Bebop images (0x0901 and 0x090c) decode to the right drones, which is the control. What the NG product is stays open.
An agent tracing the sticks finds them arriving from a USB “bottom board”: its firmware, xmega.hex, is in the image, and the update script that flashes it names the part as an ATxmega32C4, and a udev rule picks up an input device named mpp2_gamepad. The same agent reads sensorsd-mpp as dealing only with the controller’s own motion sensor and compass (the IMU and magnetometer).
The default Bebop 2 mapping is left stick for yaw and throttle, right stick for roll and pitch, right mini-stick for the camera. The program mppd picks its mapping folder from ro.factory.type, either bebop or milos. Open the buttons table in each:
The Bebop 2 default binds the emergency button to Z.
The Bebop 2 default has no emergency button in its buttons table at all.
Only the buttons array was parsed here. The owner of the pack says the first-generation controller had a dedicated emergency button and the second dropped it. That is his statement and not a firmware finding, and it should not be tied to these folders: the mapping folders belong to the image in this folder, and that image is not the second-generation controller’s firmware.
The session watching the drone finds something in the root filesystem: the power button is wired to a small menu of behaviours. One of them stops the stock flight program and starts ArduPilot’s ArduCopter in its place, if it’s been installed, rather than running beside it. Another starts the telnet and adb services, and the telnet login is exec /bin/sh -l, which means no password. Those services are marked disabled by default, and neither state survives a reboot.
No steps here, on purpose.
The scariest wrong turn is a small one. A drafted cheat sheet for BLDC_Test_Bench says one flag stops the motors. It doesn’t. It only clears an error flag. A peer session catches it by reading the tool’s own help text, and the cheat sheet gets rewritten.
Reach for “stop” off that draft and you’d get “clear error.” The help text was there all along; it took a second pair of eyes.
The labels on this page all come out of the same short routine:
A draft or an agent report makes a claim.
Someone finds the file, the config line, or the bytes that would prove it or rule it out.
It gets checked there, or the same answer arrives by a second, independent route.
It goes into the notebook with its label: verified, an agent’s reading, a teammate’s finding, or unconfirmed.
BLDC_Test_Bench is not a toy. One flag stops the motors and another only clears an error, and they’re easy to confuse (a draft did). Some flags spin the motors, and some write settings or clear the EEPROM. None of it was run, and nothing was sent to the motor controller.
There’s an RF transmit-power profile in the parrot-bebop2-rf-lab project; it’s outside the radio’s certified configuration, and it was not applied.
And Parrot’s files aren’t republished here. This page describes them and quotes a few short strings as evidence; that’s all.
These are the holes that go nowhere yet, and the next places for us to dig.
All of the firmware analysis was reading: files, bytes, config lines, and decompiled code. Nothing in it executed any firmware, and nothing was sent to the motor controller or to any I2C or GPIO line. Contact with the aircraft itself belonged to the session watching the drone, and is described where it appears.
Comments
Spotted a mistake, or tried this on your own Bebop? Leave a note. Comments are kept on this site's own server.