Running QGroundControl in parallel with Python script

I tried adding a new output port as described on this run-pymavlink-on-the-surface-computer example.

It says,

>  # If you want to use QGroundControl in parallel with your python script,
> #  it's possible to add a new output port in http: as a new line.
> #  E.g: --out udpbcast: 

This isn’t working for me. I added the line and used 14551 for the “yourport” number. I think the problem is it’s not updating MAVProxy. When I refresh the page the line i just added goes away. I tried rebooting after I add the line, but that also just deletes the line. I tried clicking “restart MAVProxy” button, but that just greys out both the bottom buttons and nothing actually happens. After 5 minutes or so of nothing happening, I refreshed the page and the line i added disappeared again.

I’ve seen in other forums that adding this line works, but I’m not sure what step I’m missing to actually implement the change after I type it into the window on http:

Hi @autery,

I just loaded up my old Companion SD card to try this, and it worked immediately.

My steps were

  1. Go to
  2. Add --out udpbcast:
    • I put it just under the existing line for port 14550
    • I also tried port 14770 and udpout:, both of which worked fine as well
  3. Press ‘Restart MAVProxy’ button
    • The page flashed briefly - the buttons did not go grey
  4. Refreshed the web page to make sure it wasn’t just stuck on the old one
  5. Confirmed that the connection was working on my topside computer
    from pymavlink import mavutil
    port = 14551
    m = mavutil.mavlink_connection('udpin:{}'.format(port))
    print('connection success!')
  6. Rebooted the Raspberry Pi (via the “Reboot” button in the top right corner) and confirmed my MAVProxy update was still there

Which Companion version are you on? I was testing on 0.0.31 (the last version), and my parameters after pressing “Restore Default Options” were

--cmd="set heartbeat 0"
--cmd="param forceload /home/pi/companion/params/serial0.param"
--out udpin:localhost:9000
--out udpin:
--out udpbcast:
--streamrate 10

As a side note, you may wish to try out BlueOS. The same functionality is available via the Endpoints page (when in Pirate Mode) :slight_smile: