# Simulation with MAVLink protocol

**URL:** <https://www.ruby-forum.com/t/simulation-with-mavlink-protocol/230653>\
**Category:** GNU Radio\
**Created:** [June 27, 2014, 11:34pm UTC](https://www.ruby-forum.com/t/simulation-with-mavlink-protocol/230653 "2014-06-27T23:34:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jason\_sam](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/7993a0/32.png) [@jason\_sam](https://www.ruby-forum.com/u/jason_sam)\
**Post date:** [June 27, 2014, 11:34pm UTC](https://www.ruby-forum.com/t/simulation-with-mavlink-protocol/230653/1 "2014-06-27T23:34:03Z")

</div>

Hello, I have some needs and I’d like to know if GnuRadio can help me  
with it. I have already read some material at GR website and I didn’t  
get the answer.I need to receive and send packets with a specific  
protocol called MAVLink, used in mini UAVs. More specifically I am  
thinking about developing a sniffer.I don’t have sdr hardware for now,  
then for starting I am thinking on simulation. My doubts are as follows:

- Is it possible to implement a new protocol for sending and receive  
packets? (MAVLink protocol)
- My idea is to simulate the exchange between a UAV and a control ground  
station. Would it possible to do it?  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Paulo\_Roberto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/8dc957/32.png) [@Paulo\_Roberto](https://www.ruby-forum.com/u/Paulo_Roberto)\
**Post date:** [June 28, 2014, 2:58am UTC](https://www.ruby-forum.com/t/simulation-with-mavlink-protocol/230653/2 "2014-06-28T02:58:07Z")

</div>

Hi Paulo,

GNU Radio gives you but the framework to write and connect signal  
processing blocks, as well as a nice set of “standard” blocks.  
Among the functionalities available there are means to generate packets  
and process the same.  
If you know that if you can capture the signal, you could  
mathematically/algorithmically analyze it, it’s basically possible to  
implement this in GNU Radio.  
That being said, it’s not really easy to implement a complete packeted  
standard in GNU Radio since that might be a “logically” complex task,  
involving different modulations, synchronization, collision detection,  
arbitration, resend requests and much more. However, there are several  
examples of people being able to decode received signals. I like to  
point gr-ieee802-11 (WLAN packets _transceiver_), and for a “simpler”  
system gr-air-modes (air traffic control message decoding).

Greetings,  
Marcus

---

<div class="post-metadata">

**Author:** ![Paulo\_Roberto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/8dc957/32.png) [@Paulo\_Roberto](https://www.ruby-forum.com/u/Paulo_Roberto)\
**Post date:** [June 29, 2014, 1:10am UTC](https://www.ruby-forum.com/t/simulation-with-mavlink-protocol/230653/3 "2014-06-29T01:10:17Z")

</div>

Hi!  
Of course it would be helpful if you had a capture device if your  
motivation was to capture signals of a system. Also, it will give you  
something to test your reception algorithms on.  
Greetings,  
Marcus

---

<div class="post-metadata">

**Author:** ![Paulo\_Roberto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/8dc957/32.png) [@Paulo\_Roberto](https://www.ruby-forum.com/u/Paulo_Roberto)\
**Post date:** [June 29, 2014, 7:09am UTC](https://www.ruby-forum.com/t/simulation-with-mavlink-protocol/230653/4 "2014-06-29T07:09:35Z")

</div>

Hey,

I have the feeling that there maybe a misunderstanding about what  
MAVlink really is. The MAVlink protocol as such is serialization library  
that is used to transfer information, i.e. serialized data structures,  
between mobile and stationary devices rather than a whole “communication  
system”. You can transfer MAVlink messages over any kind of transport  
system such as Wifi, bluetooth, Zigbee or any proprietary system.  
So what you probably want is to receive and decode the communication of  
that transfer system, maybe using GR, and then decode the actual payload  
with the MAVlink library.

Cheers  
Andre

---

<div class="post-metadata">

**Author:** ![Paulo\_Roberto](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/8dc957/32.png) [@Paulo\_Roberto](https://www.ruby-forum.com/u/Paulo_Roberto)\
**Post date:** [June 29, 2014, 12:40pm UTC](https://www.ruby-forum.com/t/simulation-with-mavlink-protocol/230653/5 "2014-06-29T12:40:36Z")

</div>

Right, I’ve played with MAVlink before and as said it is not a wireless  
standard, you can send it over hard link serial if you want. I’m  
assuming  
your are sending the MAVlink over a pair of serial-RF adapters as is  
usual.

[http://copter.ardupilot.com/wiki/common-using-the-3dr-radio-for-telemetry-with-apm-and-px4/](http://copter.ardupilot.com/wiki/common-using-the-3dr-radio-for-telemetry-with-apm-and-px4/)

Seems to be what most use ( I have a pair of these as well ). If you  
look  
at the technical section your can see they list FHSS GFSK as the  
modulation. I would look into the datasheet for the chip for more  
details.  
I would recommend just doing the RF demodulation in GNUradio and then  
send  
the packets to an external program for further processing.

~Andrew

On Sat, Jun 28, 2014 at 8:06 AM, Andre P. \<
