Mavproxy and dataflash log

Hello i am using Apsync on my companion and use mavproxy to stream from cube 2.1 to groundstation (trough an ethernet link).

I wanted to start logging on my companion computer too and i set logging backend to 3 as adviced and uncommented the dflogger line in rc.local.

I get a bad logging error on mission planner.

Do i have to add anything more to the mavproxy starting line for dflogger to work? do i need another stream when mavproxy starts to some port to be used by dflogger?

thanks in advance.

No one? Please if anyone could be of any help i would appreciate it very very much.

Corrado

Please please please :slight_smile:

Can anybody please give me a little help? I need to write dataflash logs on my companion and i use mavproxy on it. Please any help would be greatly appreciated.

Corrado

Can anybody please give me a little help? I need to write dataflash logs on my companion and i use mavproxy on it. Please any help would be greatly
appreciated.

module load dataflash_logger

Corrado

Peter

Hello Peter i put the following lines in mavinit.scr

module load dataflash_logger
dataflash_logger start

I selected backend type 3 but i still get bad logging in mission planner.
I looked at mavproxy and it loads the module.
Really don’t know what i am missing.

Please type those at the MAVProxy command prompt and paste the output.

Also try “dataflash_logger set verbose 1”

something like:

mavproxy.py --master=/dev/ttyAMA0 --cmd=“module load dataflash_logger; dataflash_logger start; dataflash_logger set verbose 1;”

Ok done it, still getting bad logging. In mavproxy i keep getting message

DFLogger: Sending start packet

@peterbarker
Sorry for the late reply (very late), hope you can still help me. The output is:

DFLogger: Sending start packet

It goes on forever with that message

I did everything as last time and it worked for 10-15 boots than it went back to bad logging.
When it worked it did log the bin file.
What i did:
set log backend to 3
added in mavinit.scr following lnes:
module load dataflash_logger
dataflash_logger start

When it doesn’t work if i start manually dflogger it goes on forever with “DFLogger: Sending start packet” message.
Telemetry baudrate is set to 921k

@peterbarker
Ok i think i got to the bottom of it. It looks like it works perfect until i connect my basecam to the system.
Basecam is attached to serial port through mavlink. it looks like the system tries to write the dataflash log on the basecam serial port instead of the companion serial.
I tried disabling telemetry and heartbeat coming from basecam but it doesn’t matter, whenever i attach it the bad logging appears. If i disconnect gimbal with basecam than it logs fine.
Basecam and companion serials are set on a different baudrate, companion at 921k, basecam at 115k. Maybe if i set them equal it’ll work?
edit: tried both mavlink speeds at 115k but still doesn’t work.

Ok i think i got to the bottom of it. It looks like it works perfect until i
connect my basecam to the system.
Basecam is attached to serial port trough mavlink. it looks like the system
tries to write the dataflash log on the basecam serial port instead of the
companion serial.

Well, that’s strange.

I tried disabling telemetry and heartbeat coming from basecam but it doesn¢t
matter, whenever i attach it the bad logging appears.
Is there a way to tell dflogger to use a specific serial port to write
dataflash? Does it expect to be always serial 1?

No, it should send the packets out via normal routing mechanisms.

What system ID and component ID does the basecam use?

Hello, thanks for your help.

Basecam: SysID: 1 CompID:254
UAV: SysID:1
CGS: SysID:255
SysEnforce:0

@peterbarker Is there anything wrong in my configuration?

Is it possible to change the sysid on the basecam?

I don’t think it should be a problem, but it will give an additional data point in our investigations.

Just tested with SysID 2 and 3 on basecam. Both IDs give still bad logging once backend enabled (tried option 2 and 3 on backend).
As soon as i disable mavlink on basecam than the logging works.

So to be clear here - you’re connecting a mavlink-talking device to another serial port, but as far as you know it doesn’t use any sysid in use by either the flight controller, companion computer or ground control station. When you do connect that device the dataflash logging ceases to function?

Please try with just the dataflash-over-mavlink backend (just in case the SD card is being screwed up by traffic on the serial port as people seem to be reporting elsewhere). I’m not hopeful :slight_smile:

I’m probably going to have to try to replicate this here as if I’ve described things accurately above I can’t see you’re doing anything wrong!

If you have the inclination to keep poking at this it would be nice to try a mavlink device apart from the basecam. Something like a usb-to-serial adaptor plugging into another computer, mavproxy on the other computer providing traffic which looks like what you think the basecam is putting out (i.e. sysid 2 or 3). This is how I will be trying to replicate your problem.

Correct, i am using a basecam on another serial port and the basecam doesn’t use any of the SysID already in use.
It looks like for some reason the FC thinks the basecam is the companion computer and tries to backup there. Maybe there is something wrong in the basecam mavlink implementation, if you give me some hints i can contact basecam manufacturer and ask him to check his mavlink implementation and describe the problem to him.

I will try backend option with just mavlink backup to see if it makes any difference.

Really appreciate your help!!!

@peterbarker Hello, did you come up with any idea to fix it?