Mavsdk in parallel with Qgroundcontrol

I’m using mavsdk in python env , and can listen to mavlink msgs and update parameters to a pixhawk cube attached by a usb cable.
But , I cant use the QgroundControl and mavsdk in parallel ! as they both use the same USB port and block each other. I need them both attached at the same time threw the same usb port.
Did anyone encounter this problem? Is there a way in python , to solve this problem?


solved it by using mavlink-router to forward the serial mavlink mssgs to different UDP ports.
then QGC connects to one of the UDP ports and MAVSDK to the other.

Hi, I know this was a long time ago, is there a code example you can share where this was done? This may be something that I will be needing in the near future.

You can also do this using MAVSDK without mavlink-router:

For that, you need to add both connections to the Mavsdk instance, and set forwarding on for both of them.

Unfortunately, I don’t have an example ready just now, and I can’t find it in the docs, but it should be clear from the API: