# Swarm communication for PX4 / MAVLink

**URL:** <https://discuss.px4.io/t/swarm-communication-for-px4-mavlink/7411>\
**Category:** Uncategorized\
**Created:** [August 5, 2018, 10:43am UTC](https://discuss.px4.io/t/swarm-communication-for-px4-mavlink/7411 "2018-08-05T10:43:50Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![LorenzMeier](https://discuss.px4.io/user_avatar/discuss.px4.io/lorenzmeier/32/17_2.png) [@LorenzMeier](https://discuss.px4.io/u/LorenzMeier)\
**Post date:** [August 5, 2018, 10:43am UTC](https://discuss.px4.io/t/swarm-communication-for-px4-mavlink/7411/1 "2018-08-05T10:43:50Z")

</div>

There has been interest in swarm communication via MAVLink. This requires two ingredients:

- A MAVLink mode that is optimized for low bandwidth, which probably requires introducing a “SWARM” mode: [PX4-Autopilot/mavlink\_main.cpp at master · PX4/PX4-Autopilot · GitHub](https://github.com/PX4/Firmware/blob/master/src/modules/mavlink/mavlink_main.cpp#L1775-L1806)
- A wireless network capable of dealing with many nodes. I know of multiple options:
  - ESP\* wifi modules with MAVLink firmware: [GitHub - dogmaphobic/mavesp8266: ESP8266 WiFi Access Point and MAVLink Bridge](https://github.com/dogmaphobic/mavesp8266)
  - RFD 900 with mesh mode enabled: [http://store.rfdesign.com.au/rfd-868u-radio-modem/](http://store.rfdesign.com.au/rfd-868u-radio-modem/)
  - LORA modems (suggestions?)

On the software side we don’t need immediate changes:

- MAVLink supports up to 255 systems in one subset, and multiple subnets could be used. We will increase this likely though to more units per subnet
- To manage bandwidth, a new swarm mode should be created here: [PX4-Autopilot/mavlink\_main.cpp at master · PX4/PX4-Autopilot · GitHub](https://github.com/PX4/Firmware/blob/master/src/modules/mavlink/mavlink_main.cpp#L1776-L1806)
- The existing offboard control interfaces should provide everything required to control all drones from a central computer.

---

<div class="post-metadata">

**Author:** ![Mzahana](https://discuss.px4.io/user_avatar/discuss.px4.io/mzahana/32/3790_2.png) [@Mzahana](https://discuss.px4.io/u/Mzahana)\
**Post date:** [August 5, 2018, 11:36am UTC](https://discuss.px4.io/t/swarm-communication-for-px4-mavlink/7411/2 "2018-08-05T11:36:32Z")

</div>

Thanks @LorenzMeier for opening this discussion. I checked the code you pointed to in [mavlink\_main.cpp](https://github.com/PX4/Firmware/blob/master/src/modules/mavlink/mavlink_main.cpp#L1776-L1806) and I have the following questions/comments.

- I know that one can configure the secondary telemetry port using the `SYS_COMPANION` parameter using QGC. It has few more options than the one in the link you provided. I saw these options defined for the `SYS_COMPANION` [here](https://github.com/PX4/Firmware/blob/8537863848a471e95eaa4719bb6622c4819c9ae3/src/modules/systemlib/system_params.c#L111-L141). Are these related ? Or A new parameter would be introduced if the swarm mode would be on the main telemetry link?
- I believe that the swarm mode should be mainly on the main telemetry link, e.g. `TELEM1`, which will give a chance for a companion computer to be connected to the secondary link `TELEM2`
- If the swarm mode would be on the `TELEM1` link, it would be convenient to have it reconfigurable through QGC. Is this currently supported by any means? I did not see a parameter to configure `TELEM1` in QGC.

Thanks.

---

<div class="post-metadata">

**Author:** ![LorenzMeier](https://discuss.px4.io/user_avatar/discuss.px4.io/lorenzmeier/32/17_2.png) [@LorenzMeier](https://discuss.px4.io/u/LorenzMeier)\
**Post date:** [August 5, 2018, 12:35pm UTC](https://discuss.px4.io/t/swarm-communication-for-px4-mavlink/7411/3 "2018-08-05T12:35:20Z")

</div>

Would need a new parameter (e.g. `SYS_TELEM`). But for now this can be all hardcoded on a branch - the important thing is to collaborate on the radio setup, add functionality and more importantly, documentation.

---

<div class="post-metadata">

**Author:** ![Seunghwan\_Choi](https://discuss.px4.io/letter_avatar_proxy/v4/letter/s/f6c823/32.png) [@Seunghwan\_Choi](https://discuss.px4.io/u/Seunghwan_Choi)\
**Post date:** [August 5, 2018, 1:18pm UTC](https://discuss.px4.io/t/swarm-communication-for-px4-mavlink/7411/4 "2018-08-05T13:18:32Z")

</div>

To share my experience, 2.4Ghz & ESP combination are very unreliable in swarm communication.  
Drone communication is disconnected when WiFi’s strength was low. The low strength mean just 5m between drone and AP. In my opinion, we may need a new model not a subscribe-piblish model for real-time communication with drones. In my case, exist model is unreliable in 2.4ghz & ESP.

---

<div class="post-metadata">

**Author:** ![Mzahana](https://discuss.px4.io/user_avatar/discuss.px4.io/mzahana/32/3790_2.png) [@Mzahana](https://discuss.px4.io/u/Mzahana)\
**Post date:** [August 5, 2018, 2:11pm UTC](https://discuss.px4.io/t/swarm-communication-for-px4-mavlink/7411/5 "2018-08-05T14:11:56Z")

</div>

I think we will need to do some calculations in order to know the maximum payload which the single module connected to QGC (e.g. 433Mhz telemetry module) can handle before it saturates in order to have stable link to all drones in a swarm. After that, I guess we can either:

1. set the minimal set of of MAVLink messages, and then find the maximum number of vehicles that can be on the system, or
2. set a maximum number of vehicles, and then determine the max set of MAVLink messages that can be accommodated

I believe the first option is more appropriate as it is important to specify the minimal (most important) set of MAVLink messages to be communicated.

Let me know if that makes sense to you.

---

<div class="post-metadata">

**Author:** ![LorenzMeier](https://discuss.px4.io/user_avatar/discuss.px4.io/lorenzmeier/32/17_2.png) [@LorenzMeier](https://discuss.px4.io/u/LorenzMeier)\
**Post date:** [August 5, 2018, 3:28pm UTC](https://discuss.px4.io/t/swarm-communication-for-px4-mavlink/7411/6 "2018-08-05T15:28:40Z")

</div>

I would also look for LoRa modules like this one: [https://www.adafruit.com/product/3179](https://www.adafruit.com/product/3179) - I’m sure there are existing implementations that already handle MAVLink.

---

<div class="post-metadata">

**Author:** ![Al\_B](https://discuss.px4.io/user_avatar/discuss.px4.io/al_b/32/2717_2.png) [@Al\_B](https://discuss.px4.io/u/Al_B)\
**Post date:** [August 5, 2018, 4:16pm UTC](https://discuss.px4.io/t/swarm-communication-for-px4-mavlink/7411/7 "2018-08-05T16:16:06Z")

</div>

Will “SWARMAV” be based on [MAVLink 2.0](https://mavlink.io/en/guide/mavlink_2.html)?

And, will the communication between vehicles be encrypted?

---

<div class="post-metadata">

**Author:** ![LorenzMeier](https://discuss.px4.io/user_avatar/discuss.px4.io/lorenzmeier/32/17_2.png) [@LorenzMeier](https://discuss.px4.io/u/LorenzMeier)\
**Post date:** [August 5, 2018, 9:10pm UTC](https://discuss.px4.io/t/swarm-communication-for-px4-mavlink/7411/8 "2018-08-05T21:10:25Z")

</div>

@Al_B Encryption depends on the link. MAVLink 2 does already provide authentication, which makes the communication tamper-proof.

@Mzahana Just found this module as well: [http://www.robsense.com/swarmlink-en.html](http://www.robsense.com/swarmlink-en.html)

---

<div class="post-metadata">

**Author:** ![MatteoTadiello](https://discuss.px4.io/user_avatar/discuss.px4.io/matteotadiello/32/8593_2.png) [@MatteoTadiello](https://discuss.px4.io/u/MatteoTadiello)\
**Post date:** [August 23, 2018, 12:20pm UTC](https://discuss.px4.io/t/swarm-communication-for-px4-mavlink/7411/9 "2018-08-23T12:20:59Z")

</div>

So now there is a way to implement a swarm in a simulation environment via mavlink without using a central station?

---

<div class="post-metadata">

**Author:** ![UT2UH](https://discuss.px4.io/letter_avatar_proxy/v4/letter/u/b782af/32.png) [@UT2UH](https://discuss.px4.io/u/UT2UH)\
**Post date:** [August 25, 2018, 5:20am UTC](https://discuss.px4.io/t/swarm-communication-for-px4-mavlink/7411/10 "2018-08-25T05:20:46Z")

</div>

There are plenty of Radiocraft’s dataradio modules for various bands including high power, TinyMesh and AES128 encryption options. The board replacing PixRacer’s ESP8266 is ready but not yet tested with Radiocraft’s module installed.

 ![](https://discuss.px4.io/uploads/default/original/2X/5/5a4eeeaba93c4b6edfdede269044be0a368cfa23.jpg)

---

<div class="post-metadata">

**Author:** ![JayJin](https://discuss.px4.io/user_avatar/discuss.px4.io/jayjin/32/6564_2.png) [@JayJin](https://discuss.px4.io/u/JayJin)\
**Post date:** [October 18, 2018, 6:33am UTC](https://discuss.px4.io/t/swarm-communication-for-px4-mavlink/7411/11 "2018-10-18T06:33:49Z")

</div>

Thanks for recommending SwarmLink, the link is updated, please find it here:  
[http://en.robsense.com/prod\_view.aspx?TypeId=69&Id=177&FId=t3:69:3](http://en.robsense.com/prod_view.aspx?TypeId=69&Id=177&FId=t3:69:3)

---

<div class="post-metadata">

**Author:** ![JayJin](https://discuss.px4.io/user_avatar/discuss.px4.io/jayjin/32/6564_2.png) [@JayJin](https://discuss.px4.io/u/JayJin)\
**Post date:** [January 24, 2019, 2:05pm UTC](https://discuss.px4.io/t/swarm-communication-for-px4-mavlink/7411/13 "2019-01-24T14:05:13Z")

</div>

The SwarmLink is ready-to-use radio gateway for controlling multiple drones with one computer.

The link was updated again:  
[http://en.robsense.com/prod\_view8.aspx?TypeId=69&Id=177&FId=t3:69:3](http://en.robsense.com/prod_view8.aspx?TypeId=69&Id=177&FId=t3:69:3)

---

<div class="post-metadata">

**Author:** ![zwn](https://discuss.px4.io/user_avatar/discuss.px4.io/zwn/32/3578_2.png) [@zwn](https://discuss.px4.io/u/zwn)\
**Post date:** [September 18, 2019, 12:29pm UTC](https://discuss.px4.io/t/swarm-communication-for-px4-mavlink/7411/14 "2019-09-18T12:29:34Z")

</div>

@JayJin Does the SwarmLink even exist? I could not find anyone using it or selling it. I think I would be interested but I would need to know more about it (I’d like to use my own software to control the drones).

---

<div class="post-metadata">

**Author:** ![sailordude](https://discuss.px4.io/letter_avatar_proxy/v4/letter/s/7ba0ec/32.png) [@sailordude](https://discuss.px4.io/u/sailordude)\
**Post date:** [December 14, 2019, 8:16pm UTC](https://discuss.px4.io/t/swarm-communication-for-px4-mavlink/7411/15 "2019-12-14T20:16:13Z")

</div>

Hello Lorenz! I see that unfortunately this thread went a bit cold in 2018… We have been working on a robotic Mark solution for sailboat racing (Normalerweise werden diese Regattabojen ja verankert und das ist echt meuhsam…) and we need a Swarm networking solution that works for Mavlink and over 2-3 km distance. Have you made any progress in this area or do you have any advice?  
Best regards, chris

---

<div class="post-metadata">

**Author:** ![SM\_DronfiesLabs](https://discuss.px4.io/user_avatar/discuss.px4.io/sm_dronfieslabs/32/6511_2.png) [@SM\_DronfiesLabs](https://discuss.px4.io/u/SM_DronfiesLabs)\
**Post date:** [June 26, 2020, 8:46pm UTC](https://discuss.px4.io/t/swarm-communication-for-px4-mavlink/7411/16 "2020-06-26T20:46:07Z")

</div>

Hi everybody, here Sebastian from Dronfies Labs. We are developing an Open Source UTM for the Unicef Innovation Fund ([www.portableutm.com](http://www.portableutm.com)) and we are looking for alternatives to communicate drones and groundstations with the UTM in remote locations without internet access. Even is not exactly the same we will be actively working on this problem next month. Our main idea right now is using Zoon Lora Modules for implementing a Lora Mesh between drones and groundstations. Love to re-open the discussion and bring support to the community for testing and sharing ideas.  
Best.

---

<div class="post-metadata">

**Author:** ![auturgy](https://discuss.px4.io/letter_avatar_proxy/v4/letter/a/e480ec/32.png) [@auturgy](https://discuss.px4.io/u/auturgy)\
**Post date:** [June 26, 2020, 9:14pm UTC](https://discuss.px4.io/t/swarm-communication-for-px4-mavlink/7411/17 "2020-06-26T21:14:13Z")

</div>

> **[Hardware - Open Drone ID](https://www.opendroneid.org/hardware/)**
>
> Open Drone ID Bluetooth\* implementations demonstrated positive results on both Texas Instruments\* (TI) CC2640R2F and Nordic Semiconductor\* nRF52840 families of products.  As more devices are verified, we will provide links on this page. ...

---

<div class="post-metadata">

**Author:** ![SM\_DronfiesLabs](https://discuss.px4.io/user_avatar/discuss.px4.io/sm_dronfieslabs/32/6511_2.png) [@SM\_DronfiesLabs](https://discuss.px4.io/u/SM_DronfiesLabs)\
**Post date:** [June 26, 2020, 10:43pm UTC](https://discuss.px4.io/t/swarm-communication-for-px4-mavlink/7411/18 "2020-06-26T22:43:29Z")

</div>

Great! I will take a look.

---

<div class="post-metadata">

**Author:** ![JayJin](https://discuss.px4.io/user_avatar/discuss.px4.io/jayjin/32/6564_2.png) [@JayJin](https://discuss.px4.io/u/JayJin)\
**Post date:** [July 5, 2020, 5:45pm UTC](https://discuss.px4.io/t/swarm-communication-for-px4-mavlink/7411/19 "2020-07-05T17:45:22Z")

</div>

You can visit the link of Open source part of SwarmLink’s GCS:

> **[RobSenseTech/SwarmLink](https://github.com/RobSenseTech/SwarmLink)**
>
> This repo is a open source version of UAV swarming module developed by RobSense Technology - RobSenseTech/SwarmLink

  
We have distributor in US, and we can deal with your purchase if you are not in US.

If you have any question, pls send me email, [jie.jin@robsense.com](mailto:jie.jin@robsense.com)

---

<div class="post-metadata">

**Author:** ![r0n4n](https://discuss.px4.io/user_avatar/discuss.px4.io/r0n4n/32/14766_2.png) [@r0n4n](https://discuss.px4.io/u/r0n4n)\
**Post date:** [November 2, 2023, 10:44am UTC](https://discuss.px4.io/t/swarm-communication-for-px4-mavlink/7411/20 "2023-11-02T10:44:43Z")

</div>

Hi everyone,

I’m starting a swarm drones project and I would be interested to contribute to any kind of improvements.

@Seunghwan_Choi did you test the communication with ESP8266 ?  
For you this solution is not reliable ?  
This technology should provide more range according to their specifications right ?
