Offboard Control over USB port

Hi,
I would like to do the offboard control using a USB port instead of Telem2. However, it seems like the mavlink messages aren’t streamed out on /dev/ttyACM0 by default. I have to open QGC and do ‘mavlink start -d /dev/ttyACM0’. Is there a way to write a code on the companion computer to have messages streamed by default? I know the code must exist somewhere in QGC but couldn’t find the right file to look for.
Best regards,

Mine is on by default.
nsh> mavlink status

instance #0:
type: GENERIC LINK OR RADIO
MAVLink version: 1
transport protocol: serial (/dev/ttyS5 @115200)

instance #1:
type: USB CDC
MAVLink version: 2
transport protocol: serial (/dev/ttyACM0 @2000000)

I’m running a Pixhawk 6c with a nightly build from source (10/19/2022)
Screen Shot 2022-10-21 at 8.50.39 AM

I use docker to communicate with /dev/ttyUSB0

I have the same output in MAVLink console as @cfrank showed. However baud of 2000000 on /dev/ttyACM0 sometimes is not setted by default on my GNU/Linux distributive side, so I do:

  1. Check that things are not properly read from the port; if there’s no or very little output data, then something’s wrong.
    $ while : ; do cat /dev/ttyACM0 ; done
  2. Set baud manually.
    $ stty -F /dev/ttyACM0 2000000
  3. Check again; on this step there should be many lines of strange symbols like squares or hieroglyphs.

Also, you cannot use the same USB device with QGC and your own program simultaneously, so you should use additional software like mavproxy.py that provides forking of MAVLink connection by utilizing UDP ports.
$ mavproxy.py --master=/dev/ttyACM0,2000000 --out=localhost:14550 --out=localhost:14551
Now QGC will connect to 14550 UDP port, and you can freely use 14551 port for your purposes.