Bebop Mavlink file format description?


Hi, is there any documentation anywhere describing the Mavlink format used by the ar3 software? Thanks


Looking for any Mavlink use sample
Flight Plan from Custom App
Flightplan and improved GPS
Flight Plan for iOS SDK
How do I use mavlink for drones?
FlightPlan not starting

Specifically, I know there is a mavlink file sample in the mavlink documentation, but there are obviously bebop specific commands such as taking a photo or start/stop video recording. I’d like to know which parameters to put this in and what the data should be.

Bebop MAVlink waypoints

I haven’t taken a look yet but I believe libMavlink has all of this.


Yeah thanks synman, you got me going here. Turns out the lovely Parrot developers made it really easy for us. I haven’t yet tested this, but this is all it looks like you need to do. I’m not going into depth here because it’s late and I’m tired but anyone should be able to figure out how to make it work from this.

1.) Create mission items
ARMAVLINK_MissionUtils has all the methods that most of us will probably want/need. Look at the header file for definitions but for example

eARMAVLINK_ERROR ARMAVLINK_MissionItemUtils_CreateMavlinkNavWaypointMissionItem(mavlink_mission_item_t* missionItem, float latitude, float longitude, float altitude, float yaw);

This creates a basic mission item that just says go to this lat/long/alt.

2.) Write your mission items to a file
Check out the ARMAVLINK_FileGenerator_t class. You instantiate one of these bad boys, insert, replace, delete mission items to the file generator. Then call the method that writes it to a file.

3.) Now we’re ready for where the Parrot SDK docs kick in, to just pass the file in and begin automated flight.

deviceController->common->sendMavlinkStart(deviceController->common, (char *)filepath, (eARCOMMANDS_COMMON_MAVLINK_START_TYPE)type);

Seems pretty simple, just not documented anywhere. I’m going to test some of this out over the weekend, will post back if anything isn’t as it seems. Thanks again

EDIT: Also, it turns out Mavlink really is just Mavlink, and this drone doesn’t have any special commands. It all follows Mavlink protocol. You can do all sorts of crazy shit by sending in parameters as outlined below. But as you can see, there’s thousands of combinations, so for me, I’m going to just stick with the handy methods Parrot has already written.
MavLink Ref



i have tried to use the Mavlink file generator but i could not get it to work yet. It generates a file but when i send it to the drone i don’t get any reaction at all.

Here’s my testing code:

