# Mavlink Telemetry Routing, port selection

Source: https://forum.modalai.com/topic/123/mavlink-telemetry-routing-port-selection
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Posted: 2021-02-03 15:11:13 UTC by Aldo Castro Freire
Replies: 6 · Views: 1333

## Aldo Castro Freire · 2021-02-03 15:11:13 UTC

Hi guys,

I was wondering if there is a way to select the port we are rerouting the mavlink messages, the documenation only says how to change the ip.  or change between udp or tcp ? 

https://docs.modalai.com/voxl-vision-px4-telemetry/

This part specifically: 

A second manual IP entry can optionally be configured and enabled. Both of these will fields will tell voxl-vision-px4 to continuously forward all mavlink trafic from PX4 to these IP addresses at port 14550 which is the default UDP port for qGroundControl.

    "en_secondary_qgc": false,
    "secondary_qgc_ip": "192.168.1.214",

## Reply by modaltb (ModalAI staff) · 2021-02-04 00:08:02 UTC

Hi @Aldo-Castro-Freire ,

Not via the config file, but here's where they're defined if you are able to build from source:

https://gitlab.com/voxl-public/modal-pipe-architecture/voxl-vision-px4/-/blob/v0.6.8/include/udp_mavlink.h#L41

For TCP, a bit more work likely is needed, but here's the UDP implementation that could be used as a guide:

https://gitlab.com/voxl-public/modal-pipe-architecture/voxl-vision-px4/-/blob/v0.6.8/src/udp_mavlink.c

-Travis

## Reply by Aldo Castro Freire · 2021-02-12 00:55:23 UTC

How do I delete my current version voxl-vision-px4 to install this one ?

## Reply by Aldo Castro Freire · 2021-02-12 01:25:56 UTC

One more questions, where should I change in the code to change the port using the config file. Add a new variable called port. This will help me a lot as I have more than 1 drone.

## Reply by Aldo Castro Freire · 2021-02-12 01:36:18 UTC

Actually here: https://gitlab.com/voxl-public/modal-pipe-architecture/voxl-vision-px4/-/blob/master/src/config_file.c

is parsing and asking for the port, should I just add the variable and change the port as I want ?

![07ae7508-4be9-4ed9-a875-05cb308d8eed-image.png](https://forum.modalai.com/assets/uploads/files/1613093712821-07ae7508-4be9-4ed9-a875-05cb308d8eed-image.png)

## Reply by Chad Sweet (ModalAI staff) · 2021-02-12 18:10:29 UTC

Have you tried changing the port number parameter in /etc/modalai/voxl-vision-px4.conf ?

## Reply by Aldo Castro Freire · 2021-02-12 18:13:29 UTC

Yes, I tried apparently master and v0.68 of the code are different  while in master is not hardcode the udp port. For v0.68 it is hardcode. So I assumed my version is hardcode because nothing seem to change.

Do I need to delete my voxl-vision-px4? To install a new custom version?
