Servers by jDrones

Download dataflash log throught telem2, mavlink and companion computer


(Leonardo) #1

I have an Odroid connected to TELEM2 port on pixhawk 1 running copter 3.5.7.
Is there a way to doenload dataflash log file to Odroid via mavlink?

Thank


(Mark Raymond Jr ) #2

If you connect to your board using MavProxy, a telemetry log with automatically be saved into the file mav.tlog.

So something like sudo mavproxy.py --master=/dev/path/to/pixhawk/from/odroid
The path should be something like /dev/ttyACM0, it depends; you’ll have to double check the information on the ODroid’s serial mapping in Linux.

Once you’re connected, do a flight and then disconnect, you’ll get a couple of files like below:

Here I’m connected to my companion computer, a Raspberry Pi, from my Windows desktop. My Raspberry Pi is in turn connected to my flight controller over serial. mav.tlog will probably be the one you want, and you can open it in APM Planner on another machine or if you have APM Planner installed on the ODroid itself. For instance, here is mine after running a short motor test.


(Leonardo) #3

Is that log the same as pixhawk uSD dataflash log? Does ir have the same information?
Thanks!


(peterbarker) #4

If you connect to your board using MavProxy, a telemetry log with automatically be saved into the file mav.tlog.

Entirely true, but the question was on dataflash logs :slight_smile:

So something like sudo mavproxy.py --master=/dev/path/to/pixhawk/from/odroid

Pleae avoid running mavproxy as root. If you are receiving permission
errors opening the serial devices the typical solution is to add your user
to the “dialout” group. Using “sudo” is a really, really big hammer and
can cause issues down the line - usability and security issues. Once you
have run it once as root you will typically need to remove several files
that are now owned by root - for example, the mav.tlog and mav.tlog.raw
files you’ve mentioned. Trying to subsequently run MAVProxy as a normal
user will give you permission errors opening those files.

Downloading dataflash logs using mavproxy is accomplished using the
“log” module. Something like:

module load log
log list
log download 3
log download all
log erase


(Leonardo) #5

Thank Peter

Can you provide the commands before “module load log”, please?


(peterbarker) #6

There are none - those are the only commands you should need to issue,
assuming you’re starting MAVProxy as Mark was suggesting (sans “sudo”).

Note that the dronekit-la project has a command-line tool which may help,
too. It’s rather beta code, mind you.