Companion Computer: Making a Mavlink WiFi bridge using the Raspberry Pi

Im trying to get the Raspberry Pi to act as a bridge, with the intention of using a wifi puck on the aircraft for internet communication outside of a localHost wifi setup. So, it would be an internet of things device that I can hit from anywhere on the net, operating outside of the wifi connection range of the Pi’s wifi hardware. This also removes the requirement of a telemetry radio as I plan on simply physically connecting the Pi to the Pixhawk.

Does this make sense so far and is the link below the best way to achieve this?

If I am correct, I have a problem with wifi when I set the command, wifi is no longer available on the machine after this command:
sudo ifdown wlan0

I’m following the instructions located here:

This kills the wifi, I realize its probably due to the driver prescribed in the doc, I have changed the driver based on the doc describing a different driver to use, but still its not working.
This work is on a Raspberry 2B with a wifi dongle. I have tried two dongles, still the same issue. Eth0 still works. I have a Raspberry Pi 3 and an ODroid XU4. Was simply trying this out with the oldest piece of hardware I had.

My question is:
is this related to the driver as suspected? I will swap out SD cards from the Pi 2 to 3 and see if I have the same issue. Any comments and suggestions would be greatly appreciated.

The link for the preconfigured SD Card image opens the repository but the download hangs forever:


For reference:

Specifically this section:
Setup the wlan0 interface as a static ip address
We now have to setup the wireless interface on the RPi to have its own fixed IP address and set it up to take incoming connections, type the following commands:

sudo ifdown wlan0

I don’t fully get the scenario you want to implement. Are you trying to put the raspberry-pi on the drone and allow anybody to connect to it Via the Internet?

The command “ifdown wlan0” will just stop your wlan0 device, which is the wireless device on the pi. Has nothing to do with the drivers. That’s just what Linux does when you execute that command and expected.

What you might be wanting is the apsync setup:
This allows you to connect a raspberry-pi to the pixhawk directly and connect mission planner to that raspberry-pi.

I am trying to do something similar however I want to make sure tat I can send the MAVlink commands from the GS (ex MAVproxy) which is on a RPI3 through wifi only without the need to use a RC.

Hi Ruben,
thanks for the reply and the link.
Hopefully this will clarify what I mean:
The Pixhawk and companion computer will be on the drone (obviously), with a wifi cellular puck on there also so that the companion computer will be able to communicate with the internet. I want to be able to connect to the companion computer from miles away, with my internet connection not being that used by the companion computer.

Does that do a better job of explaining the scenario?


1 Like

Hi Edan,

Thanks for explaining.
What you want is listed here:

This explains how to connect the PI directly to the PixHawk.
i’ve also done this and made the pixhawk a wifi hotspot and can start receiving mavlink data from it. please note that mavproxy has an option to send to an ip address. So your mission planner’s ip address should be known before take-off :slight_smile:

Hi Ruben,

Can you please elaborate more about the last step regarding how to convert to wifi connection ?

In addition , does the same design can be used with different flight controller for example I want to connect to the Bbeop2 Access point and send the MAVlink commands to it from the pi is this possible with MAVproxy ,Any advice ?


Please note that mavproxy sends mavlink packets out and on the mission planner side, you only listen for those commands. I haven’t tried a TCP/IP connection. UDP is fine for me, for now. I have configured my raspberry pi to start up and start sending mavlink on a broadcast address (see This allows me to just connect to the wirelss that the raspberry pi hosts (with hostapd) and start listening on a port in mission planner.

I don’t know if mavproxy allows you to just ‘listen’ on a ip address and port and for mission planner to just connect to it, as your ip address will likely be dynamic with the dongle that you plan to use to connect to the internet.

I don’t know the bbeop2, but the raspberry pi with mavproxy just works on a serial connection. Any flight controller that sends mavlink to serial/uart could be hooked up to a raspberry pi and then used with mavproxy.

1 Like

There seems to be an option to listen for a connection:

Going to give this a try soon :slight_smile:

Thank you for the reply.However I think I did not explain my question well.

I want to control the drone(Bebop2) by using a pi that has (Dronekit+MAVproxy)only.I mean the MAVProxy is on the pi and is the GS and I just want to send the commands and the missions to the Drone through wifi only by using the Dronekit to make the MAVProxy to connect to the drone’s access point .
please note that Bebop is originally a wifi controlled drone.

Is there any concept or aspect that I am missing here?

thank you

Hi Learn,

Thanks for explaining. I see no reason why that setup would not work. I don’t know dronekit, but i know it connects via mavproxy and that’s all that really matters.

I do need to say that most people will tell you to always have a radio link with your drone to take over, in the event of something failing.

Once you have this thing flying, what is your intend? To just fly around or are you planning a specific mission?