Setting default flight controller BlueOS

Hi All,

I would like to ask how to set the default flight controller and also to understand if the SITL should be enabled unless testing etc.

From the logs below it appears that the navigator controller seems to not get detected and the SITL loads first. Should this be disabled if we are not wanting to do any testing or sim work.

With regards to the MAVLink config it does not appear to be finding the file could this be causing issues with MAVLink endpoints and traffic routing not optimising the MAVLink Router.

2025-04-07 04:18:10.795 | DEBUG    | mavlink_proxy.AbstractRouter:available_interfaces:76 - Available interfaces: [<class 'mavlink_proxy.MAVLinkRouter.MAVLinkRouter'>, <class 'mavlink_proxy.MAVP2P.MAVP2P'>]
2025-04-07 04:18:10.812 | WARNING  | ArduPilotManager:remove_old_logs:90 - Failed to remove logs: [Errno 2] No such file or directory: '/root/.config/ardupilot-manager/firmware/logs'
2025-04-07 04:18:10.813 | WARNING  | ArduPilotManager:load_sitl_frame:278 - SITL frame is undefined. Setting SITLFrame.VECTORED as current frame.
2025-04-07 04:18:10.814 | INFO     | ArduPilotManager:current_sitl_frame:128 - Setting vectored as frame for SITL.
2025-04-07 04:18:10.814 | INFO     | settings:save:104 - No new data. Not updating settings file.
2025-04-07 04:18:10.815 | INFO     | ArduPilotManager:current_sitl_frame:128 - Setting vectored as frame for SITL.
2025-04-07 04:18:10.816 | DEBUG    | flight_controller_detector.Detector:_detect_linux_board:62 - Trying to detect Linux board.
2025-04-07 04:18:10.817 | DEBUG    | flight_controller_detector.Detector:_detect_linux_board:64 - Navigator R5 detected.
2025-04-07 04:18:10.830 | WARNING  | ArduPilotManager:start_ardupilot:520 - More than a single board detected: [FlightController(name='Navigator', manufacturer='Blue Robotics', platform=<Platform.Navigator: 'navigator'>, path=None, flags=[]), FlightController(name='SITL', manufacturer='ArduPilot Team', platform=<Platform.SITL: 'SITL_arm_linux_gnueabihf'>, path=None, flags=[])]
2025-04-07 04:18:10.831 | WARNING  | ArduPilotManager:get_board_to_be_used:433 - Preferred board not set yet.
2025-04-07 04:18:10.832 | INFO     | ArduPilotManager:start_ardupilot:523 - Using Navigator flight-controller.
2025-04-07 04:18:10.972 | INFO     | ArduPilotManager:start_linux_board:240 - Using command line: '/root/.config/ardupilot-manager/firmware/ardupilot_navigator -A udp:127.0.0.1:8852 --log-directory /root/.config/ardupilot-manager/firmware/logs/ --storage-directory /root/.config/ardupilot-manager/firmware/storage/ -C /dev/ttyS0 -B /dev/ttyAMA1 -E /dev/ttyAMA2 -F /dev/ttyAMA3 '
2025-04-07 04:18:10.977 | DEBUG    | mavlink_proxy.AbstractRouter:start:99 - Calling router using following command: '/usr/bin/mavlink-routerd 127.0.0.1:8852 0.0.0.0:14660 --endpoint 192.168.2.1:14550 --endpoint 127.0.0.1:14000 --tcp-port 5777 -l /root/.config/ardupilot-manager/logs -T /root/.config/ardupilot-manager/logs'.
2025-04-07 04:18:13.986 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: mavlink-router version v4
2025-04-07 04:18:14.380 | INFO     | logging:callHandlers:1706 - Started server process [123]
2025-04-07 04:18:14.383 | INFO     | logging:callHandlers:1706 - Waiting for application startup.
2025-04-07 04:18:14.386 | INFO     | logging:callHandlers:1706 - Application startup complete.
2025-04-07 04:18:14.388 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: Could not open conf file '/etc/mavlink-router/main.conf' (No such file or directory)

Thanks,

Hi @UnderTheSea,

This is just set based on whichever one was last used.

