Skip to content

Conversation

patrickelectric
Copy link
Member

@patrickelectric patrickelectric commented Aug 29, 2025

From: #3254

The issue: When the backup DHCP server quicks in the client computer can switche from a static IP to a DHCP client (Tested in ubuntu 24.04), the IP changes from 192.168.2.1 to 192.168.2.*, and QGC fails to connect.
Another problem is that the GCS server endpoint 0.0.0.0:14550 on BlueOS is also not enabled, because of this, QGC doesn’t connect even if you manually set the vehicle’s IP and port.

This PR enables the GCS Server port to at least allow users to manually connect to the vehicle.

Summary by Sourcery

Bug Fixes:

  • Enable GCS server endpoint (0.0.0.0:14550) by default to allow QGC connections

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
Copy link

sourcery-ai bot commented Aug 29, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Cherry-picks commit 3254 to enable the GCS server endpoint by default by setting its 'enabled' flag to True, ensuring QGC can connect on 0.0.0.0:14550 even when the vehicle’s IP changes via DHCP.

Class diagram for updated Endpoint initialization in AutopilotManager

classDiagram
    class AutopilotManager {
        +__init__()
    }
    class Endpoint {
        +name
        +place
        +argument
        +persistent
        +enabled
    }
    AutopilotManager --> Endpoint : creates
    AutopilotManager : Endpoint(name="GCS Server Link", place="0.0.0.0", argument=14550, persistent=True, enabled=True)
Loading

File-Level Changes

Change Details Files
Enable GCS Server endpoint by default
  • Change the 'enabled' parameter from False to True in the Endpoint constructor
core/services/ardupilot_manager/autopilot_manager.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@patrickelectric patrickelectric changed the base branch from master to 1.4 August 29, 2025 15:51
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Williangalvani
Copy link
Member

have you checked that this doesnt result in duplicated data being received on qgc when the user hardcodes the 192.168.2.1 IP ?

Copy link
Member

@joaoantoniocardoso joaoantoniocardoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This indeed makes QGC connection doubled:

  1. First, clean all QGC stuff:
\rm -rf \
  ~/.cache/QGroundControl.org \
  ~/.cache/QGCMapCache300 \
  ~/Documents/QGroundControl \
  ~/.config/QGroundControl.org
  1. Then, use the following setup:
  • Vehicle with static IP (192.168.2.2) + DHCP Server (192.168.2.x)
  • Topside computer as DHCP client (leased as 192.168.2.184)
  1. Then, when opening QGC:
  • QGC connects immediately
  • QGC finds and shows the video stream + video controls
  • QGC reports Heartbeat and other messages at doubled rate (heartbeat at 2Hz, etc)
  • Text messages are all doubled:
image
  1. If I remove one of the IPs, the messages are then at normal rate (not doubled)

@patrickelectric
Copy link
Member Author

This indeed makes QGC connection doubled:

  1. First, clean all QGC stuff:
\rm -rf \
  ~/.cache/QGroundControl.org \
  ~/.cache/QGCMapCache300 \
  ~/Documents/QGroundControl \
  ~/.config/QGroundControl.org
  1. Then, use the following setup:
  • Vehicle with static IP (192.168.2.2) + DHCP Server (192.168.2.x)
  • Topside computer as DHCP client (leased as 192.168.2.184)
  1. Then, when opening QGC:
  • QGC connects immediately
  • QGC finds and shows the video stream + video controls
  • QGC reports Heartbeat and other messages at doubled rate (heartbeat at 2Hz, etc)
  • Text messages are all doubled:
image 4. If I remove one of the IPs, the messages are then at normal rate (not doubled)

So... Do we have duplicated link in master ?

@joaoantoniocardoso
Copy link
Member

joaoantoniocardoso commented Sep 11, 2025

So... Do we have duplicated link in master ?

It seems so :(

edit: created this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants