Skip to content

Skycontroller mapping files

This page describes the input mapping files read by mppd in the Skycontroller image we examined. Paths are relative to the root of that image’s extracted root filesystem. That image is not the Skycontroller 2’s firmware: its own library decodes the model id it sets, 0x0913, as SKYCTRL_NG, and the Skycontroller 2 is 0x090f. Read this page as the mapping for that image, and do not assume it applies to the Skycontroller 2. The narrative of how the image was examined is at /story/firmware-adventure/. Related pages: /reference/firmware-images/, /reference/evidence-ledger/.

Status legend

Status Meaning
Verified The file or bytes were read and the value checked directly.
Agent-cited Taken from a note and not re-checked.
Open Not established.
Path Status
etc/mppd/drone_manager.cfg Verified
etc/mppd/bebop/mapping_anafi4k.cfg Verified
etc/mppd/bebop/mapping_bebop_2.cfg Verified
etc/mppd/bebop/mapping_bebop.cfg Verified
etc/mppd/bebop/mapping_chimera.cfg Verified
etc/mppd/bebop/mapping_disco.cfg Verified
etc/mppd/milos/mapping_anafi4k.cfg Verified
etc/mppd/milos/mapping_bebop_2.cfg Verified
etc/mppd/milos/mapping_bebop.cfg Verified
etc/mppd/milos/mapping_chimera.cfg Verified
etc/mppd/milos/mapping_disco.cfg Verified

The only content of drone_manager.cfg is known_drones = ( );. The strings known_drones and cannot find 'known_drones' node in cfg file are present in usr/bin/mppd.

The format is libconfig style. Each file has one root group mapping containing version and the arrays buttons, axes, expo and invert. Every file carries its own header comments listing the action numbers, button bits and axis numbers. The comment lists are identical across all ten files (compared by parsing). Line 1 of each file is a comment of the form Default mappings for <product>.

Element Content Source Status
version 1 in all ten files line 4 Verified
buttons Array of { action, buttons }, 8 entries in bebop/, 7 in milos/ line 71 in bebop/, line 71 in milos/ Verified
axes Array of { action, axis, buttons }, 6 entries in every file line 144 in bebop/ Verified
expo Array of { axis, expo }, 8 entries line 180 in bebop/ Verified
invert Array of { axis, inverted }, 8 entries line 218 in bebop/ Verified
buttons field in an axes entry 0 (NO_BUTTON) in every entry of every file axes array Verified
mppd rejects old versions String Old mapping version, refusing mapping usr/bin/mppd Verified
mppd rejects duplicate action or button bindings Strings button action %d already bound, button combination 0x%08x already mapped to action %d usr/bin/mppd Verified

Header comment “List of actions” in the buttons section. Identical in all ten files.

Number Name Status
0 to 15 app_0 to app_15 Verified
16 return_home Verified
17 takeoff_land Verified
18 video_record Verified
19 take_picture Verified
20 camera_exposition_inc Verified
21 camera_exposition_dec Verified
22 flip_left Verified
23 flip_right Verified
24 flip_front Verified
25 flip_back Verified
26 emergency Verified
27 center_camera Verified
28 cycle_hud Verified

Header comment “List of buttons”. The buttons value is a bit mask. Identical in all ten files.

Bit Name Status
0x1 BUTTON_A Verified
0x2 BUTTON_B Verified
0x4 BUTTON_C Verified
0x8 BUTTON_X Verified
0x10 BUTTON_Y Verified
0x20 BUTTON_Z Verified
0x40 BUTTON_L1 Verified
0x80 BUTTON_R1 Verified
0x100 VIRTUAL_LEFT_L Verified
0x200 VIRTUAL_LEFT_R Verified
0x400 VIRTUAL_LEFT_U Verified
0x800 VIRTUAL_LEFT_D Verified
0x1000 VIRTUAL_RIGHT_L Verified
0x2000 VIRTUAL_RIGHT_R Verified
0x4000 VIRTUAL_RIGHT_U Verified
0x8000 VIRTUAL_RIGHT_D Verified
0x10000 VIRTUAL_MINI_LEFT_L Verified
0x20000 VIRTUAL_MINI_LEFT_R Verified
0x40000 VIRTUAL_MINI_LEFT_U Verified
0x80000 VIRTUAL_MINI_LEFT_D Verified
0x100000 VIRTUAL_MINI_RIGHT_L Verified
0x200000 VIRTUAL_MINI_RIGHT_R Verified
0x400000 VIRTUAL_MINI_RIGHT_U Verified
0x800000 VIRTUAL_MINI_RIGHT_D Verified