The autopilot manager only loads / connects to one autopilot, so SITL will only run if that’s the one that you’ve selected.

Have you done any configuration of the MAVLink endpoints / do the default ones appear in the MAVLink Endpoints page in the sidebar? You’ll need to enable Pirate Mode to be able to see the page.

If you’re able to connect to the vehicle using a control station software (e.g. Cockpit / QGroundControl) then it’s probably fine, but if not we can raise an Issue for it and try to investigate what’s going wrong.

Hi @EliotBR

Thanks for the reply, so I have managed to get the navigator to register as the preferred flight controller by going in and selecting it from the GUI in Autopilot Firmware selecting the navigator board and rebooting?

2025-04-08 07:15:59.793 | DEBUG    | ArduPilotManager:get_board_to_be_used:426 - Preferred flight-controller is Navigator.
2025-04-08 07:15:59.795 | INFO     | ArduPilotManager:start_ardupilot:523 - Using Navigator flight-controller.

Where as before it was:

2025-04-07 04:18:10.831 | WARNING  | ArduPilotManager:get_board_to_be_used:433 - Preferred board not set yet.
2025-04-07 04:18:10.832 | INFO     | ArduPilotManager:start_ardupilot:523 - Using Navigator flight-controller.

I am able to connect to the vehicle using a control station but am wondering that if no config file is created is the function of MAVLink routing not being optimised and I am failing over to a lot of broadcast traffic to find endpoints?

I would like to be sure that only the endpoint traffic is going between SUB and ground stations.

I have in the logs:

ABCMeta:
    name: MAVLinkRouter
    binary_name: mavlink-routerd
    is_ok: True

2025-04-07 04:18:10.783 | DEBUG    | mavlink_proxy.AbstractRouter:caller:72 - 
ABCMeta:
    name: MAVP2P
    binary_name: mavp2p
    is_ok: True

2025-04-07 04:18:10.794 | DEBUG    | mavlink_proxy.AbstractRouter:caller:72 - 
ABCMeta:
    name: MAVProxy
    binary_name: mavproxy.py
    is_ok: False

When looking in the MAVLink endpoints in the GUI only the MAVLinkRouter is checked, but here both MAVLinkRouter and MAVP2P reports as True does that mean both are enabled, I am wanting to confirm that only MAVLinkRouter is being used?

Thanks again for your help.

Yes, but that’s generally not important - BlueOS doesn’t try to run or connect to multiple autopilots simultaneously, it just lets you choose between them, and by default it chooses a hardware option if one is detected (rather than the SITL simulation, unless the user has chosen to switch to it).

The MAVLink routing functionality does not try to find routes - it just runs those that have been configured. There are a set of routes that are pre-configured for BlueOS services to be able to run as expected, and it’s also possible to create and configure additional routes if you want to.

They are enabled insofar as they can be used, not that they are currently active. Only the selected routing program will run, unless you manually run an additional one through the terminal or a BlueOS Extension :slight_smile:


Are your questions here out of a desire to understand how BlueOS operates, or are there performance / profiling reasons that are leading you to believe something is going wrong? General curiosity is of course welcome (BlueOS is open source, after all), but if you’re concerned about some observed behaviour then it could be helpful to describe what is not working as expected, and potentially provide some system logs so we can help to determine, replicate, and fix the underlying cause.

1 Like

Hi Eliot,

My question comes from both understanding how BlueOS operates and to understand the end-to-end traffic when setting up the ROV and ensure we have the best possible baseline and settings configured or best option to select.

I tested swapping between MAVLinkrouter and MAVP2P:

