Connection only works after opening QGC

I’m trying to get the default MAVSDK take_off_and_land c++ example running. I have a Herelink connected on the same WiFi network, that is connected to my drone. The connection fails every time, unless I first connect and disconnect QGC. Then it works.

Step by step:

I’m running the default example:

./takeoff_and_land udp://:14552

Results in:

[09:14:30|Info ] MAVSDK version: v0.29.0 (mavsdk_impl.cpp:27)
[09:14:30|Debug] New: System ID: 0 Comp ID: 0 (mavsdk_impl.cpp:404)
Waiting to discover system...
No system found, exiting.

Here is the weird thing. Now I open QGC, and create a comlink to udp://<my_ip>:14552, and that works. Now I disconnect QGC and run the same command again.

./takeoff_and_land udp://:14552

Now it works. How is this possible? What does QGC do that it manages to establish a connection.

1 Like