Servers by jDrones

PixHawk 2 communication

(Etienne Compain) #1

Hello everyone,

I want to develop a swarm of 10 drone. For this I intend to use the Pixhawk 2 as a flight controller. The development of the software is a company that will take care of it but the question that I often ask myself: “how can you communicate with the pixhawk from the software?” And I’m not able to answer it …

Thanks in advance for your reply :slight_smile:


A post in "PixHawk 2 communication" requires staff attention
(Salahuddin Ashraf) #2

Pixhawk runs a software called flight stack. One of the two main flight stacks is Ardupilot. You can communicate with pixhawk via a communication protocol called MAVLink. You can communicate with pixhawk using a software tool called Ground Control Station (GCS). On windows there is Mission Planner. On linux there is APM Planner and QGroundControl. These tools communicate with pixhawk physically via a USB cable, and using MAVLink protocol. You can also write your own code to communicate with pixhawk via UART using MAVLink protocol.
I hope this answers your question.

(jack douglas) #3


Clearly you are articulate and succinct in your response. :slight_smile: There are many blogs, forums, articles and videos out there, but I am not aware of anyone maintaining a living eBook on the whole subject. It is just too dynamic, and many people I speak with are all-to-assuming that everyone understands what they are talking about.

Perhaps something for you to consider?

We need a reference that is constantly updated, and not only explains what and why, but also how.

I would not hesitate to pay for such a reference.

(Yes, I am new to this and struggling to learn builds on my own.)

(Etienne Compain) #4

Thank you for your reply. And if I order from the same software, several drone per protocol MAVlink, can there be interference between each?

(Etienne Compain) #5

Yes, I agree with you :slight_smile:

(Josh S) #6

all the communication between pixhawk and external devices such as your ground control station is done with Mavlink, the protocol uses parameters to identify the intended vehicle so with a point to multi-point network infrastructure vehicles will only react to instructions intended for them. Mavlink is also capable of simple network routing allowing you to relay messages or directly address the individual Mavlink enabled components of a vehicle. To get swarming setup you need to decide how you will communicate with the multiple vehicles, and find or design a gcs to generate the specific commands for each vehicle. I think Mission Planner support’s simple follow the leader type swarming, but nothing like that Intel swarm display. The vehicles themselves don’t care one way or the other about swarming and need no modification or parameter change other than to be sure they each have a unique vehicle id number

(John V) #7

UGCS has Drone Dance Controller feature on it’s enterprise version. It can do advanced swarming … but it is $2000+

(Matt Morton) #8

When I last used Mission Planner, I hit the Ctrl + F to bring up the advanced menu… I saw a button called SWARM in there. Not sure what it does or if it’s fully functional, but you may want to take a look at that.

( flyoz) #9

Thanks for the explanation I know I just learned something.:slight_smile:

(hans bert) #10

thats whats behind that button

(Etienne Compain) #11

Thank you for your clarifications, you have enlighten me :slight_smile:

(Etienne Compain) #12

This is exactly what I need !! I contact them for more info. Thank you! :wink:

(dongfang_a) #13

I’m not sure what’s your purpose for these drones. If you just want to play a team show, the best approach is:

  1. Plan the route for each drone, you might need some home made program to do that.
  2. The route should be time sensitive, and each drone must reach destination on time.
  3. Synchronize the time in each drone
  4. Broadcast the start message to each drone at the same time.
  5. There is no need to do communication during the flight. thus you can use any amount of drones, like one thousand.

However, so far I don’t think any open source solution (on board software and ground station software) can handle that.

(Mohammad Hefny) #14

This has not been not a swarm control yet. But you can control multiple drones on the same screen using PixHawk with Andruav as in this video
If you are interested we can work together to make it more suitable for your purpose.
M. Hefny

(Roberto Alejandro Morin Romero) #15

Hi Etienne_compain.

One way to communicate is through MavLink many persons say than this is easy. Other way is use

mini USB
hal.console -> print(message to company)
hal.console -> write(message to company)
hal.console -> read(message from company)

hal.uartA -> print(message to company)
hal.uartA -> write(message to company)
hal.uartA -> read(message from company)

More over, you can use ports uartB, uartC and uartD. But, you need to configure this ports in mission Planner (or APM planner) without protocol (-1). I recommend upload the next sketch if you want to try by this way.

./waf build --target examples/UART_test --upload

By this way you can communicate each PixHawk with one computer aboard and each computer communicate (via wifi or other ) at one computer (Master).

Good Luck!

(David Oneal) #16

Hello my friend, is it possible that we can speak on the phone, I have a similar set up and would love to have your help on some projects we have, can we set up a meeting on the phone?

(Harish Patel) #17

Hello, I would like to have a communication with you regarding the same. Can we have some way of communication? Here I found that you have message settings disabled. Can you please message me at your convenience so that we can communicate.


(Rjiun RK) #18

How to do Agent Oriented Programs (A-O-P) to control multiple drones at same time??