2025-04-11 01:06:08.685 | INFO     | logging:callHandlers:1706 - 127.0.0.1:58592 - "POST /v1.0/preferred_router?router=MAVP2P HTTP/1.0" 200
2025-04-11 01:06:08.688 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: 2025/04/11 01:06:05 mavp2p v1.1.1
2025-04-11 01:06:08.700 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: 2025/04/11 01:06:05 router started with 7 endpoints
2025-04-11 01:06:08.712 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: 2025/04/11 01:06:05 channel opened: udp:10.1.11.103:14550
2025-04-11 01:06:08.724 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: 2025/04/11 01:06:05 channel opened: udp:127.0.0.1:53763
2025-04-11 01:06:08.736 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: 2025/04/11 01:06:05 channel opened: udp:127.0.0.1:14000
2025-04-11 01:06:08.747 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: 2025/04/11 01:06:05 channel opened: udp:10.2.4.5:14550
2025-04-11 01:06:08.759 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: 2025/04/11 01:06:05 node appeared: chan=udp:127.0.0.1:53763 sid=1 cid=1
2025-04-11 01:06:08.771 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: 2025/04/11 01:06:05 channel closed: udp:10.2.4.5:14550
2025-04-11 01:06:08.782 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: 2025/04/11 01:06:05 channel opened: udp:10.2.4.5:14550
2025-04-11 01:06:08.794 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: 2025/04/11 01:06:05 channel closed: udp:10.1.11.103:14550

It appears to find the endpoints.

