Newbie: How to connect Tower in VM to SITL?

Quick question! Can anyone help a newbie get started? I have Tower emulated in a virtual machine and have SITL running. Is there a way to connect both without using any hardware? If not, what hardware do I need to buy? Appreciate any help here, please.

Yes, they can be connected as long as they’re both on the same network.

You can use the --mavproxy-arg to add extra Mavlink outputs from the simulator:
../Tools/autotest/sim_vehicle.py --mavproxy-args=--out=udp:0.0.0.0:15670

The above command will add a SITL output over UDP at port 15670

Hi Stephen. Thanks for your reply. Unfortunately, it didn’t work and I still can not connect. Any other suggestions please. I suspect the problem might be because in Android Studio I only can emulate a network 4G internet connection and not a Wifi. Any thoughts on that?

I’ve not used Android Studio, so I’m not too sure how it handles network connections.

My guess is that a 4G network connection will not work, as it’s not designed to connect to local networks. You’ll either need to find a way to emulate a Wifi connection to your local network or find a different emulator.

It seems, I will have to buy an Android device. Thanks for the advice.

Yes, it’s quite easy. But you can buy and new device if you like :wink:

The easiest way to connect is using TCP to the distinct IP on port 5763/5762 I do this often as I run SITL on an AWS instance for convenience

Running SITL on AWS just requires you start MAVProxy in a screen session.

If you are a VM you can use port forwarding in your VM manager to get USP packets in or pipe TCP connections