3.6 dataflash logs type 3

Hello, i already posted this question in the appropriate sections but got no answer so i put it here in the hope to not disturb anybody and have a little help.

I am trying to write my dataflash logs to my companion computer. I am using mavproxy on my companion and altready tried backend=3 but i get a logging error, because i guess i need something to allow mavproxy to log the datas.
I am a bit at a loss here, any help would be appreciated.

I have dflogger installed on companion and can run it but i guess it needs some configuration.



In mavproxy, you need to load the dataflash logger module with module load dataflash_logger. This can be included in the startup script.

Then, dataflash_logger start will activate the log streamer, and it will begin streaming as soon as the log starts recording. Using dataflash_logger status and dataflash_logger set verbose true will give you information to see what it’s doing.

IIRC, the “bad logging” prearm check will clear as soon as you load the module, but you will still have to start the stream to get the log.

1 Like

Also if the companion computer is an NVidia TX1, TX2 or RPI3 I’d recommend starting with the APSync image which has dflogger, MAVProxy and APWeb setup and working.

I am using apsync and have dflogger starting at startup but i guess i need mavproxy to send to some special port for it to log, i chamged mavproxy script heavily on my setup

I have read the docs about mavproxy logger but i don’t know how to automate it, maybe have to write the load and start mode lines in mavproxy startup file?

Would something like this work if i write it in the mavinit.scr?

module load dataflash_logger
dataflash_logger start

If i use this method (if it is correct) do i still have to set backend to 3?



Yeah, you should be able to just put those two commands in mavinit. Alternatively, I think you can use --cmd="command1; command2" when you run mavproxy.py. For example:
/usr/local/bin/mavproxy.py --cmd="module load dataflash_logger; dataflash_logger start"

And yes, for the log streaming to work, you have to set backend type to 3 (or 2).

Great thanks!!!

Will try it tomorrow and let you know if it works.


Tested it and looks like mavproxy loads module and starts it but i get a Bad logging in mission planner (backend 3)
Is there any special configuration i have to make to dataflash_logger?

AC 3.6.0 RC12

p.s. didn’t think was so difficult to log dataflash on my companion!!!

Not as far as I know, I had it working just using the commands I mentioned above. My setup was a Pixhawk 2 with AC 3.5.7 to a RasPi or TX1 with Ubuntu.

Using a Rpi3 here and everything works fine except for the dataflash logs. Hopefully someone will come in and help a bit.
Thank you for your help.

Any idea to test i am running out…

Maybe the feature doesn’t work with baud at 921600??

It is kind of incredible how on important things there is no documentation or help whatsoever.

Pull requests welcome on the documentation.

What is your LOG_BACKEND_TYPE set to?

Are you getting log files on your CC, and are they growing?


Is there any news on this?

Still at a loss with latest AC stable 3.6.3


Once i understand how it works and make my own work i¢ll write some
documentation and ask for a pull, there is no point for me to write
documentation now that i don¢t even have mine working and probably still
don¢t understand it.


Log_Backend_Type set to 3, as soon as i set it to 3 i get logging error on

Which values provoke “Logging Failed” and which don’t?

Log files work and get recorded on my CC when i am in backend_type 1

That’s unlikely, as a backend type of 1 means “log to SD card” - you
shouldn’t be able to get logs on your CC when LOG_BACKEND_TYPE=1

I am sorry, i tought by CC you meant Compact Card, i realize now you meant Companion Computer.

  • Backend type 3 provokes logging failed.

  • Backend type 1 works and logs only on flash card as it is supposed to.

And backend type 2?

What does “dataflash_logger set verbose 1” in MAVProxy spit out?


Didn’t try backend 2, will try and let you know.

Verbose spits out “DFLogger: Sending start packet”


Tried backend 2, same bad logging error.

No matter what i do and start it looks like it is impossible to save my dataflash logs to CC.

Any help would be greatly appreciated.