2025-04-10 06:17:47.210 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: mavlink-router version v4
2025-04-10 06:17:47.522 | INFO     | logging:callHandlers:1706 - Started server process [123]
2025-04-10 06:17:47.524 | INFO     | logging:callHandlers:1706 - Waiting for application startup.
2025-04-10 06:17:47.528 | INFO     | logging:callHandlers:1706 - Application startup complete.
2025-04-10 06:17:47.529 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: Could not open conf file '/etc/mavlink-router/main.conf' (No such file or directory)
2025-04-10 06:17:47.532 | INFO     | logging:callHandlers:1706 - Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
2025-04-10 06:17:47.542 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: Opened UDP Client [4]CLI: 127.0.0.1:14000
2025-04-10 06:17:47.553 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: Opened UDP Client [6]CLI: 10.2.4.5:14550
2025-04-10 06:17:47.565 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: Opened UDP Server [8]CLI: 127.0.0.1:8852
2025-04-10 06:17:47.577 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: Opened UDP Server [9]CLI: 0.0.0.0:14660
2025-04-10 06:17:47.588 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: Opened TCP Server [10] [::]:5777
2025-04-10 06:17:47.600 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: File 00302-2025-04-10_05-45-33.tlog not read-only yet, marking as RO
2025-04-10 06:17:47.612 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: File 00303-2025-04-10_05-45-34.bin not read-only yet, marking as RO
2025-04-10 06:17:47.624 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: TCP [12]dynamic: Connection accepted
2025-04-10 06:17:47.635 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: Logging target system_id=1 on 00304-2025-04-10_06-17-45.tlog
2025-04-10 06:17:47.647 | DEBUG    | mavlink_proxy.AbstractRouter:_log_stderr:154 - Router: Logging target system_id=1 on 00305-2025-04-10_06-17-45.bin
2025-04-10 06:17:58.025 | INFO     | logging:callHandlers:1706 - 127.0.0.1:53492 - "GET /v1.0/endpoints HTTP/1.0" 200
2025-04-10 06:18:04.067 | INFO     | logging:callHandlers:1706 - 127.0.0.1:53520 - "GET /v1.0/endpoints HTTP/1.0" 200
2025-04-10 06:18:09.982 | INFO     | logging:callHandlers:1706 - 127.0.0.1:53552 - "GET /v1.0/endpoints HTTP/1.0" 200
2025-04-10 06:18:16.048 | INFO     | logging:callHandlers:1706 - 127.0.0.1:53578 - "GET /v1.0/endpoints HTTP/1.0" 200
2025-04-10 06:18:21.947 | INFO     | logging:callHandlers:1706 - 127.0.0.1:53614 - "GET /v1.0/endpoints HTTP/1.0" 200
2025-04-10 06:18:27.948 | INFO     | logging:callHandlers:1706 - 127.0.0.1:53762 - "GET /v1.0/endpoints HTTP/1.0" 200
2025-04-10 06:18:29.530 | INFO     | logging:callHandlers:1706 - 127.0.0.1:53956 - "GET / HTTP/1.1" 200
2025-04-10 06:18:29.539 | INFO     | logging:callHandlers:1706 - 127.0.0.1:53958 - "GET /register_service HTTP/1.1" 404
2025-04-10 06:18:29.548 | INFO     | logging:callHandlers:1706 - 127.0.0.1:53960 - "GET /docs HTTP/1.1" 200
2025-04-10 06:18:29.555 | INFO     | logging:callHandlers:1706 - 127.0.0.1:53962 - "GET /docs.json HTTP/1.1" 404
2025-04-10 06:18:29.565 | INFO     | logging:callHandlers:1706 - 127.0.0.1:53964 - "GET /openapi.json HTTP/1.1" 200
2025-04-10 06:18:29.572 | INFO     | logging:callHandlers:1706 - 127.0.0.1:53966 - "GET /v1.0/docs HTTP/1.1" 200
2025-04-10 06:18:29.673 | INFO     | logging:callHandlers:1706 - 127.0.0.1:53968 - "GET /v1.0/openapi.json HTTP/1.1" 200
2025-04-10 06:18:29.710 | INFO     | logging:callHandlers:1706 - 127.0.0.1:53970 - "GET / HTTP/1.1" 200
2025-04-10 06:18:29.717 | INFO     | logging:callHandlers:1706 - 127.0.0.1:53972 - "GET /swagger.json HTTP/1.1" 404
2025-04-10 06:18:34.020 | INFO     | logging:callHandlers:1706 - 127.0.0.1:54024 - "GET /v1.0/endpoints HTTP/1.0" 200
2025-04-10 06:18:39.979 | INFO     | logging:callHandlers:1706 - 127.0.0.1:54052 - "GET /v1.0/endpoints HTTP/1.0" 200
2025-04-10 06:18:46.055 | INFO     | logging:callHandlers:1706 - 127.0.0.1:54086 - "GET /v1.0/endpoints HTTP/1.0" 200
2025-04-10 06:18:51.954 | INFO     | logging:callHandlers:1706 - 127.0.0.1:54114 - "GET /v1.0/endpoints HTTP/1.0" 200
2025-04-10 06:18:57.986 | INFO     | logging:callHandlers:1706 - 127.0.0.1:54144 - "GET /v1.0/endpoints HTTP/1.0" 200
2025-04-10 06:19:03.984 | INFO     | logging:callHandlers:1706 - 127.0.0.1:54172 - "GET /v1.0/endpoints HTTP/1.0" 200
2025-04-10 06:19:09.959 | INFO     | logging:callHandlers:1706 - 127.0.0.1:54208 - "GET /v1.0/endpoints HTTP/1.0" 200
2025-04-10 06:19:15.956 | INFO     | logging:callHandlers:1706 - 127.0.0.1:54252 - "GET /v1.0/endpoints HTTP/1.0" 200
2025-04-10 06:19:21.958 | INFO     | logging:callHandlers:1706 - 127.0.0.1:54280 - "GET /v1.0/endpoints HTTP/1.0" 200
2025-04-10 06:19:27.978 | INFO     | logging:callHandlers:1706 - 127.0.0.1:54322 - "GET /v1.0/endpoints HTTP/1.0" 200
2025-04-10 06:19:34.033 | INFO     | logging:callHandlers:1706 - 127.0.0.1:54352 - "GET /v1.0/endpoints HTTP/1.0" 200
2025-04-10 06:19:39.974 | INFO     | logging:callHandlers:1706 - 127.0.0.1:54496 - "GET /v1.0/endpoints HTTP/1.0" 200
2025-04-10 06:19:46.118 | INFO     | logging:callHandlers:1706 - 127.0.0.1:54530 - "GET /v1.0/endpoints HTTP/1.0" 200
2025-04-10 06:19:51.974 | INFO     | logging:callHandlers:1706 - 127.0.0.1:54564 - "GET /v1.0/endpoints HTTP/1.0" 200
2025-04-10 06:19:58.024 | INFO     | logging:callHandlers:1706 - 127.0.0.1:54594 - "GET /v1.0/endpoints HTTP/1.0" 200
2025-04-10 06:20:04.056 | INFO     | logging:callHandlers:1706 - 127.0.0.1:54626 - "GET /v1.0/endpoints HTTP/1.0" 200

When changing back to mavlink-router it appears to not be able to open the main.conf, is this file required for setting UDP/TCP endpoints to accept or connect to or is this handled another way.

Thanks again for your assistance.