mavlink / MAVSDK-Python

MAVSDK client for Python.
https://mavsdk.mavlink.io
BSD 3-Clause "New" or "Revised" License
326 stars 221 forks source link

connectivity #711

Open peakyquest opened 5 months ago

peakyquest commented 5 months ago
#!/usr/bin/env python3

import asyncio
from mavsdk import System

async def run():
    # Connect to the drone
    drone = System()
    await drone.connect('serial://com7:57600')

# Run the asyncio loop
asyncio.run(run())

what I am doing wrong ?

ShafSpecs commented 5 months ago

Are you using a Windows or Unix operating system?

peakyquest commented 5 months ago

I am working on windows

ShafSpecs commented 5 months ago

I am working on windows

On Windows, you would need to actually start mavsdk_server manually and then pass the server port to the System instantiation. I'm not near my PC atm so I can't paste a snippet

julianoes commented 5 months ago

Try the debugging instructions: http://mavsdk-python-docs.s3-website.eu-central-1.amazonaws.com/#debug-connection-issues

ShafSpecs commented 5 months ago

Or check out this comment: https://github.com/mavlink/MAVSDK-Python/issues/678#issuecomment-2065319944