public void goToPosition(LatLng position, float altitude, float yaw)
        Calendar c = Calendar.getInstance();
        int seconds = c.get(Calendar.SECOND);
        ContextWrapper conwrap = new ContextWrapper(this);
        String filepath = conwrap.getFilesDir().toString()+"gotopos"+seconds+".csv";
        Log.d(TAG,"Filepath: "+filepath);

         try {
            ARMavlinkFileGenerator filegen = new ARMavlinkFileGenerator();
             filegen.addMissionItem(ARMavlinkMissionItem.CreateMavlinkTakeoffMissionItem((float) position.latitude,(float) position.longitude,altitude,yaw,0));
             filegen.addMissionItem(ARMavlinkMissionItem.CreateMavlinkNavWaypointMissionItem((float) position.latitude, (float) position.longitude, altitude, yaw));
             filegen.addMissionItem(ARMavlinkMissionItem.CreateMavlinkLandMissionItem((float) position.latitude,(float) position.longitude,altitude,yaw));//lat,long,alt,yaw

             Log.d(TAG, "Mavlink lat coord" + filegen.GetCurrentMissionItemList().getMissionItem(0).getX());

        } catch (ARMavlinkException e) {

        Log.d(TAG,"sending goToPos Mavlink file");

Mavlink state: Mavlink file is stopped (arg filepath and type are useless in this state)
Mavlink filepath: /data/flightplan1.csv

But after running the code above the drone reports no changes whatsoever.

Also Mavlink error state is not triggered either.
Error State receiver implementation should be correct as i copied&pasted it:

            ARControllerArgumentDictionary<Object> args = elementDictionary.get(ARControllerDictionary.ARCONTROLLER_DICTIONARY_SINGLE_KEY);
            if (args != null)
                Log.d(TAG, "Mavlink Error State: " + error);

The files that are generated look like this:

0 0 3 22 0.000000 0.000000 0.000000 0.000000 49.757221 6.646198 3.000000 1
1 0 3 16 0.000000 5.000000 0.000000 0.000000 49.757221 6.646198 3.000000 1
2 0 3 21 0.000000 0.000000 0.000000 0.000000 49.757221 6.646198 3.000000 1

I’m testing on a Bebop with Firmware 2.0.57

Can someone spot my mistake?


So I just noticed something in the docs, for file path it says
"filepath (string): flight plan file path from the mavlink ftp root".

So I’m thinking maybe the issue is that the file is local on your phone and it needs to be pushed to the drone via ftp somehow. Back to the docs I go…


What about this? This would be my Objective C implementation. I’m really just making educated guesses here as I can’t get out to test this until tomorrow. derbestefan maybe you can try the Java equivalent and see how it goes.

- (void)testWaypoint
    if([self deviceController] != nil)
        // Get path for file
        NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
        NSString *documentsDirectory = [paths objectAtIndex:0];
        NSString *appFile = [documentsDirectory stringByAppendingPathComponent:@"TestFile.waypoint"];
        mavlink_mission_item_t item;
        eARMAVLINK_ERROR error;
        // Create file generator
        ARMAVLINK_FileGenerator_t *generator =  ARMAVLINK_FileGenerator_New(&error);
        // Create waypoint items and add to generator
        error = ARMAVLINK_MissionItemUtils_CreateMavlinkVideoStartCapture(&item, 0, 30, 2.1);
        error = ARMAVLINK_FileGenerator_AddMissionItem(generator, &item);
        error = ARMAVLINK_MissionItemUtils_CreateMavlinkTakeoffMissionItem(&item, 41.777217, -88.234855, 50, 180, 100);
        error = ARMAVLINK_FileGenerator_AddMissionItem(generator, &item);
        error = ARMAVLINK_MissionItemUtils_CreateMavlinkDelay(&item, 10);
        error = ARMAVLINK_FileGenerator_AddMissionItem(generator, &item);
        error = ARMAVLINK_MissionItemUtils_CreateMavlinkNavWaypointMissionItem(&item, 41.777855, -88.234908, 50, 0);
        error = ARMAVLINK_FileGenerator_AddMissionItem(generator, &item);
        error = ARMAVLINK_MissionItemUtils_CreateMavlinkVideoStopCapture(&item);
        error = ARMAVLINK_FileGenerator_AddMissionItem(generator, &item);
        // Create the mavlink file
        ARMAVLINK_FileGenerator_CreateMavlinkFile(generator, [appFile cStringUsingEncoding:NSASCIIStringEncoding]);
        // Util stuff
        eARUTILS_ERROR utilError;
        ARUTILS_Manager_t *utilsManager = ARUTILS_Manager_New(&utilError);
        // Put the file on the drone FTP
        ARUTILS_Ftp_ProgressCallback_t ftpCallback = FTPProgress;
        utilError = ARUTILS_Manager_Ftp_Put(utilsManager, [@"TestFile.waypoint" cStringUsingEncoding:NSASCIIStringEncoding], [appFile cStringUsingEncoding:NSASCIIStringEncoding], ftpCallback, (__bridge void *)(self), FTP_RESUME_TRUE);

        // Delete the generator to free up memory
        // Tell drone to run the file from it's FTP
        [self deviceController]->common->sendMavlinkStart([self deviceController]->common, (char *)[@"TestFile.waypoint" cStringUsingEncoding:NSASCIIStringEncoding], ARCOMMANDS_COMMON_MAVLINK_START_TYPE_FLIGHTPLAN);
        // Put this in a callback to delete when the mavlink file has completed or stopped
        utilError =  ARUTILS_Manager_Ftp_Delete(utilsManager, [@"TestFile.waypoint" cStringUsingEncoding:NSASCIIStringEncoding]);

void FTPProgress (void* arg, float percent)
    // Do something with progress

Plausibility of Different Method to Move Drone with GPS

If I’m not mistaken there is a flight plan subdirectory within data/ftp/bebop_drone. Have you tried putting it there?


Synman where are you getting this information? You just keep popping in and dropping little nuggets. What is the directory structure on the drone and where did you find that?


telnet? I’m sorry I’m not more helpful. I haven’t gotten around to implementing mavlink yet. I was kinda hoping you’d work out all the details before I got to it :slightly_smiling:


Ok smart guy you have the server, port, user, pass for the drones FTP?!


port 21 anonymous on the bebop V1 … I suspect the same for the V2 although I’ve read you have to press the power button a couple times to get the telnet daemon running… pretty sure that’s just for telnet though as none of the academy stuff would work without the ftp server running.


Anytime the Parrot devs want to chime in that’d be great. How the hell do you put a file onto the drone FTP?!?!?!?


I have this, but the problem is utilsManager->FtpPut is null so I’m not sure how to instantiate it…

ARUTILS_Manager_t *utilsManager = ARUTILS_Manager_New(&utilError);

ARUTILS_Ftp_ProgressCallback_t ftpCallback = FTPProgress;

// Put the file on the drone FTP
utilError = ARUTILS_Manager_Ftp_Put(utilsManager, [@"TestFile.waypoint" cStringUsingEncoding:NSASCIIStringEncoding], [appFile cStringUsingEncoding:NSASCIIStringEncoding], ftpCallback, (__bridge void *)(self), FTP_RESUME_TRUE);


I use the tried and true apache commons net java library… doesn’t look that that’ll help you all that much as I’m seeing a bunch of objective c stuff here.

I’m sure there is a decent equivalent for iOS development.


No, I understand you can tap into and see what’s in there. I need to know how the methods work…


The built in transfer utils may still not be fully baked. I want to say I read that in the docs somewhere. Seeing if I can find that reference now.

In the meantime, this looks useful:



Well FreeFlight3 app is doing it so it’s fully baked somewhere. It’s also in the documentation that you can start automated flight so if that’s possible then everything that comes before it should be also. Can try using basic FTP transfer using Apple docs but I have a feeling that isn’t going to cut it.


Take a look at ARDataTransfer… it has an uploader.