Header comment “List of actions” in the axis section. Identical in all ten files.

Number Name Status
0 to 15 app_0 to app_15 Verified
16 roll Verified
17 pitch Verified
18 yaw Verified
19 gaz Verified
20 camera_pan Verified
21 camera_tilt Verified

Header comment “List of axes”. Identical in all ten files.

Number Name Status
0 AXIS_LEFT_LR Verified
1 AXIS_LEFT_UD Verified
2 AXIS_RIGHT_LR Verified
3 AXIS_RIGHT_UD Verified
4 AXIS_MINI_LEFT_LR Verified
5 AXIS_MINI_LEFT_UD Verified
6 AXIS_MINI_RIGHT_LR Verified
7 AXIS_MINI_RIGHT_UD Verified

Header comment: 0 = Linear, 1 to 4 = Expo strength; invert is 0 = not inverted, 1 = inverted. The values below are the same in all ten files.

Axes expo value inverted value Status
0, 1, 2, 3 1 0 Verified
4, 5, 6, 7 0 0 Verified

Excerpt from etc/mppd/bebop/mapping_bebop_2.cfg, shortened. The annotations after the excerpt are not part of the file.

mapping:
{
version = 1;
buttons = (
{
action = 26; /* EMERGENCY */
buttons = 0x20; /* BUTTON_Z */
},
...
);
axes = (
{
action = 18; /* YAW */
axis = 0; /* AXIS_LEFT_LR */
buttons = 0; /* NO_BUTTON */
},
...
);
}
Field Meaning in the file Status
action in buttons Number from the button action list Verified
buttons in buttons Bit mask from the button bit table Verified
action in axes Number from the axis action list Verified
axis Number from the axis list Verified
buttons in axes Button mask combined with the axis, 0 for none Verified
Item Value Source Status
Path template in mppd /etc/mppd/{ro.factory.type} usr/bin/mppd, strings output, one occurrence Verified
Base path string /etc/mppd usr/bin/mppd Verified
Factory key ro.factory.type, read at run time into the template usr/bin/mppd Verified
File name strings mapping_bebop, mapping_bebop_2, mapping_disco, mapping_anafi4k, mapping_chimera, in that order usr/bin/mppd Verified
Folder names bebop and milos as strings in mppd Not present (milos occurs zero times, bebop only inside mapping_bebop) usr/bin/mppd Verified
Value of ro.factory.type on a real unit Not read none Open
Which folder a given unit uses Not established none Open
Which product number selects which of the five files Not established; the log string is loading mapping for product %d usr/bin/mppd Open

lib/udev/rules.d/55-juba-gamepad.rules matches input event devices. Listed as context only; the file does not mention mapping files.

Matched device Match key JUBA_STR_DEV_TYPE Status
mpp2_gamepad ATTRS{name} mpp2_gamepad Verified
qpnp_pon ATTRS{name} mpp2_power Verified
USB 03eb:2406 ATTRS{idVendor}, ATTRS{idProduct} mpp_gamepad Verified
USB 03eb:2407 ATTRS{idVendor}, ATTRS{idProduct} nap_gamepad Verified

The tables below are the output of a parser written for this page. It reads the buttons and axes arrays and resolves names through each file’s own header lists. Within each folder, the five files differ from each other only in the line 1 comment (checked with diff against mapping_bebop.cfg in that folder). The two folders differ from each other in the buttons array and in two comment strings; the axes, expo and invert arrays are the same.

