Connection between mavsdk python and QGC or telemetry module

Hello!
I’m trying to connect MAVsdk python and QGroundControl. Also I wanna use my telemetry module which is Holybro Sik.

My telemetry module is already connected with QGC well. What Im trying to do is making command with mavsdk python to takeoff and fly to the specific position.

When Im trying to connect msvsdk to telemetry or QGC. But it didn’t work😥

Do I have to something extra things on QGC to connect QGC and mavsdk?

import asyncio
from mavsdk import System


async def run():

    drone = System(mavsdk_server_address="localhost", port=50051)
    print("localhost : 50051")
    await drone.connect(system_address="serial:///COM7:9600")

if __name__ == "__main__":
    # Run the asyncio loop
    asyncio.run(run())

This is wrong. It should be "serial://COM7:9600").

And don’t use the baudrate 9600, use at least 57600.

Thank you so much for your answer!:blush::blush:

What I’m trying to do is using mask python and make command to drone to fly specific position (x,y,z

My telemetry module is connected to COM9 USB serial port and I also changed baudrate to 57600.

But it is still not working.

There were some error about the mavsdkserver before. So I downloaded mavsdk-windows x64-release.zip.

And I used command like this and it look like working well.

mavsdk_server_bin.exe -p 50051

Then I tried to connect my telemetry module and mavsdk.

    drone = System(mavsdk_server_address="localhost", port=50051)
    await drone.connect(system_address="serial://COM9:57600")

But nothing happened. Maybe am I connecting the mavsdk server wrong way?

You’re starting the mavsdk_server binary without the MAVLink address. It want’s the connection URL (see MAVSDK/src/mavsdk_server/src/mavsdk_server_bin.cpp at 41523f788c623e0cc4eff81e2d13a8c49a09cae4 · mavlink/MAVSDK · GitHub)

mavsdk_server_bin.exe serial://COM9:57600

Then you connect to it in Python with:

    drone = System()
    await drone.connect()

Also see:
http://mavsdk-python-docs.s3-website.eu-central-1.amazonaws.com/index.html#debug-connection-issues