Connection to GCS over USB?

Hi,

Is it possible to connect my ground control software to the Navio2 over USB rather than using two RF modems ? Useful for setup on the bench etc.

Que.

Hello there!

I suggest you taking a look at our docs! It has a lot of useful information about how to get started.

Sure, you can setup a connection over Wi-Fi. It’s the preferred way for bench testing as it’s also the easiest.

Hi,

I just found this thread which asks similar questions How to use the Navio? and yes WiFi is and option, but the problem is you have to tell the autopilot which PC you want to connect to and vice versa. A wired connection like Pixhawk would be much easier but it appears it’s not possible unless I want to make a cable with two USB-UART interfaces back to back. But even two UARTS back to back are a pain as you have to configure the baud rates and to do that you need a connection.

To be honest WiFi would be much better if you didn’t have to tell the autopilot what PC you wanted to talk to. Infact it’s worse than that it’s an IP address so if you change network or your network isn’t set to give you the same IP address on each connection then you will have to change the config file every time. In short I don’t find Wifi that convenient.

To make matters worse it seems /etc/default/arduplane wont tolerate domains like Users-PC.localdomain. It only accepts an IP address. Mission Planner, Q Ground Control, the Raspberry Pi itself and obviously the PC will all tolerate these domain names but not Arduplane.

You can use -A tcp:0.0.0.0:6000 for example.
That way Ardupilot listens on all networks and IP addresses for a connection.

A thousand thank yous, that is so much easier. It only appears to work using TCP. -A UDP:0.0.0.0:6000 doesn’t work, does that sound right ? Any pros and cons to TCP over UDP ?

Que.

@Que
Just use the line I wrote in my previous post.
Tcp has more overhead and it will always wait for packages to be ackknowledged, otherwise resend them. UDP just sends out a stream of data, not carring if anybody actually receives it.
I would use TCP for setup and testing at home and UDP out at the field.

Understood, but when I try to use UDP and 0.0.0.0 I can’t connect. I can only get UDP to connect with a specific IP address.

Thats why I wrote tcp:0.0.0.0 and not udp:0.0.0.0.

OK, so even with it set to TCP you can connect using UDP ?

No, you can’t. Set MissionPlanner to TCP and enter your RPis IP and port.

One of us if missing the point here I think, probably me.

So to avoid storing an IP address on the Pi for telemetry I can use the IP address 0.0.0.0.
I have had this work over TCP using the command -A tcp:0.0.0.0:6000 on the Pi, and connecting from Mission Planner via TCP.
I cannot make this work using -A udp:0.0.0.0:6000 o the Pi, and using either UDP or TCP on Mission Planner.
I can only get UDP to work with a fully specified IP address on the Pi, such as -A UDP.192.168.1.1:6000
Yet you suggest using UDP in the field, so how do combine the open ended IP address on the Pi (0.0.0.0) and UDP ?

Sorry. I should have been more precise.
The structure is as follows:
Starting Ardupilot with TCP turns it into a server, listening for incoming connections.
It can listen on a specific device/network if you enter a IP address behind tcp:, or it can listen on any device/network with 0.0.0.0.

UDP works the other way around. It does not listen for an incoming connection, instead it sends out the telemetry stream to a specific receiver and to do that it needs the IP address of your GCS device. It then sends the data, no matter if your GCS is running or not.

There are other ways to use UDP, but they are not implemented in the Ardupilot executable (as far as I know). To use them you would have to install Mavproxy on your Navio RPi.

How do you plan to build a wifi out on the field? How many different devices running a GCS do you want to use?

2 Likes

Ah, and now the clouds have cleared. I was partially confused by the fact I was sure that when using UDP the PC needed to know the address of the autopilot. Just double checked and it doesn’t.

Thanks for the help.
Que.

I will add QGroundControl does ask for an IP address when using UDP, which is what confused me. However you don’t need to enter one.

This topic was automatically closed after 100 days. New replies are no longer allowed.