Bebop 2 Hardware Reverse Engineering
Date: 2026-10-01
Firmware Version: v4.7.1 (bebop-2-family_v4.7.1.plf)
Analysis Method: Ghidra static analysis, binary strings, rootfs configuration files
Status: Working notes. Flight configuration and controller gains are read from the firmware’s config files (section 11e). The PSOC I2C protocol is unverified (section 11c). Sections 1 to 8 are the first draft and are partly retracted (see the box below).
Read this first: corrections to sections 1 to 8
Section titled “Read this first: corrections to sections 1 to 8”Later checks against the rootfs showed that parts of this document were wrong or were guesses written as facts. Sections 1 to 8 are left as first drafted so the history is visible, but these claims are retracted. Details and evidence are in section 11c.
- There is no libColibry, libNavdata or libHAL in the firmware. “Colibry” is a config namespace
(
etc/colibry/{common,milosboard,...}/*.cfg) read byusr/bin/dragon-prog. The estimator and controller are compiled intodragon-prog. - libCondor is not the flight controller. It exports image-registration code
(
condor::Prediction::shift_image,getPrediction), so it is the vertical-camera engine.setAttitudehands it an attitude for image registration. It is not the pilot’s attitude setpoint, and the “roll, pitch, yaw, thrust” parameter labels were my invention (Ghidra only shows six floats). - The estimator is an 18-state Kalman filter running near 200 Hz (
adcFs198.36), not 90 Hz. The “~90 Hz” figure had no source. ACQCON_colibry_Thread_Handleris not the control loop. It copies frames and dispatches callbacks; the filter math is elsewhere indragon-prog.- The
ColibryStatestruct in section 5.1 and the motor mixing matrix are guesses. Neither has been verified against the firmware. - “16,000 RPM max per motor” is wrong as an operating limit.
test-BLDConly bounds its command-line argument at 16000. The controller config for themilosboardset (the build isardrone3-milos, but the set a unit loads is chosen at runtime fromro.hardware; the live unit’s own log states it loadsmilosboard, see 11d) (etc/colibry/milosboard/drone.cfg) hasmotorsRpmMax = 12200andmotorsRpmMin = 3000RPM. Estimator sample rate isadcFsSet198.3642578125 Hz inmilosboard/root.cfg. - Section 3 (BLDC I2C protocol) is largely wrong. The decompile of
BLDC_Test_Benchshows no CRC-16 on the control link, no sequential command numbers 0x00 to 0x09 and no[CRC_LO][CRC_HI]trailer. The real commands and the 8-bit XOR check are in section 11f. - The sensor part numbers come from strings (ArduPilot’s Bebop hardware definition, section 11k, now gives the real buses and addresses for the IMU, magnetometer and barometer); the I2C addresses and bus numbers are datasheet
defaults, not firmware evidence. The bus table also contradicts itself (it puts the GPS on
/dev/i2c-0and on/dev/ttyPA1). OnlyttyPA1for GPS is confirmed.
1. System Architecture Overview
Section titled “1. System Architecture Overview”┌─────────────────────────────────────────────────────────┐│ P7 SoC (Mykonos3) │├─────────────────────────────────────────────────────────┤│ ││ ┌──────────────────────────────────────────────────┐ ││ │ Colibry (Sensor Fusion Engine) @ 90 Hz │ ││ │ ├─ IMU (ICM-20608): 200 Hz raw → 90 Hz fused │ ││ │ ├─ Barometer (MS5607): Altitude/pressure │ ││ │ ├─ Magnetometer (AK8963): Heading reference │ ││ │ └─ Kalman filter: AHRS state (attitude, rates) │ ││ └──────────────────────────────────────────────────┘ ││ ↓ ││ ┌──────────────────────────────────────────────────┐ ││ │ Condor Engine (Flight Control) @ 90 Hz │ ││ │ ├─ setAttitude(roll, pitch, yaw, thrust, ...) │ ││ │ ├─ Motor mixing matrix (4 motors) │ ││ │ └─ libColibry stabilization (closed-loop PID) │ ││ └──────────────────────────────────────────────────┘ ││ ↓ ││ ┌──────────────────────────────────────────────────┐ ││ │ I2C / Motor Control │ ││ │ └─ Cypress PSOC @ 0x08 (BLDC controller) │ ││ └──────────────────────────────────────────────────┘ ││ ↓ ││ ┌──────────────────────────────────────────────────┐ ││ │ Four Brushless Motors (unified BLDC board) │ ││ └──────────────────────────────────────────────────┘ ││ ││ Vision Pipeline (Parallel): ││ ├─ Main Camera → DxO2a ISP → Alpaga AE ││ └─ Optical Flow (software) → Condor navigation ││ │└─────────────────────────────────────────────────────────┘2. Flight Control Loop
Section titled “2. Flight Control Loop”2.1 Main Flight Thread
Section titled “2.1 Main Flight Thread”| Property | Value |
|---|---|
| Thread Function | ACQCON_colibry_Thread_Handler() @ 0x0004dd18 |
| Execution Rate | ~90 Hz (Colibry sensor fusion cycle) |
| Data Structure | ~2544-byte (0x9f0) ringbuffer frames |
| Input Queue | Ringbuffer in shared memory (managed by ACQCON) |
| Output | Motor commands via I2C to BLDC controller |
2.2 Command Entry Points
Section titled “2.2 Command Entry Points”| Command | Function | Parameters | Scope |
|---|---|---|---|
| Attitude Setpoint | setAttitude() @ 0x00033b30 |
roll, pitch, yaw, thrust, roll_rate, pitch_rate | Bebop→Colibry |
| Piloting Enable | ARCOMMANDS_Decoder_SetCommonControllerIsPilotingCb() |
ON/OFF | Gate condition |
| Flight Mode | getManualFlightUnstabilized(Manager *) @ 0x00100400 |
Reads property | TRUE=acro, FALSE=stabilized |
| Telemetry Callback | BEHAVIOUR_Lib_Colibry_Message_Callback() @ 0x0006e460 |
4 params (unknown types) | Colibry→GCS |
2.3 Control Law (Hypothesis)
Section titled “2.3 Control Law (Hypothesis)”Flight mode branching:
- Stabilized (default):
setAttitude()feeds desired attitude into Colibry closed-loop controller- Colibry computes gyro error (desired vs observed attitude)
- PID feedback → motor speed commands
- Barometer maintains altitude hold
- Acro (manual flight unstabilized): Gyro feedback disabled, direct passthrough of pilot input to motor mixing matrix
Motor mixing:
Front-Left motor: +roll, +pitch, +yawFront-Right motor: +roll, -pitch, -yawRear-Left motor: -roll, -pitch, +yawRear-Right motor: -roll, +pitch, -yaw(Standard quadcopter X-configuration)
3. Motor Control Interface (BLDC I2C Protocol)
Section titled “3. Motor Control Interface (BLDC I2C Protocol)”3.1 Hardware
Section titled “3.1 Hardware”| Property | Value |
|---|---|
| Controller | Cypress PSOC (proprietary firmware) |
| Interface | I2C @ /dev/i2c-1 |
| I2C Address | 0x08 (7-bit) |
| Reset GPIO | GPIO 199 |
| Motor Board | Single unified BLDC controller (not four separate ESCs) |
| Motor Outputs | 4 brushless motors (roll, pitch, yaw, vertical thrust mapping) |
3.2 Protocol
Section titled “3.2 Protocol”Transaction Model: Write-Read I2C with CRC validation
Motor Speed Parameters:
- Maximum: 16,000 RPM per motor
- Control modes:
- Closed-loop (PID feedback from rotor back-EMF)
- Open-loop (PWM direct)
Response Data Frame (from HAL):
Message: Vbat | TicksSpeed | RefSpeed | ObsSpeed | SatSpeed | Feedforward | IntegralPID | PIDres | PWMStatus: Vbat | Status | Errno | MotFault | TempCel3.3 Core Commands (via HAL)
Section titled “3.3 Core Commands (via HAL)”| Command | Function | Purpose |
|---|---|---|
set_ref_speed() |
Set motor target RPM | Speed control for one or all motors |
get_observed_data() |
Read current speeds, voltage, status | Telemetry / diagnostics |
simple_start_motors() |
Startup sequence (default direction) | Motor spinup |
start_motors_with_direction() |
Startup with direction control | Reverse capability |
stop_motors() |
Emergency stop | Safety |
clear_error() |
Acknowledge faults | Recovery from CRITICAL state |
get_version() |
Read firmware version | Identification |
reverse_motors() |
Change spin direction | Reconfiguration |
play_test_note() |
Audio test tone | Diagnostics |
3.4 Error Codes
Section titled “3.4 Error Codes”| Code | Meaning | Severity |
|---|---|---|
| 0 | Nominal | OK |
| 10 | Battery autotest failure | CRITICAL |
| 11 | MOSFET/H-bridge failure | CRITICAL |
| Other | Motor stall, comms timeout, thermal limits | WARNING |
3.5 State Machine
Section titled “3.5 State Machine”IDLE ──[start_motors]──> RUNNING ──[error]──> CRITICAL ↑ ↓ └──[clear_error]──────┘3.6 CRC Validation
Section titled “3.6 CRC Validation”All I2C responses include CRC checksums. CRC algorithm: Not yet determined from firmware strings.
Questions:
- CRC polynomial? (CRC-8, CRC-16, other?)
- CRC seed value?
- Is CRC appended or prepended in response frame?
4. Sensor Bus Architecture
Section titled “4. Sensor Bus Architecture”4.1 I2C Bus Topology
Section titled “4.1 I2C Bus Topology”| Bus | Primary Devices | Secondary | Notes |
|---|---|---|---|
/dev/i2c-1 |
IMU, Barometer, Magnetometer | BLDC motor controller | Primary sensor I2C |
/dev/i2c-2 |
[TBD] | Expansion | Secondary I2C (P7 platform) |
4.2 Inertial Measurement Unit (IMU)
Section titled “4.2 Inertial Measurement Unit (IMU)”| Property | Value |
|---|---|
| Chip | ICM-20608 (InvenSense) |
| Fallback | MPU-6050 (compatibility mode) |
| Interface | I2C |
| I2C Address | 0x68 or 0x69 (configurable via AD0 pin) |
| Axes | 3-axis accelerometer + 3-axis gyroscope |
| Raw Sample Rate | 200 Hz (from firmware) |
| Colibry Rate | 90 Hz (filtered/fused in sensor fusion engine) |
| Device Path | /dev/i2c-1 or /dev/i2c-2 |
| Init Function | HAL_icm20608_init_commands |
| Processing | Colibry IMUSensorProcessor |
Evidence in firmware:
WhoAmI register check: ICM20608 IDAlternative: MPU6050 IDicm20608_init_commandsHAL_mpu6050_startAccelerometer output: Linear acceleration in body frame (m/s²)
Gyroscope output: Angular velocity in body frame (rad/s)
4.3 Barometer (Pressure/Altitude)
Section titled “4.3 Barometer (Pressure/Altitude)”| Property | Value |
|---|---|
| Chip | MS5607 (Measurement Specialties) |
| Interface | I2C |
| I2C Address | 0x76 or 0x77 |
| Output | Absolute pressure (Pa) → Altitude via filter |
| Measurement Range | [TBD - check datasheet] |
| Sample Rate | Configurable via firmware parameters |
| Device Path | /dev/i2c-1 or /dev/i2c-2 |
| Init Thread | HAL_thread_ms5607_entry_point |
| Start Function | HAL_thread_ms5607_start |
| Data Acquisition | HAL_thread_ms5607_get_data_acquisition |
| Processing | Colibry BaroSensorProcessor, ProcessedBaro |
| Output Format | _HAL_pressure_SI_t (SI units) |
Altitude filter: Butterworth low-pass filter with coefficients barometerValidPressureFilterA/B
Firmware parameters:
barometerMaxFrequencybarometerFrequency
4.4 Magnetometer (Compass / Heading)
Section titled “4.4 Magnetometer (Compass / Heading)”| Property | Value |
|---|---|
| Chip | AK8963 (Asahi Kasei) |
| Interface | I2C |
| I2C Address | 0x0C |
| Axes | 3-axis magnetic field sensor |
| Output | Magnetic field in milligauss (mG) |
| Calibration | Requires periodic calibration (MagnetoCalibration state machine) |
| Device Path | /dev/i2c-1 or /dev/i2c-2 |
| Init Function | HAL_ak8963_init_commands |
| Start Function | HAL_ak8963_start |
| Data Format | HAL_ak8963_data_format |
| Processing | Colibry MagnetoSensorProcessor |
| Output Format | _HAL_magn_mG_t, ProcessedMagneto |
4.5 Ultrasonic Rangefinder (Sonar)
Section titled “4.5 Ultrasonic Rangefinder (Sonar)”| Property | Value |
|---|---|
| Part Number | P7 Ultrasound Module (Parrot proprietary) |
| Platform | Mykonos3 / P7 (Parrot in-house) |
| Interface | SPI + ADC |
| SPI Device | /dev/spidev1.0 |
| ADC Interface | Analog pins (P7 GPIO ADC input) |
| Measurement Range | 0 - 9 meters (configurable) |
| Acquisition Modulo | 12 (decimation factor for sampling) |
| Pulse Configuration | Dual threshold levels (0 and 1) |
| Pulses Level 0 | 16 pulses |
| Pulses Level 1 | 4 pulses |
| Pulse Amplitude | Configurable |
| ADC Buffer Size | 8192 samples max storage |
| Measurement Rate | Depends on modulo parameter |
| Init Function | HAL_ultrasound_init, HAL_P7_us_init |
| Processing | SensorUSProcessing |
| Config Files | /etc/ultrasound/default-config.xml |
| Threshold Calibration | /etc/ultrasound/threshold_0.txt, /etc/ultrasound/threshold_1.txt |
Firmware config (from XML):
<distance_max_m>9</distance_max_m><acquisition_modulo>12</acquisition_modulo><nb_pulses>16</nb_pulses> <!-- Level 0 --><nb_pulses>4</nb_pulses> <!-- Level 1 --><initial_echo>1500</initial_echo>Questions:
- What is the ultrasound transducer frequency (40 kHz typical)?
- How does the dual-level pulse scheme work (when does it switch)?
- What is the SPI communication protocol to the sonar module?
4.6 Optical Flow
Section titled “4.6 Optical Flow”| Property | Value |
|---|---|
| Type | Software-based (not dedicated hardware IC like PMW3901) |
| Source | Main camera feed processed by vision pipeline |
| Main Camera | Integrated P7 video pipeline (/dev/video0-5) |
| Implementation | Colibry SensorOpticalFlowProcessing |
| Frame Rate | 30 AE (auto-exposure) calls/sec |
| Output | flow_x, flow_y, flow_z (velocity in local frame) |
| Carpet Detection | Integrated (SensorCarpetProcessing - magic carpet detection) |
| Height Reference | Visual altitude over carpet (altitudeVisionSensorToGround) |
| ISP Pipeline | DxO2a ISP + Condor vision engine |
| Data Processing | DataFromVision, VisionCarpetDetection |
Firmware modules:
SensorOpticalFlowProcessingVisionCarpetDetectionchangeOfScale(optical flow scaling factor)
Questions:
- What is the feature tracker algorithm? (KLT? FAST? Custom?)
- How is optical flow validated (outlier rejection)?
- What is the camera’s field-of-view and focal length?
- Is optical flow fused with IMU to estimate height over ground?
4.7 Battery Monitoring
Section titled “4.7 Battery Monitoring”| Property | Value |
|---|---|
| Interface | P7 ADC (Analog-to-Digital Converter) |
| Voltage Measurement | ADC pin via shunt resistor |
| Current Measurement | ADC pin via shunt resistor |
| Processing | BatterySensorProcessor, ProcessedBatteryData_t |
| Factory Detection | ro.factory.hd_battery property |
| ADC Functions | us_checking_adc, us_get_raw_adc_data_tab, us_set_voltage_mode |
Questions:
- What is the shunt resistance value?
- What are the voltage divider ratios?
- How often is battery data sampled?
- What is the nominal battery voltage (11.1V LiPo 3S)?
4.8 GPS (u-blox)
Section titled “4.8 GPS (u-blox)”| Property | Value |
|---|---|
| Chip | u-blox (specific model TBD) |
| Interface | UART |
| UART Device | /dev/ttyPA1 (GPS dedicated port) |
| Baud Rate | 230,400 baud |
| Init Script | /etc/init.d/rcS_gps |
| Config File | /etc/gps_config.txt (line 1: $tty=/dev/ttyPA1) |
| Firmware Handler | ACQCON_colibry_Thread_Handler (GPS data integration) |
Note: This port is NOT for motors. Used exclusively for GPS positioning.
5. Data Fusion Pipelines
Section titled “5. Data Fusion Pipelines”5.1 Colibry Sensor Fusion Engine
Section titled “5.1 Colibry Sensor Fusion Engine”Rate: 90 Hz (main control loop)
Inputs:
- IMU (accel + gyro) @ 200 Hz raw → decimated to 90 Hz
- Barometer (altitude)
- Magnetometer (heading reference)
- Optional: GPS (position, velocity)
- Optional: Optical flow (height over ground)
Processing:
- Kalman filter (AHRS - Attitude & Heading Reference System)
- Gyro drift correction via accel + magnetometer
- Altitude hold via barometer + sonar fusion
Outputs:
- Attitude (roll, pitch, yaw angles)
- Angular rates (p, q, r)
- Altitude estimate
- Position estimate (if GPS fused)
State Representation (hypothesis):
struct ColibryState { float roll, pitch, yaw; // Euler angles float p, q, r; // Angular rates float alt, alt_rate; // Altitude & vertical velocity float baro_alt; // Barometer reading float sonar_alt; // Sonar reading (ground distance) float mag_heading; // Compass heading float accel_x, accel_y, accel_z; // Linear acceleration float gx, gy, gz; // Gyro rates // ... covariance matrices, Kalman state ...};5.2 Condor Flight Control Engine
Section titled “5.2 Condor Flight Control Engine”Rate: 90 Hz (synchronized with Colibry)
Inputs:
- Colibry state (attitude, rates, altitude)
- Pilot commands (attitude setpoints via
setAttitude()) - Flight mode (stabilized vs acro)
Processing:
- Attitude Error Computation: Desired vs observed attitude
- PID Controller: Separate PID for each axis (roll, pitch, yaw)
- Motor Mixing: Convert attitude commands to 4-motor PWM
- Thrust Blending: Vertical thrust + attitude commands
Output:
- 4 motor speed commands (RPM or PWM)
- Sent via I2C to BLDC controller
Motor Mixing Matrix (X-configuration):
Motor1 (Front-Left) = thrust + roll + pitch + yawMotor2 (Front-Right) = thrust + roll - pitch - yawMotor3 (Rear-Left) = thrust - roll - pitch + yawMotor4 (Rear-Right) = thrust - roll + pitch - yaw6. Key Firmware Symbols (from Ghidra)
Section titled “6. Key Firmware Symbols (from Ghidra)”6.1 Flight Control Functions
Section titled “6.1 Flight Control Functions”| Address | Symbol | Type | Purpose |
|---|---|---|---|
0x0004dd18 |
ACQCON_colibry_Thread_Handler |
Thread | Main flight loop (sensor fusion + motor control) |
0x00033b30 |
setAttitude |
Thunk | Attitude setpoint entry (wraps libColibry) |
0x00100400 |
getManualFlightUnstabilized |
Method | Flight mode check (acro vs stabilized) |
0x0006e460 |
BEHAVIOUR_Lib_Colibry_Message_Callback |
Callback | Colibry message handler |
6.2 Sensor Processing Functions
Section titled “6.2 Sensor Processing Functions”| Symbol | Purpose |
|---|---|
Colibry IMUSensorProcessor |
IMU data ingestion and filtering |
Colibry BaroSensorProcessor |
Barometer data processing |
Colibry MagnetoSensorProcessor |
Magnetometer calibration and processing |
SensorOpticalFlowProcessing |
Optical flow extraction |
BatterySensorProcessor |
Battery monitoring |
SensorUSProcessing |
Ultrasonic rangefinder processing |
SensorCarpetProcessing |
Magic carpet (low-altitude) detection |
VisionCarpetDetection |
Carpet detection algorithm |
6.3 BLDC Control Functions
Section titled “6.3 BLDC Control Functions”| Symbol | Purpose |
|---|---|
set_ref_speed |
Motor speed command |
get_observed_data |
Motor telemetry read |
simple_start_motors |
Motor startup |
stop_motors |
Motor shutdown |
clear_error |
Fault recovery |
7. Control Flow (Best Guess)
Section titled “7. Control Flow (Best Guess)”┌─────────────────────────────────────────────────────────────┐│ Pilot Input (Radio/WiFi ARCOMMANDS) ││ └─ ARCOMMANDS_Decoder_SetCommonControllerIsPilotingCb() ││ (Enables control authority) │└─────────┬───────────────────────────────────────────────────┘ │ ▼┌─────────────────────────────────────────────────────────────┐│ Attitude Setpoint (setAttitude call) ││ └─ (roll, pitch, yaw, thrust, roll_rate, pitch_rate) │└─────────┬───────────────────────────────────────────────────┘ │ ▼┌─────────────────────────────────────────────────────────────┐│ ACQCON_colibry_Thread_Handler() @ 90 Hz ││ 1. Read sensor ringbuffer (IMU, Baro, Mag, GPS, Sonar) ││ 2. Colibry Sensor Fusion (Kalman filter) ││ 3. Attitude Error = Desired - Observed ││ 4. PID Controller (roll, pitch, yaw loops) ││ 5. Motor Mixing (4 RPM commands) │└─────────┬───────────────────────────────────────────────────┘ │ ▼┌─────────────────────────────────────────────────────────────┐│ I2C Motor Control (Cypress PSOC @ 0x08) ││ └─ set_ref_speed(motor1_rpm, motor2_rpm, ...) │└─────────┬───────────────────────────────────────────────────┘ │ ▼┌─────────────────────────────────────────────────────────────┐│ BLDC Closed-Loop Controller ││ 1. Commutation (rotor position sensing) ││ 2. Back-EMF feedback ││ 3. Current regulation ││ 4. PWM output to motor phases │└─────────┬───────────────────────────────────────────────────┘ │ ▼ Motors Spin8. Debug/Test Binaries in Rootfs
Section titled “8. Debug/Test Binaries in Rootfs”| Binary | Purpose | Reference |
|---|---|---|
BLDC_Test_Bench |
Motor controller diagnostics | 746 KB ELF |
test-BLDC |
BLDC motor testing | Size TBD |
check_motors |
Motor health check | Firmware string |
check_sensors |
Sensor diagnostics | Firmware string |
diagnostic |
General diagnostics tool | Firmware string |
Note: These are not safe to run without Ryan’s explicit approval and props off.
9. Open Questions & Unknowns
Section titled “9. Open Questions & Unknowns”Flight Control
Section titled “Flight Control”- What is the exact PID controller structure? (P, I, D gains per axis?)
- How is thrust blending handled? (Cross-coupling between attitude and altitude?)
- Does Colibry implement any integral windup protection?
- What is the setpoint rate limit? (Max attitude change per cycle?)
- How does acro mode differ from stabilized? (Just remove gyro feedback?)
Motor Control
Section titled “Motor Control”- CRC algorithm (polynomial, seed, placement in frame?)
- What is the feedback loop rate inside the PSOC? (kHz?)
- How does rotor position sensing work? (Hall effect sensors? Back-EMF commutation?)
- What are the motor electrical parameters? (Kv, resistance, inductance?)
- How is ESC low-voltage cutoff (LVC) implemented?
Sensors
Section titled “Sensors”- What is the ICM-20608 gyro drift rate and offset calibration?
- How is the barometer fused with sonar for altitude hold?
- What is the AK8963 magnetometer calibration procedure?
- What is the optical flow feature tracker algorithm?
- How often is magnetometer recalibrated in flight?
Hardware
Section titled “Hardware”- What is the battery nominal voltage (11.1V 3S LiPo)?
- What is the motor Kv rating (RPM per volt)?
- What are the I2C bus pull-up resistor values?
- What is the SPI clock speed to the ultrasonic module?
- Is there a brownout reset circuit?
10. References & Source Files
Section titled “10. References & Source Files”Firmware Analysis
Section titled “Firmware Analysis”- PLF Archive:
firmware/bebop-2-family_v4.7.1.plf(25.3 MB) - Extracted Rootfs:
firmware/extracted/bebop-2-4.7.1/rootfs/ - Manifest:
/firmware/extracted/bebop-2-4.7.1/manifest.json(Gerrit commit hashes) - Ghidra Analysis: Port 8192 (dragon-prog binary, 8437 functions)
Key Files
Section titled “Key Files”/usr/bin/dragon-prog— Main flight daemon (5.9 MB, stripped ARM ELF)/usr/lib/libCondor.so— Flight control engine (containssetAttitude)/usr/lib/libColibry.so— Sensor fusion (external, not in static text)/etc/boxinit.d/11-dragon-services.rc— Service definitions/etc/boxinit.d/50-adb.rc— ADB enablement (button 4×)/etc/boxinit.d/50-arducopter.rc— ArduCopter launcher (button 3×)/etc/P3A_ctx_init.xml— Camera/sensor initialization config/etc/ultrasound/default-config.xml— Sonar configuration/etc/gps_config.txt— GPS UART configuration
Documentation
Section titled “Documentation”FLIGHT_CONTROLLER_MAP.md— Flight loop and stabilization architectureBLDC_I2C_Protocol.md— Motor controller protocol specification (scratchpad)bebop2-firmware-hooks.md— Button presses, entry points, ground rules (memory)
11. Investigation Status
Section titled “11. Investigation Status”| Topic | Status | Notes |
|---|---|---|
| Flight control loop | ✓ Complete | ACQCON_colibry_Thread_Handler mapped |
| Motor control protocol | ✓ Complete | I2C 0x08, CRC protocol, command set |
| Sensor bus architecture | ✓ Complete | All 7 sensors mapped (IMU, Baro, Mag, Sonar, Optical Flow, Battery, GPS) |
| Colibry sensor fusion | ⚠️ Partial | Kalman filter structure unknown (libColibry is external) |
| Flight control law | ⚠️ Partial | Motor mixing matrix inferred; PID gains unknown |
| Camera ISP pipeline | ⚠️ Partial | DxO2a, Alpaga mentioned; detailed flow unknown |
| BLDC controller firmware | ⚠️ In progress | Image found (BLDC.cyacd, see 11b); background agent parsing it and the bootloader protocol |
| Bebop 1 / Skycontroller / nested partitions | ⚠️ Extracted | Surveyed only; see 11b and SKYCONTROLLER_NOTES.md |
| Boot sequence | ❌ Not started | Startup order, init scripts partially reviewed |
11b. Other Firmware Artifacts
Section titled “11b. Other Firmware Artifacts”Added after the first pass. EVIDENCE unless marked INFERENCE.
All three PLFs share one container format
Section titled “All three PLFs share one container format”tools/third_party/extract_plf.py <plf> <outdir> unpacks every image in firmware/. The header’s
target_application tells products apart:
| Image | version | target_application | sections | Extracted to |
|---|---|---|---|---|
| bebop-1_v4.0.6.plf | 4.0.6 | 104 | 1183 | firmware/extracted/bebop-1-4.0.6/ |
| bebop-2-family_v4.7.1.plf | 4.7.1 | 121 | 1313 | firmware/extracted/bebop-2-4.7.1/ |
| skycontroller_nap_update.plf | 2.0.0 | 103 | 1211 | firmware/extracted/skycontroller-nap/ |
firmware/extracted/ is gitignored, so none of this is in the repo; re-run the extractor to rebuild it.
The PSOC motor-controller image is in the rootfs
Section titled “The PSOC motor-controller image is in the rootfs”rootfs/lib/firmware/BLDC.cyacd (Bebop 2: 46,917 bytes, 89 data rows, 22,784 bytes of payload).
This is the actual firmware the Cypress PSOC runs, in Cypress bootloader .cyacd format, and
usr/bin/BLDC_Host_Bootloader is the host side that flashes it over I2C. Header line 1E0680690300
is silicon ID 0x1E068069, revision 03, checksum type 00.
- INFERENCE: the
0x1Eprefix is the PSoC 3 family (8051 core); PSoC 5LP IDs start0x2E. Not confirmed. - Bebop 1 (4.0.6) ships a
BLDC.cyacdwith the identical silicon ID line: 86 data rows, 22,016 bytes. - None of the 85 row addresses shared by the two images hold identical bytes. INFERENCE: a rebuild with shifted code rather than a small patch. Worth diffing as code once an 8051 disassembly exists.
- Supporting scripts:
lib/firmware/BLDC_Factory_Tests.sh,autotest-mosfet.sh. The factory test usesi2c_cmd | grep 0x8as its alive check, which agrees with the I2C address0x08, and a 9.5 V supply reference (VREF=95in decivolts) for the battery-voltage test. - Being reversed by a background agent; its notes go to the scratchpad
PSOC_Firmware_Reverse_Engineering.md.
GPS firmware is bundled
Section titled “GPS firmware is bundled”rootfs/etc/gps_firmware.bin (526,548 bytes, same bytes under @flasher/gps/) starts with UBX8
and contains FWVER=SPG 3.01 and PROTVER=18.00: a u-blox 8 firmware image, flashed by
@flasher/gps/run (746,680 bytes). This pins the GPS to the u-blox 8 generation.
Correction to section 4.8: the model is u-blox 8 class, not “TBD”.
Raw partition blobs in the Bebop 2 extraction
Section titled “Raw partition blobs in the Bebop 2 extraction”partitions/section-00002-type-12.bin (4.5 MB) and section-00004-type-3.bin (3.7 MB) are
themselves PLF containers (PLF! magic, target_application 121). section-00003-type-7.bin
(46 KB) begins with seven ldr pc, [pc, #0x18] words (the fifth slot is zero), an ARM exception vector table, so it is
boot code. Both PLF blobs contain a compressed Linux kernel (unpacked in 11h); their flashing roles are still not established.
Skycontroller
Section titled “Skycontroller”Own file: SKYCONTROLLER_NOTES.md. Short version: Parrot nap build 2.0.0-rc3 (which Skycontroller generation is not established), Linux 3.4, Qt5 HUD,
ARSDK peer on both sides (mux over USB to a phone, net over Wi-Fi to the drone at 192.168.42.3 as a client).
11c. Verification record (what has and has not been checked)
Section titled “11c. Verification record (what has and has not been checked)”Background agents produced long specs from limited evidence, and their summaries stated more than their documents did. This section records what was checked directly against the rootfs.
Estimator and architecture (agent notes in colibry-fusion.md, spot-checked)
Section titled “Estimator and architecture (agent notes in colibry-fusion.md, spot-checked)”Confirmed on disk: no libColibry, libNavdata or libHAL anywhere in the rootfs; etc/colibry/ holds
per-board config sets (chimeraboard, common, milosblack, milosboard, milosthermal,
mykonos3board) each with controller.cfg, estimator.cfg, helper.cfg, drone.cfg; the build is
variant=milos; libCondor.so exports condor::Prediction::* (image shifting and prediction);
dragon-prog contains ControlGainsPID. The estimator notes cite function addresses for the
18-state Kalman structure (FUN_0037d884, FUN_0037c0f8, FUN_0037a16c); those were taken from the
agent and not re-derived. The 18-state ordering is unknown.
PSOC / BLDC (agent drafts in psoc-firmware-DRAFT-unverified.md and bldc-i2c-protocol-DRAFT.md)
Section titled “PSOC / BLDC (agent drafts in psoc-firmware-DRAFT-unverified.md and bldc-i2c-protocol-DRAFT.md)”| Claim | Status | Basis |
|---|---|---|
Image is Cypress .cyacd, header 1E0680690300 |
Confirmed | file contents |
| Rows are 256 bytes (Bebop 2: 89 rows, 22,784 B; Bebop 1: 86 rows, 22,016 B) | Confirmed | parsed |
| Row checksums are a 2’s-complement byte sum, checksum type 00 | Confirmed | 89 of 89 rows verify |
Host bootloader accepts checksum type 0 or 1, has BLDC_VerifyCrcAppli, prints version/silicon id/rev |
Confirmed | strings in BLDC_Host_Bootloader |
Reset line for the motor board is gpio199 |
Confirmed (11j) | the kernel’s pin table names GPIO 199 reset_psoc, and the factory scripts (BLDC_Factory_Tests.sh:67,75, autotest-mosfet.sh:22,23,52,53) toggle gpio199 around the motor-board tests |
| Per-motor speed argument limit 16000 | Confirmed, but not a flight limit | test-BLDC checks motorN_speed <= 16000. The milosboard flight config says 3000 to 12200 RPM; the live unit’s own log states it loads that set (11d) |
| I2C address 0x08 | Consistent, not proven | factory script greps i2c_cmd output for 0x8 |
| Hall and back-EMF/zero-cross both mentioned | Confirmed as words | strings in BLDC_Test_Bench (2 and 3 hits); how they are used is not known |
| 10 kHz internal PID loop | Unresolved (11g) | not in the host binaries; in the PSOC image the loop tick is a timer reload (0xF9) whose clock is not derivable, so the period is unknown |
| 120 C over-temperature cutoff, 20% PWM soft-start over 500 ms, bootloader >= 3.30 | REFUTED for the Bebop 2 image (11g, agent-cited) | the image trips at 95 C or below -10 C with an error flag and sound only; spin-up is about 1 s of alignment, ramp and lock; the 3.30 figure is real: BLDC_Host_Bootloader prints “The bootloader version detected is not supported (< v3.30)”, so the host tool rejects older bootloaders (the earlier note saying it had no source was wrong) |
| I2C command numbers 0x00 to 0x09, frame layout, example frames | REFUTED (11f) | real command bytes are 0x02, 0x06, 0x20, 0x2B, 0x40, 0x4D, 0x60, 0x80, 0x82, 0x8D, 0xA0, 0xC0, 0xE0, 0xFA |
| I2C CRC is CRC-16-CCITT (poly 0x1021, seed 0xFFFF) | REFUTED (11f): the host tool uses an 8-bit XOR on two frames, no CRC-16 | the draft itself says “TO BE CONFIRMED”; note the image rows use Cypress’s basic-summation checksum (two’s complement of the byte sum, type 00), not a CRC; that says nothing about the I2C protocol’s own check |
| Silicon family | Unresolved | agent summary said PSoC5LP; its document said “PSoC3 or PSoC5LP”; my reading of the 0x1E prefix is PSoC 3 (inference) |
How to settle the open items, in order of cost: decompile the MTB_BLDC_* routines in
BLDC_Test_Bench (static; gives command bytes and the CRC routine directly), then confirm against
an I2C bus capture from a real unit (read-only, needs the drone and Ryan’s OK).
11d. Board sets, and the camera chain
Section titled “11d. Board sets, and the camera chain”One image, several boards
Section titled “One image, several boards”The 4.7.1 image is a family image. etc/colibry/ holds six config sets (chimeraboard, milosboard,
milosblack, milosthermal, mykonos3board, plus common underneath), and the scripts and
dragon-prog branch on the runtime property ro.hardware (etc/init.d/rcS:261,
bin/ardrone3_shell.sh:8, bin/onoffbutton/shortpress_3.sh:22,39; dragon-prog has
wai_is_chimera/milos/mykonos3). etc/build.prop only says ro.parrot.build.variant=milos.
Per-set values differ materially, for example motorsRpmMax is 12200 (milosboard, milosblack,
milosthermal), 11000 (mykonos3board) and 7100 (chimeraboard), and videoTiltRange is [-75, 30] in
common but [-70, 35] in mykonos3board.
RESOLVED for the live unit (2026-10-02, reported by the session that owns the drone link): a system log
file on the drone’s own storage states the board three ways in its own words: “My hardware is milosboard”,
“Product variant : milosboard”, and a config read from /etc/colibry/milosboard/root.cfg with include path
/etc/colibry/milosboard/default. So this aircraft loads the milosboard set, and the milosboard values in
11e are this unit’s real ones. I did not read that log myself (it is live operational data kept in a gitignored
captures directory), so it is [X] confirmed independently, not [V]. It covers one unit; other Bebop 2 units were
not checked. The HW_03 hardware string the drone reports over its normal protocol (../drone-state.md) is a
different identifier and does not name a board set. The two older inferences below reached the same answer
before the log was read.
Indirect evidence (checked against the extracted Bebop 1 4.0.6 image): its build.prop has
ro.parrot.build.variant=mykonos3 and it ships only common, milosboard and mykonos3board, so
mykonos3 is the Bebop 1 platform and a unit that identifies as a Bebop 2 is probably not
mykonos3board. That leaves the milos sets, which all use motorsRpmMax 12200 and motorsRpmMin
3000 (INFERENCE: it assumes chimeraboard, at 7100, is a different product). So the 3000 to 12200
RPM range is likely right for a Bebop 2 whichever milos set it loads; the tilt range is not settled.
Live reading that matches no config file: ARSDK CameraSettingsChanged on the real unit reported
tiltMin -83 and tiltMax 17 (docs/notes/questions.md), against videoTiltRange [-75, 30] (common)
and [-70, 35] (mykonos3board). They may be different quantities (virtual gimbal limits versus crop
window); unresolved.
More indirect evidence on the board set (2026-10-02, supporting only): the mass values in each set’s drone.cfg are
0.500 kg (milosboard), 0.523 (milosblack), 0.604 (milosthermal) and 0.390 (mykonos3board). Parrot’s datasheets in
docs/parrot/bebop-pro/ list 604 g for the Bebop-Pro Thermal and 500 g for the Bebop 2 Power (the datasheet’s two-column
layout also lists 500 g for the Skycontroller 2, so only the drone-column lines count). 604 g matches milosthermal exactly and 500 g
matches milosboard, which fits a Bebop 2 using milosboard. It does not show the ro.hardware value on a unit, so it stays Open.
Camera and vision (agent notes in camera-isp.md; spot-checked)
Section titled “Camera and vision (agent notes in camera-isp.md; spot-checked)”Confirmed on disk: /calib holds 13 files (an 8 KiB eeprom_cam.dat, four F-theta lens tables,
custom_43_disto_lut.dat, ftd_*.txt and userTuning*.txt ISP tables), while /data and /factory
are empty. Only libarstream2.so, libh1enc.so and liboyster.so exist as separate libraries; the
ISP/auto-exposure/vision code is not shipped as files and appears to be linked into dragon-prog
(agent claim, consistent with the missing .so files). dragon-prog references the sensors
MT9F002 (106 string hits) and MT9V117 (9 hits, all lowercase driver names such as mt9v117_*). libCondor.so exports condor::Engine::{setBuffer, Compute, getTranslation, getIndicator, setAttitude, setCamera, setCamera2gc, setCameraGain}.
Front camera MT9F002 at I2C 0x10 and downward camera MT9V117 at 0x5D, on /dev/i2c-0, are verified in usr/bin/mk3_cam0_common.sh, mk3_cam2_common.sh and mk3_cam_common.sh (checked 2026-10-03; earlier labelled agent-cited). Agent-cited, not re-derived: the
front chain (sensor, ISP, gyro-to-frame sync, crop prediction, fisheye correction, H.264 on the
Hantro H1 encoder, RTP via libarstream2); a 160x120 luma image from a 320x240 capture feeding Condor
for optical flow. The stabilization sits in videoWindowSetter and the camera-angles code, not in
Condor. The agent attributed the tilt range [-70, 35] to “the Bebop 2 board”, which the config does
not support (see above); treat tilt range as unknown for the Bebop 2.
Open questions are listed at the end of camera-isp.md (video device mapping, video-mode
record fields, setCamera argument order, which lens table a unit uses).
11e. Flight control law (agent notes in control-law.md; key values checked)
Section titled “11e. Flight control law (agent notes in control-law.md; key values checked)”The controller and mixer are part of dragon-prog (the Colibry framework), configured from
etc/colibry/common/*.cfg overlaid by the board set’s *.cfg. All values below are from the
milosboard overlay unless stated; the live unit’s own log states it loads that set (11d).
Checked directly in the cfg files:
| Item | Value | Where |
|---|---|---|
| Pitch attitude gains (theta) KP / KI / KD | 264.7408 / 264.7408 / 33.0926 | milosboard/controller.cfg:11-13 |
| Roll attitude gains (phi) KP / KI / KD | 242.5376 / 242.5376 / 30.3349 | milosboard/controller.cfg:15-17 |
| Altitude, “Default” set kp / ki / kd | 4.170 / 1.158 / 5.800 | common/controller.cfg:75-77 |
| Altitude, “Freefall” set kp / ki / kd | 2.0 / 0 / 15.01 | common/controller.cfg |
| Mass, inertia | 0.500 kg; Jx 0.001491, Jy 0.001458, Jz 0.003328 kg m^2 | milosboard/drone.cfg |
| Motor RPM range | 3000 to 12200 | milosboard/drone.cfg:23-24 |
Thrust coefficient motorA |
2.15e-8 N per RPM^2, all four motors | milosboard/drone.cfg |
Reaction torque motorB |
2.85e-10 N m per RPM^2, signs (-, +, -, +) | milosboard/drone.cfg |
| Motor positions (x, y) in metres | m0 (+0.0875, -0.115), m1 (+0.0875, +0.115), m2 (-0.0875, +0.115), m3 (-0.0875, -0.115) | milosboard/drone.cfg |
| Motor constants | Kv 1630 rpm/V, PWM max 255 | milosboard/drone.cfg (pwmMotorsModel) |
Arithmetic rechecked from those constants: max thrust 4 x 2.15e-8 x 12200^2 = 12.8 N, which is 2.61 times the 4.9 N weight, and hover needs about 7552 RPM per motor.
The mixer is the class QuadMixRPMController (present in dragon-prog strings). The geometry
above is a rectangular X, not a square one, with diagonal motors spinning the same way. This
supersedes the “Front-Left +roll +pitch +yaw” table in the first draft, which was a guess.
Agent-cited and not re-derived: the mixer process function at 0x2a6e98 (Ghidra has no function
there; read from llvm-objdump), its config reader 0x2a63b0 and matrix builder 0x2a78d0; a
model-based control allocation with per-motor square-root thrust terms, clamping and an iterative
priority desaturation loop, with the final floats truncated to 16 bits at 0x4177ec; position gains
(kp 0.8, kd 1.6), speed gains (kp 0.2612, ki 0.1606), user max tilt 15 degrees (reference limit 35),
rotation speed 180 deg/s, vertical speed 1 m/s default and 6 m/s max; about 30 Mykonos3::ControlState
classes (the binary has 60 mangled ControlState string hits) covering take-off, landing, flip,
freefall, cut-out, flyaway and emergency landing; a throttle mode as the only manual-throttle path.
Mixer inputs and signs (from mixer-input-roles.md; class and field names checked in dragon-prog
strings, roll and pitch signs recomputed by me from the motor geometry; addresses and the rest agent-cited):
- The mixer builds a six-element vector u (also the
control.uSatnode). Roles: u0 is the square-root hover/weight term; u1, u2, u4 are the roll, pitch and yaw angular-acceleration references (angularAccelerationRef[0..2], written byQuadQuaternionLoopController); u3 is extra thrust for tilt and u5 is the altitude-loop acceleration (both fromHeightLoopController). Total thrust is u0 + u3 + u5.estimation.gamma(kg^-1, so effectively 1/mass) is the divisor, air density rescales the coefficient matrices, andcontrol.motorMaxCommandsRPMis the upper clamp. - Signs with the builder’s right-handed, z-down frame and thrust along -z: roll torque is (+,-,-,+) and
pitch is (+,+,-,-) over motors 0 to 3, which I reproduced from
motorX/motorY. Yaw follows themotorBsigns (-,+,-,+); the agent reads a positive yaw demand as speeding up motors 0 and 2, which is INFERENCE because it depends on the sign convention inside the builder. Which end is +x (nose or tail) is not determined by the arithmetic, so left/right is not settled either. - Desaturation: channels are sacrificed in this order, altitude correction (u5), yaw (u4), tilt thrust (u3), pitch (u2), roll (u1), and the hover term (u0) last, capped at 99 iterations. The agent noticed the rescale table lacks the 1/gamma that u3 and u5 carry, so it is inexact when gamma is not 1.
- Output path: the mixer writes clamped float RPMs to
control.motorsCommandsRPM; theBLDCMotorControllerprocess (0x4177ec) truncates each to int16 intohalCommand.command.motors_speed;HAL_send_motor_command(0x43d060) is called fromACQCON_colibry_Thread_Handlerat 0x4e12c. - Corrections to the earlier control-law agent: 0x2a6e98 (process) and 0x2a78d0 (matrix builder) hold;
0x2a63b0 is a shared reader for the
motorsParametersblock used by ten classes, not the mixer’s own config; the 16-bit truncation at 0x4177ec belongs toBLDCMotorController, not the mixer.
Not established (the motor-class question is answered in 11l: BLDC over I2C): the physical
motor numbering and which end is +x, who produces motorMaxCommandsRPM, the rotor-inertia matrix the mixer
adds to the roll, pitch and yaw channels, and whether anything turns the attitude loop off. set_ref_speed
accepts up to 16000 while the controller clamps to 12200.
11f. BLDC I2C protocol, from the decompile of BLDC_Test_Bench
Section titled “11f. BLDC I2C protocol, from the decompile of BLDC_Test_Bench”Full notes with addresses and decompiled routines: bldc-decompile.md. Static analysis of the host
tools only; nothing was executed and no hardware was touched. This section replaces section 3 and the
PSOC draft’s protocol claims.
Verified by me directly in the disassembly of BLDC_Test_Bench:
- The binary contains exactly two
eorinstructions (0x18424 and 0x189f0). Each sits in a byte loop that starts from an accumulator of 0 and XORs the bytes of a frame, so the only integrity check in the tool is an 8-bit XOR. The first appends the result after the payload; the second compares the XOR of a received reply against its trailing byte. - The I2C setup issues
ioctlwith0x706(I2C_SLAVE_FORCE, 0x1c1b0) and later0x707(I2C_RDWR, 0x1c518).
Agent-cited from the decompile, consistent with my spot checks but not all re-derived:
- Transport:
/dev/i2c-1, 7-bit slave address 8 (matches the factory script’s0x8check). Commands with no reply are a plainwrite(); commands with a reply are oneI2C_RDWRwith a write message and a read message. A reply of all0x00or all0xFFis rejected as “empty message”. - Frames have one leading command byte, no length byte and no terminator; 16-bit values are big-endian.
| Cmd | Name | Frame (tx) | Reply |
|---|---|---|---|
| 0x02 | set_ref_speed | 02 then n x (hi, lo), 00, XOR8 (length 2n+3) |
none |
| 0x06 | reverse_spin_direction | 06 |
none |
| 0x20 | get_obs_speed | 20 |
2n+7 bytes, last is XOR8 |
| 0x2B | get_assert | 2B |
4 bytes (only after errno 13) |
| 0x40 | start_motors | 40 or 40 dir |
none |
| 0x4D | gpio_control | 4D bits |
none |
| 0x60 | stop_motors | 60 |
none |
| 0x80 | clear_error | 80 |
none |
| 0x82 | play_sound | 82 n |
none |
| 0x8D | set_i2c_timeout | 8D hi lo (ms) |
none |
| 0xA0 | get_info | A0 |
14 bytes (version, motor count, flight counters, last error) |
| 0xC0 | settings read/write | C0 52 id 00 00 / C0 57 id hi lo |
4 bytes |
| 0xE0 | log page | E0 page |
32 bytes |
| 0xFA | clear_EEPROM | FA |
none |
The destructive and motor-starting commands (0x40, 0x02, 0xC0 write, 0xFA) are listed so the protocol is documented, not as a recipe; anything that starts motors or writes settings needs Ryan’s explicit OK.
Status and error fields (agent-cited): the 0x20 reply carries speed words, battery voltage as a big-endian u16, a status byte, an errno byte, a MotFault byte and a signed temperature byte, then the XOR8. There are 7 status names (from “init” to “suicided”) and 14 errno names; errno 13 triggers the get_assert query. The settings table has 45 entries (for example motor rated speed in RPM, LiPo cell count and cell voltage limits, PWM frequency, ramp duration); the host binary holds names and units only, not values.
Bootloader (agent-cited, and its frame format matches Cypress’s published stock bootloader as I know it):
01 cmd len_lo len_hi data chk_lo chk_hi 17, little-endian; command codes 0x38 enter, 0x32 flash size,
0x37 send data (121-byte chunks), 0x39 program row, 0x3A verify row, 0x31 verify application, 0x3B exit.
Checksum type 0 is a 16-bit two’s complement sum; type 1 is a CRC-16 (reflected 0x8408, seed 0xFFFF). The
shipped BLDC.cyacd is type 0, so the CRC-16 path is not used for it. The tool does not appear to check a
received frame’s checksum, only start byte, status, length and end byte (agent observation).
Verdicts on the PSOC draft: command numbering REFUTED; [cmd][params][CRC_LO][CRC_HI] frame REFUTED;
CRC-16-CCITT on the control link REFUTED (a reflected-0x1021 CRC exists only in the bootloader, and only
for type 1 files); 10 kHz PID loop, 120 C limit and 20 percent soft-start NOT DETERMINABLE from these
binaries (they would live in the PSOC’s own firmware, BLDC.cyacd, which has not been analysed).
11g. The PSOC’s own firmware (BLDC.cyacd)
Section titled “11g. The PSOC’s own firmware (BLDC.cyacd)”Full notes with addresses and the conversion script: bldc-cyacd.md. Static analysis of the shipped update
images only (host Ghidra headless with the 8051 language, plus radare2); nothing was flashed or executed.
Verified by me by rebuilding the flat images from the cyacd rows (all row checksums verify):
- Both images are one array of 256-byte rows: Bebop 2 rows 0x19 to 0x7F, Bebop 1 rows 0x18 to 0x7F. The application starts at 0x1900 (Bebop 2) and 0x1800 (Bebop 1); the bootloader is not in the file.
- The first instruction at each application start is
LJMP(opcode 0x02) to 0x3EF3 (Bebop 2) and 0x3B88 (Bebop 1). The metadata row at 0x7FC0 repeats those entry addresses and holds the application checksum bytes 0x8D and 0xAE. So the CPU is an 8051 core, which fits the PSoC 3 family (silicon family still not mapped to an exact part). - The Bebop 2 dispatcher table at 0x1FC4 holds three-byte entries (handler address high, handler address low, command; corrected 2026-10-03, I first read them command-first) for 0x02, 0x20, 0x40, 0x4D, 0x60, 0x80, 0x82, 0x8D, 0xA0 and 0xFA (handlers 0x1fe6, 0x2088, 0x219c, 0x2188, 0x21b7, 0x21d3, 0x22b4, 0x2386, 0x2200 and 0x2296 in that order), and none for 0x06, 0x2B, 0xC0 or 0xE0. So the 4.7.1 image does not handle reverse spin (0x06), get_assert (0x2B), settings read/write (0xC0) or log page (0xE0), even though the host tool can send them. Per the agent, they fall to the “unknown command” default.
Agent-cited, read from the code and not re-derived by me:
get_inforeturns version 6.7.R.4 (Bebop 2) and 6.3.R.4 (Bebop 1); no ASCII version strings exist. CONFIRMED independently for Bebop 2: the live unit reportsMotorSoftwareVersionChanged= “6.7.R.4” over ARSDK (bebop-main’s first-contact capture,docs/notes/drone-state.md), so the aircraft’s motor controller runs the firmware this image ships, read with no I2C traffic. The firmware writes 8 to the I2C address register.set_ref_speedexpects a fixed 11-byte frame (four motors) and XORs 10 bytes without checking the length; the 0x20 reply is 15 bytes with the XOR of bytes 0 to 13 in byte 14.- Errno values 1 to 11 each have a raise site; 7, 12 and 13 are never raised. State 3 (“opened loop spinning”) is never set, so only closed-loop control exists. With no 0xC0 handler there is no 45-entry settings table in this image; hard-coded limits found: reference clamp 1500 to 15000 (Bebop 1 low end 3000), slew limit 500 per tick, PID integral clamp +/-100000, duty clamp 16 to 255, 3S battery only. PWM frequency, motor timing, divider resistors and PID gains are unknown.
- Over-temperature (Bebop 2): trips at 95 C or above, or at or below -10 C, sampled once per 1000 ticks (Bebop 1 window -20 to 80 C). The only action is errno 8 plus the error sound. It does NOT stop the motors, and it clears itself when the reading returns to range.
- Timing: the tick is a UDB timer reloaded with 0xF9; its clock is not derivable. One millisecond per tick is an inference only, so every duration below is in ticks.
- Spin-up (Bebop 2): about 200 ticks of alignment, a 600-tick quadratic ramp from 167 to 2500, then a 200-tick lock.
I2C-loss behaviour (SAFETY-RELEVANT; the code logic below was re-derived by me, see the next paragraph; the timing is still unknown):
- Default watchdog is 1024 ticks (about 1.0 s only if a tick is 1 ms); command 0x8D with value 0 disables it. On expiry it raises errno 4, leaves closed loop and ramps the duty down about 1 count per tick (at most about 255 ticks), then coasts 300 ticks and returns to idle with errno 4 latched.
- It is not a pure command-loss watchdog: any valid command resets it, including the read-only polls 0x20 and 0xA0, so a host that keeps polling keeps the motors at the last reference indefinitely.
- It only runs in the closed-loop state (not during ramp, lock or stop), and a latched errno 6, 8 or 9 suppresses errno 4 and does not exit the loop, so over-temperature or low battery switches the I2C-loss protection off (refined 2026-10-03 in 11m: for as long as the latched condition lasts, not permanently, and in practice only errors 8 and 9 can coexist with closed loop).
- Open: what the flight controller passes to 0x8D, and whether it depends on this watchdog at all.
Re-derived by me from the rebuilt Bebop 2 flat image with radare2 in 8051 mode (read the code, ran nothing):
- Default:
0x53b7loads idata 0x0A:0x0B with 0x04:0x00 (1024) and copies it into the countdown 0x08:0x09. - Routine
0x541f: reload of 0 skips everything (disabled); the activity bit0x20.4set reloads the countdown; otherwise the countdown decrements and, at zero, calls0x572ewith errno 4. It has exactly one call site,0x4a74, inside the closed-loop routine, so it only runs in the closed-loop state. - Raise rule
0x572e: it compares the current errno (xdata 2) with the new one and returns unchanged unless the new one is strictly greater, so a latched errno 6, 8 or 9 swallows an errno 4 timeout. - Closed-loop exit test near
0x4a47: leaves the loop only if the stop-request byte (xdata 3) is non-zero or the errno is in 2 to 5. Errno 6, 8 and 9 do not exit it, and the watchdog call at0x4a74follows that test. - Activity bit: the command dispatch function sets
0x20.5(setb, at0x1fbc), loads the command byte from idata 0x65 and calls the C51 switch routine (0x1efe) with the table inline at0x1fc4.clr 0x20.5occurs only at0x2001(inside the 0x02 handler at0x1fe6: the checksum-failure path) and at the unknown-command default0x23a2, and neither lies in the 0x20 handler (0x2088to0x219c) or the 0xA0 handler (0x2200to0x2296). (Re-derived 2026-10-03 with the corrected handler addresses; the earlier ranges used the wrong command-to-handler pairing, and the conclusion did not change.) The only0x20.5 -> 0x20.4copy is at0x23b0. So a read-only poll (0x20 or 0xA0) leaves the activity bit set and feeds the watchdog, and an unknown command does not. For the two read-only polls this is now checked (2026-10-03): the 0x20 handler (0x2088to0x219c) has one jump to the shared epilogue,ljmp 0x23a4at0x2171, and the 0xA0 handler (0x2200to0x2296) has one, at0x2293; neither contains aclr 0x20.5, and0x23a4falls through to the copy at0x23b0. So a poll feeds the watchdog. I did not enumerate other exit forms such as returns, and I did not check the other commands. - Over-temperature
0x46ca: with u = temperature xor 0x80, errno 8 is raised when u >= 0xDF (95 C) or u < 0x76 (at or below -10 C, corrected 2026-10-03: the second compare runs with the borrow still set, so the test is u < 0x77), through the same0x572e. That routine only raises the errno; combined with the exit test above, errno 8 does not leave closed loop. Still unconfirmed: the real duration of a tick (the timer clock), whether any interrupt routine requests a stop on over-temperature (I read only the sampling routine), any hardware watchdog, and what the flight controller does with command 0x8D. A props-off bench test would need Ryan’s explicit OK.
11h. Kernels inside the partition blobs (unpacked 2026-10-02, static)
Section titled “11h. Kernels inside the partition blobs (unpacked 2026-10-02, static)”Both PLF-wrapped partition blobs of the Bebop 2 4.7.1 image contain a self-extracting ARM Linux kernel. I decompressed the gzip payloads in my scratchpad (not republished) and searched them for strings.
| Blob | Inner section | Gzip payload at | Decompressed | Version string in the kernel | Verified |
|---|---|---|---|---|---|
section-00004-type-3.bin |
1 (type 0, 3,661,248 bytes) | offset 0x5ae8 | 7,235,156 bytes | Linux version 3.4.11+ ... #1 SMP PREEMPT Wed Jun 6 12:02:19 UTC 2018 |
Yes |
section-00002-type-12.bin |
1 (type 0, 2,546,256 bytes) | offset 0x5ae8 | 4,909,700 bytes | Linux version 3.4.11+ ... #1 SMP PREEMPT Tue Dec 1 10:23:38 CET 2015 |
Yes |
section-00002-type-12.bin |
2 (type 3, 1,999,919 bytes) | offset 0 | 3,928,576 bytes | none (not a kernel; holds a table of Parrot machine names and a device-tree model path) | Yes |
Facts from the strings:
- The type-3 blob’s kernel build date (2018-06-06) matches both the image’s
ro.build.date(Wed Jun 6 11:54:38 UTC 2018) and the kernel line the live unit logs (3.4.11+, SMP PREEMPT, built 2018-06-06), so it is the kernel this firmware boots. [V for the string, X for the match with the unit’s log] - The type-12 blob’s kernel is the same 3.4.11+ line built about two and a half years earlier (2015-12-01) by a different builder account, and its message strings mention an Evinrude board. What that blob is flashed to or used for is [U].
- Both kernels carry a machine-name table including “Mykonos3 board” and “Milos board”.
- Board-announce messages in the 2018 kernel:
Mykonos3 board : exporting GPIOs,Milos board : exporting GPIOs,Mykonos3 board : exporting HSIS to userspace in /sys/kernel/hsis,Mykonos3 board : init done, and a warningsystem_rev != mk3_hsis.hwrev. The HSIS and “init done” messages contain the literal text “Mykonos3 board”, while the GPIO export has a separate Milos line. That fits the other session’s observation that a unit identifying as Milos also logs the Mykonos3 HSIS lines: the text is hard-coded, so it is printed whatever the board. That the call is unconditional is an inference from the literal strings plus their log; I did not disassemble the kernel code. /sys/kernel/hsis/is a sysfs directory the kernel exports. The root filesystem reads files in it:hwrevandpcbrev(copied into propertiesro.hsis.hwrevandro.hsis.pcbrevinetc/boxinit.rc),user_on_off(etc/init.d/rcS), and the camera pin entriescamera_v_mclk,camera_v_pwdn,camera_h_mclk(etc/init.d/rcS_vision,rcS_video). The kernel modules in the rootfs do not contain the stringhsis, so the node is created by the kernel itself. [V]- Not established: what HSIS stands for (the files give no expansion), and the meaning of
mk3_hsis.
11i. Live limits against the config files (2026-10-02)
Section titled “11i. Live limits against the config files (2026-10-02)”Values below were read by the session that owns the drone link from the aircraft’s reported state (aircraft landed on
a bench, props off) and sent to me; I did not connect to the aircraft. Config values are from the extracted image
(etc/colibry/common/*.cfg; milosboard defines none of these keys, checked with grep). The mapping from an
ARSDK field to a config key is my inference from names and units, so each “match” is a consistency check, not proof.
| Live ARSDK field | Live range (current) | Config key | Config value | Relation |
|---|---|---|---|---|
| MaxTilt | 5 to 35 deg (current 8) | angleRefMaxUser (common/reference.cfg:7); default usrConfigMaxTilt (:25) |
[35.0, 35.0] deg; 15.0000009536743 deg | max matches 35; current 8 is below the 15 default, so it is a stored user setting |
| MaxVerticalSpeed | 0.5 to 6 m/s (current 1) | maxVerticalSpeed (:113); usrConfigVerticalSpeed (:140) |
6.0 m/s; 1.0 m/s | max and current both match |
| MaxPitchRollRotationSpeed | 80 to 300 deg/s (current 80) | usrConfigMaxAngularRateRefFlying (:19) |
300.0 deg/s | max matches; the 80 minimum has no config match |
| MaxDistance | 10 to 2000 m (current 2000) | usrConfigMaxDistance (common/event.cfg:71) |
2000.0 m | max and current match |
| NoFlyOverMaxDistance | geofence off | usrConfigNoFlyOverMaxDistance (common/event.cfg:70) |
false | matches |
| MaxAltitude | 0.5 to 150 m (current 30) | usrConfigMaxAltitude (common/reference.cfg:139) |
1000.0 m | does NOT match: the config default is 1000, the reported max is 150 (source unknown, possibly compiled in) |
| MaxRotationSpeed (yaw) | 10 to 200 deg/s (current 13) | usrConfigRotationSpeed (:26) |
180.0 deg/s | does NOT match; 200 equals maxAngularRateRefGotofix (:20) but that name does not look related |
What this supports: milosboard defines none of the keys above, and the unit’s reported limits equal the common values for six
of them. That is consistent with the Open question on the Colibry page (a key a board set does not define falls back to
common), but it does not prove how the loader resolves includes. The two mismatches show that not every reported
range comes from these config keys.
Tilt, from the other session’s live test: CameraSettingsChanged tilt -83 to +17 is the virtual gimbal range (they sent
Camera.OrientationV2 with tilt 15 and the aircraft reported 14.999999 back), so it is a different quantity from
videoTiltRange in video.cfg ([-75, 30] in common). Neither is wrong; which one video.cfg governs is still open,
and it is not the gimbal setpoint. This replaces the “may be different quantities” guess in 11d.
Other facts from the same report (peer-reported, [B]): this unit’s /sys/kernel/hsis values are hwrev 14, pcbrev 3,
p7rev 3, and its radio NVM is byte-identical to the one in the firmware image, an unspecialised Broadcom template that still
contains a literal boardnum=${serno}, so there is no per-unit NVM to compare (per-unit calibration is in the chip’s OTP).
11j. The pin map, as far as the init scripts show (2026-10-02)
Section titled “11j. The pin map, as far as the init scripts show (2026-10-02)”The kernel’s /sys/kernel/hsis/ files (see 11h) return a GPIO or PWM number per function and board revision; the init
scripts export whatever number comes back and then configure it. So the scripts name the functions and their settings,
and the kernel tables (agent extraction pending, notes in the scratchpad) hold the numbers. Everything below is read
directly from the scripts in etc/init.d/ of the Bebop 2 4.7.1 image [V]; the numbers are NOT in the scripts.
hsis entry |
Kind | What the script does with it | Script |
|---|---|---|---|
hwrev, pcbrev |
value | copied into properties ro.hsis.hwrev and ro.hsis.pcbrev |
etc/boxinit.rc:23-24 |
user_on_off |
GPIO | exported as a GPIO (the power button input) | rcS:22-23 |
thermal_pwm |
PWM | “Heating resistor for warming IMU sensors”, 8 kHz, period 125000 ns, duty 0 at start, run enabled | rcS_IO:8-14 |
clkin_gyro |
PWM | the MPU6050 input clock: wanted 32768 Hz (30517 ns), “set empirically” so the data-ready period is 5 ms, slightly detuned to synchronise camera and IMU; the code writes period 31510 ns, duty 15258 ns | rcS_IO:16-25 |
gyro_int_p7 |
GPIO | “Enabling drdy MPU6050”: the IMU data-ready interrupt line, exported | rcS_IO:27-29 |
select_alim_us |
GPIO | “US pulse level”: ultrasound pulse supply level, exported | rcS_IO:31-33 |
fan |
GPIO | FAN control: set as an output and driven to 0 | rcS_IO:35-47 |
camera_v_mclk |
PWM | “Vision vertical camera clock @43 MHz or 23 ns”: period 23 ns | rcS_vision:9-19 |
camera_v_pwdn |
GPIO | power-down line of the vertical camera, driven to 1; user_gpio name CAMERA_V_PWDN |
rcS_vision:21-33 |
camera_h_mclk |
PWM | front camera clock: period 77 ns, run enabled | rcS_video:9-19 |
camera_h_pwdn |
GPIO | power-down line of the front camera, driven to 1; user_gpio name CAMERA_H_PWDN |
rcS_video:24-34 |
fsync_gyro_p7 |
GPIO | frame sync from the camera: edge set to rising “to start counting at frame start”; user_gpio name FSYNC_GYRO_P7 |
rcS_video:37-50 |
servo1_pwm to servo4_pwm, thermal_pwm, fan, hwrev |
read by dragon-prog |
the flight program reads these paths itself (strings) | usr/bin/dragon-prog |
Checks I made on these facts:
- Camera clocks: 1/23 ns is 43.5 MHz and 1/77 ns is 13.0 MHz, matching the camera analysis’s 43 MHz master clock for the vertical sensor (MT9V117) and 13 MHz for the front sensor (MT9F002). That analysis was agent-cited; the scripts independently agree with it, so “v” is the downward (vision) camera and “h” the front (video) camera. [V arithmetic; the pairing of sensor names with v and h is inferred from the clock figures and the script names rcS_vision and rcS_video]
- Estimator rate: the config’s
adcFsSetis 198.3642578125 Hz, a period of 5.041 ms, and the gyro-clock comment aims for a “5 ms data ready period”. These agree to within the empirical tuning the comment describes. How the clock period maps to the sample rate is not stated in the files. [V arithmetic, link inferred] - The comment in
rcS_IOsays the period was set to 31517 ns, but the code writes 31510 ns. Which is the intended value is unknown; the comment may be stale. [V] - The script calls the IMU an MPU6050, while
dragon-progstrings show it probing for both an ICM-20608 and an MPU6050. Which part is fitted on this unit’s board revision is not established here.
Open: what the four servo*_pwm outputs drive on a Bebop 2 (they are read by dragon-prog; no script configures them, and the 2018 kernel has no
such attribute). The numbers themselves are below.
Kernel tables (decoded 2026-10-02; reference page pin-map in the docs-site drafts)
Section titled “Kernel tables (decoded 2026-10-02; reference page pin-map in the docs-site drafts)”Decoded from the 2018 kernel (decompressed type-3 blob, base 0xC0008000, file offset = address minus the base). I re-decoded
the table bytes myself; an agent’s notes (Pinmap_Notes.md in the scratchpad) supplied the layout and the boot-time logic.
hsisattribute table: 22 entries of 20 bytes at file 0x6abe50, each with a name pointer, mode 0x1a4 (0644), a shared show function0xc001e688, a shared store function0xc001e6a0and a pointer to a field of one struct. [V]- The struct
mk3_hsisis at0xc06b3aa0(file 0x6abaa0). Its values in the image: p7rev, pcbrev and hwrev are -1 (set at boot), then camera_h_mclk 11, camera_h_pwdn 132, camera_v_mclk 9, camera_v_pwdn 129, thermal_pwm 6, super_led_pwm -1, gyro_int_p7 91, magneto_int_p7 124, fsync_gyro_p7 90, clkin_gyro 8, reset_psoc 199, reset_wifi 9, host_mode_3v3 202, host_mode_on 203, usb0_oc 204, gps_power_en 81, fan 85, select_alim_us 200, user_on_off 201; two cells no attribute points at hold 82 (at +0x50,gps_flashper the agent) and -1 (at +0x54,reset_gnss), and an unnamed cell at +0x0c holds 73 (role unknown). [V] - The Milos entry routine at
0xc06741acloads the struct address, stores 83 at offset 0x54 (reset_gnss) and 0 at offset 0x24 (super_led_pwm), then jumps to the common routine at0xc0673ce4. [V by disassembly] The common routine, the Mykonos3 patches (several cells set to -1 for older hardware revisions,fan6 for revisions 8 and 9) and the wayhwrevandpcbrevare computed were read by the agent only. [A] - Revision logic (agent-read):
pcbrevis three GPIOs (138, 139, 140) read as bits 0 to 2; on the Milos pathhwrev=pcbrev+ 11; on the Mykonos3 path other formulas apply. The live unit reports pcbrev 3 and hwrev 14, which fitspcbrev+ 11 (and would give 6 on the Mykonos3 path), so the live values support the agent’s reading of the Milos path. [A, corroborated by a peer-reported live reading] The kernel contains two machine descriptors, numbers 9974 (Milos) and 9996 (Mykonos3); each number appears once as a word in the image. [V] - Pad names: the kernel holds pad-name strings that embed the GPIO number, for example
AAI_09__GPIO_128__PWM_09. For PWM 6, 8, 9 and 11 the strings readAAI_06__GPIO_125__PWM_06,AAI_08__GPIO_127__PWM_08,AAI_09__GPIO_128__PWM_09andAAI_11__GPIO_130__PWM_11, so PWM n is a mux option on padAAI_n, GPIO 119 + n. [V] GPIOs 199 to 201 have two different pad strings each (one in aCAM_1form, one in anLCD_1form), so which pad table applies to this chip revision is open. - GPIO 199 is
reset_psoc, the line the factory scripts toggle around the motor-board tests; this settles the earlier “role as reset is an assumption” caveat in 11c. The pathuser_gpio/RESET_PSOCalso appears indragon-prog,BLDC_Host_Bootloader,test-BLDC,check_motorsandAR_Drone3_IMU_calibration(grep of every file in the image). CORRECTED 2026-10-03: I first wrote that this meant the flight program itself drives the reset line. That was an inference from a string’s presence and it is wrong as stated: indragon-progthe stringsuser_gpio/RESET_PSOC/valueandgpio199sit together in the string pool and no code references them (a scan for position-independent references finds none, and finds two to theFANpath used as a control, so the method works). Whether the other tools use the line in code was not checked. [V] shpoison, a core boot service, readsuser_gpio/HOST_MODE_3V3(edge and value) anduser_gpio/USB0_OC(value); it also namesusb_deviceandflird. That ties those two lines to USB host/device mode handling, a reading of the strings only. [V strings, inference for the purpose]- Struct cells versus files (checked after the live aircraft’s
hsisdirectory turned out to hold exactly 22 files): the 22 attribute files point at 22 distinct cells; the struct has further cells with no file, namely +0x0c (73, no pointer to it anywhere), +0x50 (GPS_FLASH, 82) and +0x54 (RESET_GNSS, -1, then 83 on Milos), soreset_gnssandgps_flashare set but not published as sysfs attributes. [V] - User GPIO registration: an export table of 12-byte entries (field pointer, flags, name pointer) at file 0x6abd90, in two copies, holds seven names
(
FSYNC_GYRO_P7+0x30,RESET_WIFI+0x3c,RESET_GNSS+0x54,GPS_FLASH+0x50,GPS_POWER_EN+0x4c,USER_ON_OFF+0x60,SELECT_ALIM_US+0x5c); the copies differ only in theGPS_FLASHflags word (0 against 2). The other seven names (FAN,RESET_PSOC,MAGNETO_INT_P7,HOST_MODE_3V3,USB0_OC,CAMERA_V_PWDN,CAMERA_H_PWDN) are passed to a helper at0xc06739c4from code near0xc0673a00, with the GPIO number in a register; which struct field each caller passes is agent-read. [V for the layout and call sites] - Live check (peer, 2026-10-02): all 19 non-revision
hsisvalues on the live aircraft equal the static values above, andsuper_led_pwmreads 0 where the image has -1, which confirms the Milos entry routine’s patch on hardware; pcbrev 3 with hwrev 14 fitshwrev = pcbrev + 11, but one unit fitting a two-branch rule is consistent with it, not proof of it. [X] - Not in this kernel:
servo1_pwmtoservo4_pwm(onlydragon-progmentions them). Pin tools:check_hcam_pinout(a walking-ones test of the front-camera lines, names no pins),pinst_versionandpinst_trigger(updater helpers),gpio_monitor(a button gesture daemon). [A]
11k. ArduPilot’s Bebop driver as an independent witness (2026-10-03)
Section titled “11k. ArduPilot’s Bebop driver as an independent witness (2026-10-03)”ArduPilot ships its own driver for this motor board, written from the other side of the wire: libraries/AP_HAL_Linux/RCOutput_Bebop.{h,cpp}
in the local clone ~/claude/drone/ardupilot (commit 4c98c92, 2026-08-30). I read it directly. It was not used when the host-tool decode
or the PSOC analysis was done, so agreement is an independent confirmation. [V reading of that source]
| Item | ArduPilot driver | Our decode |
|---|---|---|
| I2C address | 0x08 |
8 (host tool, factory script) |
| Command bytes | 0x40 start, 0x02 set speed, 0x20 read observed data, 0x4D toggle GPIO (bits 0 to 3 plus a power bit 4), 0x60 stop, 0x80 clear error, 0x82 play sound, 0xA0 get info |
the same eight, in the host tool and in the PSOC dispatch table |
| Checksum | XOR of every preceding byte (_checksum) |
8-bit XOR on the two checked frames |
| Set-speed frame | command, 4 x uint16 big-endian, a byte named enable_security (always written as 0), checksum: 11 bytes |
[02] n x {hi,lo} [00] [xor8], 2n+3 = 11 |
| Observed-data reply | 4 x uint16 (a saturation flag in each speed word), battery in mV (uint16), status, error, motor error, temperature, checksum: 15 bytes on a Bebop | 15 bytes, same fields |
| Status low nibble | stopped 1, ramp-up 2, running 4, ramp-down 5 (header also names 0 init, 3 spinning, 6 critical) | states 1, 2, 4, 5 used; 3 never set in the PSOC image |
| Error numbers | the header defines named constants 1 EEPROM, 2 motor stalled, 3 prop security, 4 comms lost, 9 battery level, 10 LiPo, 11 motor hardware (RCOutput_Bebop.h:37-43), but nothing in the .cpp uses them: the error byte is copied through uninterpreted (obs.error = data.error, .cpp:227) |
errno 4 = I2C lost, 9 = battery, 10 and 11 as before |
| Maximum RPM constants | 11000, 12200, and 12500 for the Disco (a different airframe, not evidence about ours) | motorsRpmMax 11000 (mykonos3board), 12200 (milos sets) |
New lines this adds:
- Weaker than the rest of this table: the error numbers. ArduPilot declares them in a header but never compares against them, so it is a witness of the authors’ knowledge of the numbering, not of exercised behaviour. They otherwise rest on the host-tool decompile and the PSOC image alone. (Corrected after a peer review: an earlier version of this line described them as a full match, and a peer first said the constants were not in ArduPilot at all; the header does define them, the code just does not use them.)
- The output thread blocks in a timed condition-variable wait: until the requested speeds change or a 500 ms deadline passes (
BEBOP_BLDC_TIMEOUT_NS,.cpp:508-518). Whichever ends the wait, the loop then acts: if all four requested speeds are above the minimum plus 50 microseconds it starts the propellers if stopped and sends the set-speed frame (.cpp:542-545); if any is at or below that, it stops the propellers and clears the error (.cpp:532-538). So while spinning, a frame goes out at least about every 500 ms. This is a wait deadline, not a fixed resend interval, and a new setpoint cuts the wait short. INFERENCE: that sits under the PSOC’s default I2C-loss watchdog of 1024 ticks (about 1 s if a tick is 1 ms), which fits a design meant to stay inside it. The tick length is still unknown (11g). - Error list against ours (names from the host tool [V], PSOC raise sites agent-read): ArduPilot’s seven agree with our table at 1 (EEPROM access failure), 2 (motor stalled or low speed), 3 (shock on propeller detected, which ArduPilot calls prop security), 4 (communication timeout, the PSOC I2C timeout), 9 (battery voltage out of bounds), 10 (incorrect number of LiPo cells at selftest) and 11 (defective H-bridge or broken phases at selftest). The numbers ArduPilot skips all exist in ours: 5 H-bridge fault (raised by the PSOC interrupt routine), 6 battery shut-down unexpectedly (an EEPROM flag checked at power-up), 7 incorrect motor setting value (never raised in the 4.7.1 image), 8 BLDC temperature out of bounds (the 95 C check); 12 (flash update failed) and 13 (code assertion) are never raised either. So the gap is ArduPilot not naming them, not an unknown block of errors. (Prompted by a peer’s question about 5 to 8.)
enable_security: ArduPilot always sends 0 in the byte our decode called a zero pad. The PSOC image includes that byte in its XOR range (it XORs a fixed 10 bytes,bldc-cyacd.mdsection 2) and no note records a branch on its value, but that was not specifically examined, so what the PSOC does with it is open. What “security” means in this protocol, from the host tool’s own settings table: “Threshold security cutout”, “Security min propeller speed” and “Security max additional prop speed” (RPM) and “Security Timeout I2C lost” (cycles x 1 ms), a family of safety cutouts. In the PSOC image errno 3 is “shock on propeller detected” (raised when a filtered speed estimate stays at or above 16000 for 128 consecutive passes,0x26c4, agent-read) and errno 4 is the I2C timeout. A peer’s reading, inference from two names with no mechanism seen, is that the pad byte enables one of these behaviours and error 3 is it firing. Lead: find out whether the PSOC reads byte 9 of the set-speed frame. Do not experiment with setting that byte to 1 on a real aircraft before it is understood.- What ArduPilot can say about that byte: nothing. Across the whole ArduPilot tree (excluding vendored modules)
enable_securityappears exactly twice, the struct field (RCOutput_Bebop.cpp:125) and the unconditionaldata.enable_security = 0(:136); no parameter, conditional or other writer exists, so nothing there sets it to 1 and the driver cannot tell us what the byte does. [V grep, 2026-10-03; a peer’s check, re-run] - Pad byte, settled for this image (2026-10-03, static): its value is ignored apart from being one of the ten bytes in the XOR check. In the set-speed
handler at
0x1fe6, a loop XORs idata0x65+ k for k = 9 down to 0 (so the pad byte at0x6eis included) into0x6f, and a non-zero result clears the activity bit (bit0x20.5) and exits; the speeds are then read from0x66+ 2k and0x67+ 2k for k = 0 to 3 only (eight bytes,0x66to0x6d), clamped from below at 1500 (0x05DC), never0x6e. I verified the loop and the reads in the disassembly; the agent’s wider scan, and my own earlier scan, find no other access to0x6ein the application, and the slave interrupt routine stores received bytes straight into the idata buffer (0x65onward), so there is no separate copy that could hide a read. Bebop 1 has the same structure. So for the 4.7.1 motor-board image the byte gates neither the watchdog nor the errno-3 path; “security” names cutouts that this image does not route through that byte. This settles the earlier lead for this image only: other motor-board firmware builds were not read. Scope for the aircraft in the room: it reports motor firmware 6.7.R.4 over its normal protocol and the same 6.7.R.4 is what this image’sget_infohandler returns (docs/notes/drone-state.md), so the result very likely applies to Ryan’s aircraft. Equal version strings are strong evidence, not proof of byte-identical firmware, which was not compared. Other builds remain unread. (Agent notes:psoc-tick-padbyte.md.) - Frame length for command
0x02, promoted from a side note after a peer’s request (2026-10-03): I checked in the disassembly and there is no length compare anywhere on the path. The dispatcher at0x1fb5only sets the activity bit, loads the command byte from idata0x65and calls the switch; the handler at0x1fe6starts straight into the ten-byte XOR loop. [V] Two properties of that loop matter. First, it accumulates in place into0x6f, so after a frame that verifies, the check slot holds 0. Second, the speeds are read from0x66to0x6dregardless of how many bytes arrived. So what a short frame does depends on what the buffer held before. Consequences, mostly INFERENCE:- A well-formed 10-byte frame (command, eight speed bytes, XOR check in the pad position, no pad byte) verifies when the previous frame left
0x6fat 0, because the check byte then lands inside the XOR range. That may be why the pad byte is ignored (an older shorter frame format kept working); this is a guess from the structure, not from anything in the image. A first frame after a failed one would be rejected, since0x6fis then not 0. - A truncated or partly overwritten frame leaves stale bytes in the tail. It passes only if the mix of new and stale bytes XORs to 0, which is about
one chance in 256 for arbitrary content. If it did pass, the speeds would be built from a mix of new and stale bytes. Each speed is clamped on the
way in, to 1500 from below and 15000 from above (
0x05DCand0x3A98, both verified in the disassembly at0x2043to0x2065), so the result is bounded, but 15000 is above the 12200 the flight configuration allows, so the board itself would accept more than the flight program ever asks for. - A truncated frame is not a normal occurrence: a Linux I2C write is one transaction, so truncation would take a bus fault. Whether the slave
interrupt routine enforces frame completion or clears the buffer between frames: checked 2026-10-03, and it does not enforce completion. The only call
of the dispatcher is at
0x2bac, inside the slave interrupt routine at0x2b31; it is reached when the I2C block’s status register (0x01fc) reads0x11, after bit tests on registers0x01c7and0x01fcand a clear of one bit in0x49d6, and nothing on that path compares a received-byte count with a frame length. So a short write reaches the dispatcher. (What the status bits mean is not decoded here; I read0x11as the end of a write transaction, which is an assumption.) The concern is therefore not closed, only gated by the checksum collision above. [V reading] So the stale-setpoint path exists in principle but is gated by a checksum collision rather than being an open door. Recorded as a safety note either way.
- A well-formed 10-byte frame (command, eight speed bytes, XOR check in the pad position, no pad byte) verifies when the previous frame left
- A bench measurement of the tick was proposed by a peer (stop feeding the board for a known interval, then poll once and read the error byte, bisecting the interval). It has blockers named by them: any valid command, including the poll, resets the watchdog; it is not established that error 4 latches rather than clearing on the next good frame; and it is not established that the watchdog runs when the motors are not spinning. It would also mean stopping the stock flight program. It is NOT something to attempt without Ryan’s explicit go, with the props off. Not done.
- Sweep for the dispatch-table pairing error (2026-10-03): the mistake was reading entries command-first. Everything derived from a handler address was
rechecked.
bldc-cyacd.mdalready pairs every command with the right handler (0x02 to 0x1fe6, 0x20 to 0x2088, 0x40 to 0x219c, 0x4D to 0x2188, 0x60 to 0x21b7, 0x80 to 0x21d3, 0x82 to 0x22b4, 0x8D to 0x2386, 0xA0 to 0x2200, 0xFA to 0x2296; I confirmed all ten against the table bytes). The two drafts,psoc-firmware-DRAFT-unverified.mdandbldc-i2c-protocol-DRAFT.md, cite no handler addresses. The evidence-ledger rows describe the table layout correctly. The wrong pairing appeared only in my own handler-range check in 11g (re-derived above, same conclusion) and in the brief I wrote for the second agent, which that agent corrected. Nothing else rested on it. - Tick length, one more data point (and a new limit, 2026-10-03): the host tool’s settings table gives the I2C-lost timeout in “cycles x 1 ms”, which supports reading one tick as 1 ms
and so the 1024-tick default as about a second. It is still not derived from the PSOC’s clock configuration. The default value itself is already
known from the image (1024, loaded at
0x53b7), so the open part is only the unit. The unit cannot be derived from the application image: it never writes the clock-distribution registers (0x4700to0x470b) or the clock divider registers (0x4880upward), only reading0x4880and0x4888at startup and writing the IMO and PLL selection (0x4200,0x4220to0x4223), so the master, bus and UDB-timer clock settings lie outside it (the bootloader region0x0000to0x18FFis not in the update file, or in the project’s generated clock configuration). Settling it needs a live register read or a bench measurement, neither done. [A: the agent’s decode of the register-write table at0x5e4c; I did not re-scan for clock writes] - A field bound on the watchdog was proposed (ArduPilot works on real Bebops, so the timeout must exceed its worst gap between frames). That bound is
weaker than it looks: ArduPilot’s default battery monitor on this board is the Bebop type, and
update_batt_compass(documented “should be called at 10hz”) callsbattery.read(), which callsread_obs_data, a0x20poll, about every 100 ms. Our PSOC reading is that any valid command, including a poll, resets the watchdog, so the board is fed about every 100 ms whatever the 500 ms set-speed wait does. The bound is therefore “above roughly 100 cycles”, not above 500, and only if that reading of the PSOC code is right. [V ArduPilot code; inference]
ArduPilot’s Bebop hardware definition (libraries/AP_HAL_Linux/hwdef/bebop/hwdef.dat), read 2026-10-03
Section titled “ArduPilot’s Bebop hardware definition (libraries/AP_HAL_Linux/hwdef/bebop/hwdef.dat), read 2026-10-03”A second independent source, for buses and pins. It agrees with the pin map and corrects some guesses in sections 1 to 8. [V reading of that file]
| Item | hwdef value | Relation to our notes |
|---|---|---|
| Motor board | I2C bus 1, address 0x08 |
matches /dev/i2c-1 and address 8 |
| IMU | Invensense on I2C bus 2, address 0x68, external sync enabled |
bus 2 settles the “bus 1 or 2” guess; sync fits the frame-sync line (fsync_gyro_p7) |
| Magnetometer | AK8963, I2C bus 1, address 0x0d |
NOT the 0x0C datasheet default used earlier |
| Barometer | MS5607, I2C bus 1, address 0x77 |
one of the two earlier candidates |
| Ultrasound | SPI device “bebop”, bus 1, device 0, 320 kHz | matches /dev/spidev1.0 |
| IMU heater | PWM 6, period 125000 ns, target 50 C (default 55 C) | matches thermal_pwm 6 and the 125000 ns in rcS_IO |
| Vertical camera clock | PWM 9 at 43333333 Hz | matches camera_v_mclk 9 and the 23 ns script period |
| Optical flow camera | /dev/video0, 320x240 capture, 64x64 output from a 240x240 crop, focal length from 2.21 mm and 3.6 um pixels with 2x binning |
matches the vision capture size in the camera notes |
| Battery monitor default | the Bebop type, which reads the motor board | explains the 10 Hz poll above |
The earlier sensor table (section 4) listed I2C addresses as datasheet defaults and flagged them as unverified; this replaces them for the IMU, magnetometer and barometer.
More from the same file (suggested by a peer’s full read; each line re-checked by me):
- Three I2C bus numbers appear: bus 0 (
HAL_RANGEFINDER_LIGHTWARE_I2C_BUS 0), bus 1 (motor board, magnetometer, barometer) and bus 2 (IMU). The bus-0 line only configures where an optional external Lightware rangefinder would sit; the board’s own rangefinder backend is the Bebop type, which reads the ultrasound through libiio (AP_RANGEFINDER_BEBOP_ENABLED). So it shows bus 0 exists in ArduPilot’s view, not that a device is fitted there. INVENSENSE_EXT_SYNC_ENABLE 1: the IMU’s external sync input is enabled, so something drives that pin. Open: what the source is. Inference only: the frame-start linefsync_gyro_p7and the “synchronize camera and IMU” comment inrcS_IOpoint at the camera.- Orientation traps, recorded as written and not composed: the IMU line carries
ROTATION_YAW_270; the magnetometer line carriesROTATION_NONEand a separateMAG_BOARD_ORIENTATION ROTATION_YAW_90also exists. They compose, so neither alone is “the” orientation. - Two temperatures, both by name:
HAL_IMU_TEMP_DEFAULT 55andHAL_LINUX_HEAT_TARGET_TEMP 50(a 5 C difference), next to the heater gainsHAL_LINUX_HEAT_KP 20000andHAL_LINUX_HEAT_KI 6. - The ultrasound SPI device declares 320 kHz for both its low and high speed, with
SPI_CS_KERNEL, so the driver was never given a faster mode. - User-area paths: ArduPilot’s log, terrain and storage directories are all under
/data/ftp/internal_000/ardupilot, andHAL_PARAM_DEFAULTS_PATHis/data/ftp/internal_000/ardupilot/bebop.parm. The firmware’s own50-arducopter.rcuses the samelogsandterrainpaths, so two sources agree thatinternal_000is the writable user area. Abebop.parmfile would exist there if ArduPilot had been installed and run on a unit. FTP in the image:etc/inetd.confserves/data/ftpon port 21,/updateon port 51 and/data/ftp/internal_000/flightplanson port 61. - Optics: focal length 2.21 mm, 3.6 um pixels with 2x binning, a 240x240 crop rescaled to 64x64 from the 320x240 capture.
- ArduPilot’s own
bldc_inforead and Disco variant are not used here.
11l. What the stock flight program sends the motor board (2026-10-03)
Section titled “11l. What the stock flight program sends the motor board (2026-10-03)”From an agent’s static analysis of dragon-prog (Ghidra read-only plus disassembly; notes dragonprog-motor-hal.md). Status tags: [V] re-checked by me,
[A] the agent’s reading, not re-derived.
| Item | Result | Status |
|---|---|---|
| Open | HAL_BLDC_open (0x45a45c) opens /dev/i2c-1, sets slave address 8 with I2C_SLAVE_FORCE, does a zero-byte probe write, sets the I2C timeout ioctl to 2 (20 ms), no retries |
A |
| Commands it sends | 0xA0, 0x80, 0x40, 0x02, 0x60, 0x20, 0x4D, 0x82; all of them appear as immediates in the HAL range 0x440000 to 0x460000 |
A, immediates V |
| Commands it never sends | 0x8D, 0x06, 0xFA, 0x2B, 0xC0, 0xE0. For 0x8D I found no mov, cmp or strb of the value 141 in that range, while each command it does send shows up there |
A, absence V in that range |
| Pad byte (frame byte 9) | always 0: HAL_BLDC_set_ref_speed (0x444934) has one caller (0x45b82c); its second stack argument is stored at frame byte 9 (strb ..., [r0, #9] at 0x444a0c); at the call that argument is r6, set to 0 at 0x45b644, the call block’s only predecessor is the beq at 0x45b660, and nothing writes r6 between them |
V |
| Speed assertion | the HAL asserts each speed is at or below 16000 (compare against 16000 at 0x444974 and following) |
V seen |
| Poll form | [20][01], a 2-byte request with a 19-byte reply (three bytes per motor), not the host tool’s and ArduPilot’s 1-byte request and 15-byte reply. The board’s side of this form was found independently in the PSOC analysis (bldc-cyacd.md section 2) |
A, corroborated by a second analysis |
| Threads and rate | speed command from ACQCON_colibry_Thread_Handler (0x4e12c), poll from ACQON_hal_Thread_handler (0x4db24), separate calls, once per acquisition; the period is data (a configured frequency or a data-ready fd), not a constant; if no sample arrives for 100 ms nothing is sent. About 198 Hz is an inference, not shown |
A |
| Reads from the reply | status, error number, motor mask, temperature, battery | A |
| Reaction to errors in the HAL | error 6 is auto-cleared with 0x80; start is refused on any non-zero error, on status 6, or when the temperature is above 79; every error change is forwarded as an app alert and a blackbox log; the HAL itself raises error 4 after more than 199 consecutive failed cycles. No stop or landing was found at any HAL error site |
A |
| What the flight layer does with motor errors | UNKNOWN: the consumers of the HAL result were not traced | open |
| Start and version | 0x80 then 0x40; the version check needs 4 motors and a tag letter R or D; major and minor are only printed, never compared |
A |
| Shutdown | the orderly shutdown (0x4f468) sends one 0x60 stop; if the process dies without running it, nothing is sent |
A |
| Motor class | milos, mykonos3 and loki all use the BLDC-over-I2C driver; the PWM driver is chimera only. This answers the open question in 11e | A |
RESET_PSOC |
no code reference in dragon-prog (see the correction in 11j) |
V |
What this adds up to (INFERENCE, stated as such): the flight program never sets the board’s I2C timeout, so the board runs on its power-up default of 1024 ticks. The flight program sends the board a stop only in an orderly shutdown. If it dies or hangs without running that, then as far as these analyses show nothing tells the board to stop except the board’s own I2C-loss watchdog, which is armed only in closed loop and whose expiry is swallowed while an error 8 or 9 is latched (11g, refined in 11m). Other system watchdogs or reboot paths were not examined. So the tick length decides how long the motors would keep running after a flight-program death: about a second if a tick is 1 ms, unknown otherwise.
Speed ceilings, in one place: the flight configuration’s motorsRpmMax is 12200 for the milos sets (ArduPilot agrees with 11000 and 12200 per board), the board clamps each
speed to 15000 (0x3A98, verified at 0x2054 to 0x2065), the flight HAL asserts at most 16000, and the host test tool bounds its argument at 16000. Only the board’s own clamp bounds what
the board will accept (about 23 percent above what flight asks for), so anyone writing to the board directly has that headroom. [V for the board clamp and the HAL compare]
11m. Review of the watchdog hazard claim, and the tick experiment (2026-10-03)
Section titled “11m. Review of the watchdog hazard claim, and the tick experiment (2026-10-03)”A peer asked which parts of the “a latched error swallows the I2C-loss watchdog” statement were read and which reasoned, and pointed out a problem with the tick experiment they had proposed. I re-read the board code for both. Everything below is from the Bebop 2 image (flat image addresses); no hardware was touched.
Which parts are read (all [V], disassembly re-read by me):
- The raise rule
0x572e: it loads the current error number (xdata 2), subtracts the new one and skips unless the current is strictly smaller. So a new error 4 cannot replace any latched error of 4 or higher. - The closed-loop routine leaves the loop only when the stop-request byte (xdata 3) is non-zero or the error number is 2 to 5. Errors 6 and above do not leave it.
- The watchdog
0x541fis called once per loop iteration at0x4a74. On expiry (countdown 0) it calls the raise routine with 4 and returns WITHOUT reloading the countdown; so it retries on every later iteration. - Error 9 clears itself inside the same loop: at
0x4a61to0x4a73, if the error is 9 and the 16-bit counter at xdata0x94:0x95is above0x40, the error byte is set to 0, and the watchdog call follows immediately. What that counter measures (the battery excursion) is the earlier agent’s reading, not mine. - The start command (
0x40, handler0x219c) is ignored unless the error number is 0 and the state is idle (state byte = 1).
Which parts are reasoned or agent-read: how error 8 clears (the earlier agent’s reading: at the next in-window temperature sample; I read the routine that raises it, not the clearing), and that error 6 is raised only at power-up (agent-read). Combining them:
- The claim as I first wrote it (“swallowed by a latched 6, 8 or 9”, then “indefinitely”) was too strong. Error 6 cannot be latched during closed loop: it is raised at power-up and start is refused while any error is set. Errors 10 and 11 are likewise power-up and idle-state errors. That leaves 8 and 9 as the two errors that can be latched while the motors are in closed loop (2, 3 and 5 leave the loop).
- While 8 or 9 is latched, a watchdog expiry cannot raise 4 and the loop keeps running. When the condition clears (9 by the rule above, 8 by the agent-read rule), the next iteration’s watchdog call raises 4, because the countdown is still 0, and the loop leaves. So the suppression lasts exactly as long as the latched condition, not forever. How long that is on a real aircraft (an over-temperature while spinning, a battery pushed out of bounds by load) is not known. This sits above the tick length in importance: the tick length only matters if the watchdog fires at all, and for these two errors it is held off.
- What the stock flight program does when it reads error 8 or 9 is still unknown (11l: the HAL forwards an alert; no stop was found). While the flight program is alive and polling it also feeds the watchdog anyway, so this scenario matters only for a dead or hung flight program.
The tick experiment, recorded as a design fault, not a caveat (a peer’s point, and I agree): the proposal was to stop feeding the board for a known interval and then
read the error byte. With the flight program stopped, that deliberately creates the one state in which the board’s watchdog is the only thing that stops the motors,
using a timeout whose length is the unknown being measured, so the attractive version is the unsafe one. The safer version, entering the silent window from verified
stopped motors, cannot measure anything: the countdown is only decremented by the watchdog routine, which has a single call site in the closed-loop routine, so with
the board idle the countdown does not run. I scanned the whole application for other accesses to idata 0x08 to 0x0b; the apparent hits at 0x356c, 0x3f7a,
0x4026, 0x2215, 0x231e and all those past 0x5de3 are data or operand and immediate bytes inside other instructions, none is an access to the countdown, and no
instruction switches register banks (every interrupt routine writes the processor status word 0xd0 as 0 on entry). The only way to time the watchdog would be to
run it with the motors in closed loop, that is spinning. NOT recommended and not done. The remaining static route to the tick length is the board’s clock
configuration, which the update file does not contain (11k).
Saturation flag (a peer’s reading of ArduPilot, which I checked on the board side): in the observed-data handler (0x2088) each motor’s high speed byte is
OR-ed with a flag bit moved to bit 7 (swap a, three rlc a, anl a,#0x80, orl a,r7 at 0x20ba to 0x20c4, flag taken from xdata 0x8b + k). Because the speed is
clamped to 15000, which fits in 14 bits, bit 7 of that byte is free. ArduPilot tests that bit before the byte swap and clears it before converting
(RCOutput_Bebop.cpp:43-46), which agrees. A reader that swaps first and masks nothing sees a saturated speed about 32768 too high. The peer’s guess that the
19-byte form’s third byte per motor carries saturation or status is not supported by the earlier PSOC analysis, which reads that byte as the low byte of the duty
(xdata 0x81 + 2k) [A]; the flag is already in bit 7 of the first byte in both forms. ArduPilot’s short poll form is read_registers(BEBOP_BLDC_GETOBSDATA (command 0x20), RCOutput_Bebop.cpp:185, which reads the
15-byte observed-data struct, so it confirms the 1-byte-request form independently. (Citation corrected after a peer’s review: I first attached this to 0xA0; the 0xA0
read, RCOutput_Bebop.cpp:155, fills a separate bldc_info struct, which a peer reads as carrying the flight counters and last error, consistent with the
counters living on the board.)
Addendum, 2026-10-03, after a peer asked how error 8 clears (the question matters because it decides whether error 8 can hold itself latched):
- Error 8 clear rule, read by me in
0x46fdto0x4733: when the sample is inside the window (temperature above -10 C and below 95 C) and the error byte is 8, the error byte is set to 0. The two further compares after that (against 90 C and -4 C) cannot change the outcome as far as I can tell from the arithmetic (the second can only be reached when the temperature is at least 90 C, where it never borrows), so there is no hysteresis, counter or timer on this error: it clears at the first in-window sample. If I mis-decoded a carry there, the rule is at most stricter, never looser. The sampling interval (once per 1000 ticks) is the earlier agent’s reading. - Error 9, which I earlier described as bounded by an internal counter, is a debounce, not a time bound. The battery routine (
0x4991, called from three places) reads the ADC and converts it to decivolts; in bounds (88 to 134, that is 8.8 V to 13.4 V) it adds 1 to the 16-bit counter at xdata0x94:0x95up to 128; out of bounds it subtracts 1, and when the counter is already 0 it raises error 9. The counter is set to 128 at start-up (0x4070to0x4077). Error 9 clears once the counter exceeds 64 (the closed-loop check at0x4a64), that is after about 65 in-bounds calls. So 9 needs roughly 128 consecutive out-of-bounds calls to latch and about 65 in-bounds calls to clear, and stays latched for as long as the voltage stays out of bounds. - So for both 8 and 9 the duration of the suppression is set by the physical condition, not by any internal clock. There is no logic that holds either one latched on its own. Whether a stuck state can arise from the physics is a question nobody has evidence on: for 8 the temperature is read from the board’s own die (the earlier agent’s reading; the host tool’s settings call it the Cypress die temperature), and whether the die would stay at or above 95 C with the motors at a fixed setpoint depends on dissipation and airflow; for 9 a pack sagging below 8.8 V under load may not recover while the motors keep running. Both are conditional on a dead or hung flight program. This is recorded as a question about the physics, not a finding about the firmware. The firmware reading that decides the premise (what the flight program does when it reads error 8 or 9) is still open (11l).
Enumeration of the suppressing set, completed 2026-10-03 (a peer’s request; all [V] by me unless marked):
- The raise routines are
0x572eand a variant0x5712that also stores a detail byte. Call sites of0x572e:0x385d(error 1),0x3a82(error 1, agent-read),0x4711(8),0x49d7(9),0x5211(9),0x5430(4, the watchdog),0x5790(6). Call sites of0x5712:0x28e0(3),0x3361(11),0x51fe(10). I found no site for 7, 12 or 13, which agrees with the earlier agent. - Errors 10 and 11 cannot be raised in closed loop. The routines that raise them (
0x51e0for 10,0x3203for 11) each have one caller, in a start-up routine at0x4be9that runs the fixed sequence error-1 check (0x3991), error-6 flag check (0x577f), battery check (0x4991), cell count (0x51e0), selftest (0x3203) and returns. That routine has a single call site,0x56d8, in the main routine before its loop; closed loop is a separate routine entered from inside that loop (0x56ec). So errors 1, 6, 10 and 11 come from start-up, once. The second raise site for 9 (0x5211) sits in the cell-count routine’s neighbourhood, so it is a start-up check as well (agent-read). - Error 11 from the fault interrupt: the routine at
0x3aa3reads the fault status register0x646b; if non-zero it reads the state byte (xdata 0): state 5 is ignored, state 0 raises 11, any other state raises 5 (0x3ad9to0x3aec); if0x646bis zero and the monitor flag (xdata0x8f) is set, bits in0x646fraise 2 in every state except 5. So in closed loop (state 4) a motor fault raises error 5 and error 2, both of which exit the loop. The asymmetry noted by the peer (stalled exits, motor hardware does not) is therefore about state, not about treatment: 11 is the state-0 name for the same fault bits that raise 5 everywhere else. - Result: while the motors are in closed loop, the only errors that can sit latched without leaving the loop are 8 and 9. The suppressing set reduces to those two, and the question that remains is physical (above) and about what the flight program does on 8 or 9 (11l).
- The error byte is a ratchet, as the peer observed: a raise only replaces a smaller number (
0x572e,0x5712), and the clear tests are tied to the byte’s own value (error 8’s clear is guarded by a compare against 8 at0x4719, error 9’s by a compare against 9 at0x4a61). So after an 8 followed by a 9 the byte holds 9, and cooling does not clear it; only the battery counter rule does. Reasoning about one error’s duration in isolation holds only if no higher error intervenes. - Which of 8 and 9 is the stronger hold is a physical judgement, not a firmware fact: the peer argues that 9 is the more certain one because a pack under continuous load does not recover, while a die can plausibly settle below 95 C. That is reasonable, depends on the flight program being dead and the pack being near empty (8.8 V on three cells is about 2.93 V per cell), and has no measurement behind it, so I record it as reasoning.
Stop and read-back, a peer’s gap checked in dragon-prog (2026-10-03):
- ArduPilot’s stop is one bare byte (
0x60,_stop_prop,RCOutput_Bebop.cpp:242-250), with no checksum and no return-value check, and it reconciles its own state from the board’s reported status inread_obs_data(:217-221), so at about 10 Hz a stop that did not take is noticed. [V, a peer’s reading, matching what I saw of the file] - The stock program’s orderly shutdown (
0x4f468) sets a command type of 2 (stop) in the HAL context and callsHAL_send_motor_command(0x43d060) once; the HAL’s own write path then calls the stop function (0x444710, the0x60frame) at0x45b7d4and tests its return value against 1, taking an error path otherwise (a string names the failure, “error from HAL_BLDC_stop_motors()”). So an I2C-level failure of the stop write is detected and logged, unlike ArduPilot’s. [V for the call, the compare and the string; the log text belongs to the earlier agent’s read of that path] - After that the shutdown calls a routine (
0x4403c0) that only broadcasts and destroys condition variables and mutexes, then deletes the threads. No status poll,0x20or0xA0read, appears in the shutdown function or in that cleanup routine. What0x43d060itself does after the stop (whether it reads status inside) was not traced, so “no read-back at shutdown” is shown for the shutdown function and its cleanup call, not for everything under0x43d060. [V for what I read, open for the rest] - In normal operation the stock program does track a stop to completion: the HAL carries start and stop progress codes in its per-sample result and re-reads the board’s info once a stop completes (earlier agent notes). So a stop during flight is verified by the following polls; the shutdown stop is the case with no following poll in the code that was read.
- So: the board either acted on that last
0x60or not, and the shutdown path as read does not look. The orderly case and the process-death case then differ by one stop frame whose effect nothing checks, a smaller difference than the word “orderly” suggests. The rule for anything that writes to the board directly, a peer’s wording: a stop is not complete until status reads back as stopped, and the read-back has to happen before the writer exits. This applies to direct-to-board writers (motor tests, an ArduPilot-style replacement); themcbebopserver speaks only to the flight program over the network and never touches I2C, so none of the board-level findings in 11g to 11m is a hazard of that package.
Stop at shutdown, second pass (a peer’s follow-up, 2026-10-03). Two layers, kept apart: the TRANSMISSION of the last stop is verified by the stock program (it tests the write’s return against 1),
the EFFECT (that the board actually left closed loop) is verified by nothing at exit. And the transmission check changes no behaviour at exit. The failure branch (0x45b8f4 to 0x45b91c) sets a
link-failed flag byte in the HAL context, stores stop-progress code 3, loads -4 as the return value and jumps to the common epilogue: no retry, no abort of teardown, nothing sent. The shutdown function
(0x4f468) then does not test the return of the call that led there: the instructions after bl 0x43d060 only compare the log level. [V; that the return value of the lower write function reaches
the return of 0x43d060 unchanged was not traced.] In normal operation the flag and the progress code feed the next cycle (the HAL counts consecutive failed cycles and raises its own error 4 after
more than 199, and the stop progress is visible in the result node), but at exit there is no next cycle. So the detection is useful for a log line when the log level allows it, and for nothing else at the
moment it matters. The general shape, a peer’s wording and worth keeping: the machinery to verify a stop exists and is used everywhere except the exit path, which is where the process is about to stop caring.
Lesson from the ledger sweep (2026-10-03). A narrated read of the live ledger found an old Open row for gpio199 contradicting a newer Verified row, the second surface (after two public pages) where one
correction had not arrived. A deliberate pass over the whole ledger against the current notes then found more: a Verified row that still said an error 6 could suppress the watchdog (it cannot be latched in
closed loop), an over-temperature clear rule still marked agent-cited after I had read it, a poll claim still Open after both exits were checked, a motor-class question still listed Open after it was
answered, a 0x8D question that had been partly answered, and nine verified findings from the last days that had no ledger row at all. All corrected in the public ledger and the story. Process
rule from this: when a finding changes, search for its subject (address, error number, GPIO, command byte) across the notes, the ledger, the story and the reference pages before calling it recorded, and do
the same sweep on the ledger as a whole after any batch of new findings. The ledger can contradict itself quietly, and a reader who reaches the stale row first cannot know.
Basis tags on the ledger (2026-10-03, after a peer’s point that a Verified row records that someone checked, not what against). With Ryan’s yes, the public ledger now carries, inside the Evidence cell
of some motor-board rows, id: name for a row others depend on and basis: a, b for the rows it depends on (14 ids, all bases resolve). I first proposed tagging rows with notes sections such as “[11g]”;
that would have pointed readers at notes the public site does not publish, so the tags name rows on the page itself. Meaning of a tag, from a peer’s review: a basis says “this row’s truth depends on that row, look there when either changes”. It does NOT say the named row is the source of record, and the
ledger is not authoritative over the notes either (the camera addresses were firmer in the ledger than in the notes); when two disagree, the files decide. Scope rule, stated as the rule: a basis goes only on
rows whose truth depends on a derived finding, never on rows resting on a single file read, because for those the file is the check. Tags that are inline are updated by whoever edits the row, which is why
they are not kept in a separate file. The ids are names, not numbers, so renumbering sections or rows cannot dangle them; do not turn them into positional labels. Maintenance rule: when a row changes, search the ledger for its id and recheck the rows
that list it as a basis; give every new row that rests on another row a basis:. Only the motor-board chain is tagged; the other groups are not, and no row outside that group should be assumed to have its
dependencies recorded. The start-gate row (start ignored unless the error is 0 and the state idle) was added because the watchdog-suppression row depends on it and it had no row of its own.
Enforcing the tags (2026-10-03, after a peer pointed out my first resolution check was a one-off and so had the same weakness as an unmaintained side file). Two changes. (1) The check is now a build
check, docs-site/scripts/check-ledger.mjs, with a registry of every published id (docs-site/scripts/ledger-ids.txt): it fails on a mistyped or missing basis, a duplicate id, a cycle, a self-reference,
an id on the page that is not registered, and a registered id that has gone missing. I tested it on the real ledger and on six deliberate breakages. The docs-site session has since wired it in (commit 86de0f4:
“build”: node scripts/check-ledger.mjs && astro build), so it runs on every build, including the production image build on dell01, where a failed check makes the deploy fail and leaves the running container in
place; before that it was a script someone had to remember, and I had said so. The failing path was tested on 2026-10-04 without touching the live ledger or dell01, in two separate pieces because they are two separate mechanisms. (1) From a scratch copy of docs-site with one real table row’s basis pointed at a nonexistent id, docker build --target production under a throwaway tag exited 1 at pnpm build with the checker’s message, and produced no image. (2) In a throwaway compose project, up -d --build with a failing build step exited 1 and left the previously running container untouched (same id, same start time). Together these support “a failed check makes the deploy fail and leaves the running container in place” for the make deploy sequence (docker compose up -d --build docs ...). Not tested: the ssh and git reset --hard steps on dell01, and the real service’s own compose file. A first attempt at (1) was invalid and is worth recording: the regex picked the example basis: x in the intro paragraph, which the checker ignores by design, so the build passed and proved nothing until the edit was retargeted at a table row. (2) Ids are permanent: add freely, register in the same change,
never rename; a row whose meaning drifts gets a new id, and a withdrawn row is marked retired <id> in the registry, after which the id may not return. A side effect worth keeping as a reason to name rows
rather than anything external: a finding that others depend on must have a row of its own to be named, which is how the missing start-gate row was found. The scheme pulls the ledger toward completeness.
Limits of the checker, stated beside the dated intro line (a peer’s scoping notes): a pass means the dependency graph is well-formed, not that it is correct; whether a row truly depends on the rows it names is a
judgement the script cannot make. And a missing basis cannot be detected: a row that should declare one and does not looks identical to a row that correctly has none, so the original failure (a Verified row going
stale because something underneath it moved) is still reachable for any row whose dependency was never declared. The tags reduce that problem for the motor-board chain; they do not close it. Both limits are in the script’s
output and header and in the ledger intro. A suggested advisory warning for untagged rows in the annotated chain is NOT implemented: naively it would flag every single-file-read row and become noise. A better form is to let
a row declare basis: none (rests on one file read) so that “undeclared” and “declared none” differ, then warn only on undeclared rows; that needs about twenty rows retrofitted and changes how Ryan’s page reads, so it is waiting on his word. Residue (bebop-main): a basis: none can itself go stale if a row that rested on one file read later comes to depend on a derived finding and nobody revisits the declaration; same class as the missing-basis problem, moved not removed, but the set that can be wrong shrinks to rows whose nature changed after declaration.
Method note: a scan that finds nothing is worth nothing until it finds something known to exist. The RESET_PSOC correction (11j) rests on the same scan finding two
references to the FAN path as a control; this section’s scan for countdown accesses was checked by looking at every hit.
12. Next Steps
Section titled “12. Next Steps”-
Motor Controller Deep Dive (priority: HIGH)
- Reverse Cypress PSOC firmware if accessible
- Determine CRC algorithm
- Map commutation strategy
-
Colibry Sensor Fusion (priority: HIGH)
- Locate libColibry.so symbol exports
- Infer Kalman filter structure from Condor integration points
- Estimate process/measurement covariances
-
Flight Control Law (priority: MEDIUM)
- Extract PID gains from firmware
- Measure attitude response to setpoint step
- Characterize cross-coupling between axes
-
Camera ISP Pipeline (priority: LOW)
- Document DxO2a processing stages
- Measure optical flow accuracy vs height
- Understand carpet detection magic
11n. What the stock flight layer does on board errors 8 and 9 (2026-10-04, Agent-cited)
Section titled “11n. What the stock flight layer does on board errors 8 and 9 (2026-10-04, Agent-cited)”Question left open by 11m: when the PSOC reports error 8 or 9, does dragon-prog stop the motors? A static read (full report: dragonprog-error-consumers.md, same folder) found, for the direct readers of the HAL result: in flight, errors 8 and 9 are forwarded as an app alert (MotorErrorStateChanged) and a blackbox record, and no stop, landing or retry was found for them. The state machine reads five words of the HAL result; the “motors spinning” word clears only on errno 2 to 5 or a board status other than 3 or 4, so 8 and 9 leave it set. Errors 2 to 5 (and the HAL’s own synthetic errno 4 after more than 199 failed polls) clear it and lead every flying state to the Emergency state, whose entry writes the stop command type. At takeoff, an error still present after the clear-error command refuses the start, and a refused start with idle motors also leads to Emergency, so a latched 8 or 9 at takeoff can abort the takeoff.
Verified by me: the two helper routines that make the 2 to 5 distinction (0x444800, 0x45aab0). Everything else is the agent’s, with its own Verified, Inference and Open tags kept in the report. Not enumerated, and stated as limits and not as findings: whole-structure copies of the HAL sample, other processes, what posts FSM events 46 and 47, and whether the board status can change while 8 or 9 is latched (which would send the flight layer to Emergency for a reason unrelated to the error number). The decision logic is hard-coded; no key under etc/colibry mentions motor errors.
Scan discipline: the agent’s search for readers of the spinning word found all 23 sites, which also served as its positive control, and a separate scan found the one sensor process that takes the BLDC result.
11n addendum: can the board leave closed loop while 8 or 9 is latched? (2026-10-04, Verified by re-read)
Section titled “11n addendum: can the board leave closed loop while 8 or 9 is latched? (2026-10-04, Verified by re-read)”bebop-main argued, from the exit test alone, that the escape hatch for the flight layer (the spinning word clearing because the board status changes) cannot fire while an 8 or 9 is latched, and flagged that this depends on the exit test being the only way out. I checked that on the flat image. (1) The closed-loop routine is 0x4a47 to 0x4a9d. It has exactly one ret, at 0x4a9d, and no branch leaves the body. The only branches to that ret are the two tests at 0x4a4f/0x4a5c and 0x4a80/0x4a8d: stop-request byte (xdata 3) non-zero, or error number 2 to 5. Its callees (0x541f, 0x26c4, 0x3e28, 0x49ef, 0x4dee) do not contain a write to the state byte. (2) The state byte is xdata 0. Written by literal page-zero or DPTR-zero addressing, it has six writers in the whole image, interrupt routines included: state 2 in 0x23b5, state 5 in 0x386e, state 1 in 0x4651, state 4 at the entry of the closed-loop routine itself, state 6 in 0x5765 (one caller, 0x4c30, in the start-up region), and the zero clear at 0x4be9. The first three are called only from the main routine, in sequence (0x56db, 0x56de, 0x56ef), with the closed-loop routine at 0x56ec between them. The fault interrupt at 0x3aa3 reads the state byte and does not write it. So in this image the state byte leaves 4 only when the closed-loop routine returns, which needs a stop request or error 2 to 5. Limits: addressing built from a computed register (an R0 or DPTR loaded from something other than a literal zero) was not searched; and that the status byte in the poll reply is this same state byte comes from earlier notes and was not re-read here. Stated that way, the escape hatch cannot fire by itself while 8 or 9 is latched.
What the two layers share, as a plain observation: the board leaves closed loop for errors 2 to 5, and the flight layer goes to Emergency for errors 2 to 5, and neither set contains 8 or 9. Whether the two sets agree by design or by coincidence is not known from the images (the flight layer’s constants may well have been written from the board’s documented set), so the words “independently” and “built from the same idea” are inference and are not recorded as findings.
What bounds it, as first written and as narrowed. First written: a latched 8 or 9 at takeoff refuses the start and a refused start with idle motors goes to Emergency, so only an error arising during a flight matters. That reassurance is withdrawn as a bound: addendum 2 and addendum 3 show the takeoff gate is leaky (the clear-error command precedes every start, and the board re-evaluates the error on its own schedule), so a unit already in the condition on the ground is not excluded. The gate is a partial interlock whose width differs by error (addendum 3), not a guarantee. And there are two cases with different readers. Flight program alive: error 8 or 9 is alerted and logged and nothing else happens, so the aircraft keeps flying and the decision is the pilot’s. Flight program dead: the same latched error holds off the board’s own I2C-loss watchdog for as long as the condition lasts. Physical meaning, from 11m and not from this addendum: error 8 is the board’s own die temperature (95 C or above, or at or below -10 C), not a motor temperature; error 9 is the battery voltage out of 8.8 V to 13.4 V, high or low, debounced over about 128 consecutive samples. The first case needs no dead program, so it is the one more likely to be met.
11n addendum 2: the reachable directions of errors 8 and 9, and why “a cold aircraft will not take off” is not yet a finding (2026-10-04)
Section titled “11n addendum 2: the reachable directions of errors 8 and 9, and why “a cold aircraft will not take off” is not yet a finding (2026-10-04)”From bebop-main, with the premises stated. Error 9, high side: the window is 8.8 V to 13.4 V (11m, Verified) and the board is 3S only (hard-coded, ledger). 13.4 V on three cells is about 4.47 V per cell, above a charged lithium cell’s 4.2 V, so a correct 3S pack cannot cross the upper bound at any state of charge. This is arithmetic from the stated 3S premise plus general cell chemistry, and not a firmware finding. The direction reachable in flight is the low one, mostly through voltage sag under load; the high side would need a wrong pack, which is the territory of error 10’s cell-count self-test. Error 8, cold side: a die at or below -10 C is an ordinary winter condition for an aircraft left outside, so that side is physically reachable and nobody had said so.
What the images do and do not support about a cold start. Supported (Verified, this session): temperature is sampled by 0x46ca, called only from the common housekeeping routine 0x4dee (call at 0x4e22), which counts a 16-bit down-counter at xdata 0xa4:0xa5 (reload 0x03e8, 1000) and samples when it reaches zero, so about once per 1000 calls and not gated by state. 0x4dee is called from seven places; three of them I placed: the idle routine (0x4651, call at 0x46b1), the closed loop (0x4a98) and the fatal loop (0x5779); the other four (0x26af, 0x2eb7, 0x3907, 0x3956) were not placed in a routine. So sampling happens in idle, and error 8 can latch while the aircraft sits on the ground. The board ignores a start unless the error number is 0 (11m), and the flight program refuses a start while its cached error is non-zero (the agent’s read, 11n).
Not supported: the sentence “a cold-soaked aircraft will not take off until it warms up”. The flight program sends clear-error (0x80) before every start, and the board then re-samples only about once per 1000 housekeeping calls (tick length unknown, so wall time unknown). Between the clear and the next sample the error number is 0 and a start can be accepted; if the die is still at or below -10 C the next sample re-raises 8 and, as shown in the previous addendum, 8 does not leave closed loop, so the outcome would be a takeoff with an error 8 latched and an alert only. Which of the two happens, refusal or a start that then latches, depends on timing the static read cannot give, and on whether the flight program’s cached error is refreshed between the clear and its start check (not established). The die also self-heats once powered, which shortens any cold window by an amount nobody has measured. So: predicted, not observed; the premises are above; the cheap way to settle it is a cold-soak observation, which is not done and needs Ryan’s say-so. What the owner would see (a motor error alert with no temperature in it) rests on the alert carrying only the motor mask and error number (agent-read) and on how the app words it (not read); Open.
11n addendum 3: what the clear-error command resets, and how wide the takeoff window is for error 9 (2026-10-04, Verified by re-read)
Section titled “11n addendum 3: what the clear-error command resets, and how wide the takeoff window is for error 9 (2026-10-04, Verified by re-read)”Question from bebop-main: does clear-error reset the battery debounce counter (xdata 0x94:0x95), or only the error byte? Read of the handler at 0x21d3 and of every access to the counter. Handler: it refuses when the error number is 10 or 11 (0x21d7 to 0x21df) and when the state byte is 6 (0x21e4 to 0x21e9); otherwise it zeroes the error number (xdata 2), zeroes xdata 0x89 (the fault byte) and xdata 0x98, and sets the stop-request byte (xdata 3) to 1. It does not write 0x94 or 0x95. The only writes to the counter pair found by literal addressing are the start-up initialisation to 0x0080 (0x4070 to 0x4077) and the update inside the battery routine (0x49dc to 0x49e3); the closed loop only reads it (0x4a65). So clear-error leaves the counter where it was. Not searched: writes through a computed address (same limit as the state byte), and one stray mov r1,#0x94 at 0x33d7 that sets up an argument for a library call and has no store beside it.
Consequence for error 9. The battery routine runs on every housekeeping call (0x4e16), not once per 1000. A pack that has stayed out of bounds has driven the counter to 0, and error 9 is raised when an out-of-bounds sample finds it already at 0. After clear-error the counter is still 0, so the next out-of-bounds sample raises 9 again. The window in which the error reads 0 is therefore about one housekeeping call wide for a persistently bad pack, against up to 1000 calls for error 8, which has no counter (11m). So the interlock for error 9 is much tighter than for error 8; whether one call is shorter than the gap between the clear command and the start command is not known (call duration and I2C latency are not measured). The alternative bebop-main raised, that clear-error resets the counter to 128 and so lets a flat pack always start and latch about 128 samples later, is refuted for this image. A pack that only sagged and recovered is different: its counter sits somewhere above 0 and no raise happens until it counts down again, which is the debounce doing its job.
A separate observation from the same read, tagged Inference because of its concurrency premise. The stop-request byte, xdata 3, is the byte the closed-loop routine tests to leave the loop (11m). It is written by: the start handler 0x219c (set to 0 when the error number is 0 and the state is idle, at 0x21b0), the stop handler (0x21cf, set to 1), the clear-error handler (0x21f8, set to 1), the idle routine (0x46b0, cleared) and three other sites (0x32e9, 0x3b73, 0x4bf9, all set to 1; their roles were not read). Clear-error refuses only errors 10 and 11 and state 6, so it is accepted in closed loop, and it sets the stop request. If command handlers run while the closed loop runs, a clear-error received during flight would stop the motors, the same as the stop command does. The closed-loop routine itself never writes xdata 3, so its exit test only makes sense if another context sets it, which supports concurrent handlers, but the dispatch mechanism (interrupt or main loop) was not read. Per the agent’s read the flight program sends clear-error only before a start, so this is a property of the board and not something the stock flight layer does in flight.
11n addendum 4: ArduPilot’s use of clear-error, and the two errors on two axes (2026-10-04)
Section titled “11n addendum 4: ArduPilot’s use of clear-error, and the two errors on two axes (2026-10-04)”ArduPilot witness for the clear-error inference (call sites Verified in libraries/AP_HAL_Linux/RCOutput_Bebop.cpp, commit 4c98c92, re-read for this note). There are two: _clear_error() at line 351, during initialisation right after the control thread is created and with the motors not running, and at line 537, inside the output loop, reached only when one motor’s PWM is at or under minimum while the state is started, where _stop_prop() is called first and _clear_error() immediately after. So ArduPilot’s order is stop then clear in every case and it never sends clear-error while intending the motors to keep turning. That is consistent with the inference that clear-error sets the stop-request byte, but it is not evidence for it: it is the order one would write knowing the command is only safe when stopped, and also the order one would write by accident, and in either case a redundant stop would never have shown up as a bug. Nobody is known to exercise the dangerous case, which is a reason to document it, not a reason to doubt it. For anyone writing directly to the board: a command named clear error reads as diagnostic, and on this board it may also be a stop. It belongs with the other cases where the board accepts something stock software never asks of it, next to the 15000-versus-12200 speed clamp in the direct-writer cautions.
Two errors, two axes, opposite answers; do not rank them on one. Takeoff gate (addenda 2 and 3): error 9 is tight, about one housekeeping call, because its counter survives the clear and is already 0 on a persistently bad pack; error 8 is leaky, up to about 1000 calls, because it has no counter. Locking once latched in flight (11m, plus physical reasoning that is Inference): error 9 tends to hold, since a pack that is out of bounds under load tends to stay out of bounds while the motors keep drawing current, and it needs about 65 in-bounds samples to clear; terminal voltage rises when load drops, so “cannot clear itself” would be too strong. Error 8 is the weaker lock, since it clears at the first in-window sample and a die can cool. Someone who read only the locking analysis would rank them backwards for the takeoff question, and the reverse.
Which case each locking statement applies to (a scope limit from bebop-main, Inference). With the flight program alive, throttle varies, so terminal voltage recovers when load drops back to hover, about 65 in-bounds samples can unlatch error 9, and the pilot sees alerts come and go: soft, nuisance-grade. With the flight program dead and the watchdog held off by the latched error, no new setpoints arrive, so the closed loop keeps running the last commanded speeds and there is no setpoint-driven throttle variation to recover from; terminal voltage then falls with depletion, and holding speed against a falling bus draws more current. There the setpoint-driven recovery path is closed. This rests on two things already read: that the closed loop keeps running the last commanded speeds, and that a dead program sends no further frames; if either is wrong the argument goes. One narrowing to its wording: load can still change without a setpoint, through airflow over the propellers as the aircraft moves and through ground contact, so what is closed is the setpoint-driven recovery path and not every recovery path. That narrowing changes the dead case from firm to indeterminate, and it is where this stops. For the dead case the question is whether any path can unlatch 9, not which path is usual, and the other paths pull in opposite directions. A frozen setpoint does not hold altitude, and a descent unloads the propellers, which would cut current draw and could raise terminal voltage enough to unlatch 9, after which the expired countdown raises error 4 on the next iteration and the motors stop. Ground contact does the reverse: it loads the propellers harder and deepens the sag. The same uncontrolled dynamics that make the scenario dangerous might end it or might entrench it, depending on aerodynamics that cannot be derived from a firmware image, so the dead case is recorded as indeterminate with both directions named, and no locking comparison is claimed for it. The statement that survives without the comparison: neither layer stops the motors for error 8 or 9; with the flight program alive that means an alert and the pilot’s judgement; with it dead, the board’s own watchdog is held off for as long as the condition persists, and how long that is cannot be determined statically.
The refuted alternative stays in the record because it closes the obvious wrong guess: clear-error does not reset the battery counter to 128 (addendum 3).
Last Updated: 2026-10-01
Next Review: After hardware power-on testing
Comments
Spotted a mistake, or tried this on your own Bebop? Leave a note. Comments are kept on this site's own server.