File Folder bebop body equals folder baseline Folder milos body equals folder baseline Status
mapping_anafi4k.cfg yes yes Verified
mapping_bebop_2.cfg yes yes Verified
mapping_bebop.cfg baseline baseline Verified
mapping_chimera.cfg yes yes Verified
mapping_disco.cfg yes yes Verified
Action Button Status
0 app_0 BUTTON_L1 (0x40) Verified
16 return_home BUTTON_Y (0x10) Verified
17 takeoff_land BUTTON_X (0x8) Verified
18 video_record BUTTON_C (0x4) Verified
19 take_picture BUTTON_R1 (0x80) Verified
26 emergency BUTTON_Z (0x20) Verified
27 center_camera BUTTON_B (0x2) Verified
28 cycle_hud BUTTON_A (0x1) Verified
Action Button Status
0 app_0 BUTTON_B (0x2) Verified
16 return_home BUTTON_Y (0x10) Verified
17 takeoff_land BUTTON_X (0x8) Verified
18 video_record BUTTON_C (0x4) Verified
19 take_picture BUTTON_R1 (0x80) Verified
27 center_camera BUTTON_Z (0x20) Verified
28 cycle_hud BUTTON_L1 (0x40) Verified
Axis Action Status
0 AXIS_LEFT_LR 18 yaw Verified
1 AXIS_LEFT_UD 19 gaz Verified
2 AXIS_RIGHT_LR 16 roll Verified
3 AXIS_RIGHT_UD 17 pitch Verified
6 AXIS_MINI_RIGHT_LR 20 camera_pan Verified
7 AXIS_MINI_RIGHT_UD 21 camera_tilt Verified

Axes 4 and 5 (AXIS_MINI_LEFT_LR, AXIS_MINI_LEFT_UD) have no entry in the axes array of any file.

Comment spelling in the files: TAKE_PITCURE in the bebop folder files, CYLE_HUD in the milos folder files. The numbers are the ones listed above.

The action number for emergency was taken from each file’s own button action list. It is 26 in all ten files. A button counts as bound if an entry of the buttons array has action = 26.

File Folder bebop Folder milos Status
mapping_anafi4k.cfg bound, BUTTON_Z (0x20) not bound Verified
mapping_bebop_2.cfg bound, BUTTON_Z (0x20) not bound Verified
mapping_bebop.cfg bound, BUTTON_Z (0x20) not bound Verified
mapping_chimera.cfg bound, BUTTON_Z (0x20) not bound Verified
mapping_disco.cfg bound, BUTTON_Z (0x20) not bound Verified

In the milos folder, BUTTON_Z is bound to center_camera. In the milos files the word emergency appears only in the action list comment and in no other line. This describes the files in the image we examined. Neither folder is known to apply to the Skycontroller 2, which runs a different build.

Scope Result Status
buttons array in all ten files Parsed as described above Verified
axes array entries with a button mask None; every buttons field in axes is 0 Verified
Other binding paths (code in mppd, the app side, firmware on the drone, default behaviour when no mapping loads) Not examined Open
Emergency handling on a real unit, in either folder Not examined Open
Item Value Source Status
String /var/lib/mppd Present in usr/bin/mppd strings output Verified
Nearby strings create_config_dir, mpp_config_init, mpp_config_reset, mpp_config_write, unable to create config dir, unable to write config %s: %d(%s), Config read error for module %s. Reset default config usr/bin/mppd Verified
Reset command String unable to reset mappings and a Mapper_Reset_mapping command descriptor usr/bin/mppd Verified
var/lib in the extracted image Symbolic link to /data/lib, which is not part of the extracted root; var/lib/mppd does not exist in the extraction var/lib Verified
User changes to mappings are stored in /var/lib/mppd Inference from the strings above usr/bin/mppd Open
Files in /var/lib/mppd take precedence over /etc/mppd Not established none Open

Comments

Spotted a mistake, or tried this on your own Bebop? Leave a note. Comments are kept on this site's own server.