# MAVSDK running on another computer for HITL

Source: https://forum.modalai.com/topic/3086/mavsdk-running-on-another-computer-for-hitl
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Posted: 2024-02-05 08:46:46 UTC by kerct
Replies: 11 · Views: 2328

## kerct · 2024-02-05 08:46:46 UTC

For SITL, I can connect to PX4 with MAVSDK using port 14540. However, for HITL, port 14540 or 14551 does not work. VOXL2 wifi is configured in AP mode, and I have connected my laptop to it. I have also checked that voxl-vision-hub and voxl-mavlink-server are running, and my config files are as such:
voxl-vision-hub
![036bccc5-76c7-4e9a-95dc-3c9f23591d82-image.png](https://forum.modalai.com/assets/uploads/files/1707122486643-036bccc5-76c7-4e9a-95dc-3c9f23591d82-image.png) 

voxl-mavlink-server
![784be9e4-8d6e-40f0-a0a8-a59608137837-image.png](https://forum.modalai.com/assets/uploads/files/1707122545363-784be9e4-8d6e-40f0-a0a8-a59608137837-image.png) 

How can I get HITL to work with MAVSDK running on my linux computer? Or does it only work when MAVSDK is running on VOXL2 like the example here https://docs.modalai.com/mavsdk/?

## Reply by Zachary Lowell 0 · 2024-02-05 16:59:58 UTC

@kerct you can only use port 14540 in SITL when using mavsdk or mavros or something on the same computer running SITL. That is what that port is meant for - you cannot traverse through the router on that port and send packets forwards. As for mavsdk on a parent computer to the voxl2 running in HITL, you are not able to use port 14551 unless you are running mavsdk onboard as that port is meant for localhost traversal. So that just leaves port 14550, aka the port blocking qgc. So in this instance, you can either use port 14550 without QGC and leverage your mavsdk code, or vise versa. I would recommend using port 14550 for QGC and then running your application onboard the voxl2 using port 14551 as that is what it is meant to do.

Zach

## Reply by kerct · 2024-02-06 09:34:09 UTC (in reply to Zachary Lowell 0)

@Zachary-Lowell-0 I was trying the MAVSDK example which didn't work but after trying the example, I can't run HITL anymore (which worked previously)... not sure what's the issue here?

![9366dea7-4e64-4a39-9d27-c91ac223a206-image.png](https://forum.modalai.com/assets/uploads/files/1707211979391-9366dea7-4e64-4a39-9d27-c91ac223a206-image.png) 

![99b36e87-9f24-4f59-9387-87a6c4bccb02-image.png](https://forum.modalai.com/assets/uploads/files/1707212019320-99b36e87-9f24-4f59-9387-87a6c4bccb02-image.png)

## Reply by Eric Katzfey (ModalAI staff) · 2024-02-06 16:09:38 UTC (in reply to kerct)

@kerct If you power cycle the board does it do the same thing every time? It's acting like there is already code running on the DSP.

## Reply by kerct · 2024-02-07 01:31:34 UTC (in reply to Eric Katzfey)

@Eric-Katzfey Yes I still get the same error after power cycle

## Reply by kerct · 2024-02-07 03:05:12 UTC (in reply to Eric Katzfey)

@Eric-Katzfey I'm also unable to connect to QGC now (without HITL). On VOXL portal I can still see the camera and pointclouds, but not the status of the drone.

![6fd26783-7309-4806-8e97-2be46d5a6973-image.png](https://forum.modalai.com/assets/uploads/files/1707275011319-6fd26783-7309-4806-8e97-2be46d5a6973-image.png) 

![11db34e0-4c9a-4a38-b6cd-91f9fb7be2a9-image.png](https://forum.modalai.com/assets/uploads/files/1707275035911-11db34e0-4c9a-4a38-b6cd-91f9fb7be2a9-image.png) 

![c856daa6-409a-4791-8759-c551cc293489-image.png](https://forum.modalai.com/assets/uploads/files/1707275078300-c856daa6-409a-4791-8759-c551cc293489-image.png) 

![9a66f134-b08e-4ded-8e30-e5aa118bb773-image.png](https://forum.modalai.com/assets/uploads/files/1707275098083-9a66f134-b08e-4ded-8e30-e5aa118bb773-image.png)

## Reply by Eric Katzfey (ModalAI staff) · 2024-02-07 16:01:36 UTC (in reply to kerct)

@kerct Can you use the SDK 1.1.2 installer to do a fresh install of the latest SDK (available here: https://developer.modalai.com/asset/2) and then see if the problem still exists?

## Reply by Eric Katzfey (ModalAI staff) · 2024-02-07 16:02:51 UTC (in reply to kerct)

@kerct I generally start by doing a fresh install. Then try to get HITL working with Gazebo without QGroundControl. Then add QGroundControl. And finally, when all of that seems to be working, add MAVSDK.

## Reply by kerct · 2024-02-08 00:28:20 UTC (in reply to Eric Katzfey)

@Eric-Katzfey will this work with SDK 1.0.0 too? would like to stick with that version for now since we have been testing with this version for our project

## Reply by Eric Katzfey (ModalAI staff) · 2024-02-08 15:49:48 UTC (in reply to kerct)

@kerct We've many numerous improvements to HITL support since 1.0.0.

## Reply by Eric Katzfey (ModalAI staff) · 2024-02-08 15:51:56 UTC (in reply to kerct)

@kerct Perhaps you can try SDK 1.1.2 and just verify that you can get it all working the way that you want. That will at least rule out any issues coming from your environment. Then, if that all works fine, go back to 1.0.0 and see if you can determine which part is not working.

## Reply by Eric Katzfey (ModalAI staff) · 2024-02-08 15:52:51 UTC (in reply to kerct)

@kerct But I would strongly suggest moving to SDK 1.1.2. It's very hard for us to support customers using older SDK versions.
