Control Pixhawk4 using Telemetry and Raspberry Pi

Hello,
I’m trying to connect and control Pixhawk4 -using MAVSDK-Python- with Telemetry and Raspberry Pi 4 B at the same time using Telem1 & Telem2 ports.

The main control for the mission will be using telemetry.
Raspberry Pi will be used to support the mission and make some emergency decisions to the Pixhawk4 controller directly based on some measures from sensors and camera.

When I connect and control the drone using MAVSDK-Python with telemetry only it works well, and when controlling it using Raspberry Pi only it works too as well.
But when I try to connect both at the same time the first one connects works well and the second does not work, and sometimes both do not work.

I ran MAVSDK_Server on Raspberry Pi using the following command:
./mavsdk_server -p 50051 serial:///dev/ttyS0:921600
And on my labtob for telemetry using this command with different port:
./mavsdk_server -p 50050 serial:///dev/ttyUSB0:921600

Here is the consol for MAVSDK_Server on Raspberry Pi when both codes were running:

And here for the telemetry:

I used this in python to connect:
await drone.connect(system_address="serial:///dev/ttyS0:57600")

Does any help please to control the drone using both at the same time ?

Could you share the parameters of your pixhawk?

On initial glance I would say you need to turn mav_0_forward off. or mav_1_forward.

@sofa03 I just changed the parameters like in the documentation here Companion Computer for Pixhawk Series, and all other parameters left it as default

@Andrew_Wilkins I’m not sure if these parameters enabled or not, does it have to be chaged or at most it is enabled by default?
I will test it in the nearest chance

I believe they are enabled by default.

They forward mav messages to other mavlink components. I couldn’t tell you EXACTLY why turning it off has fixed this for us in past, but it has when we have more than one component than ingests & sends mavlink messages.

1 Like

@Andrew_Wilkins Great, then you had this problem and solved it by disabling one of these parameters?!
I will try that soon and back with the result