Code Monkey home page Code Monkey logo

mavp2p's Introduction

mavp2p

Test Lint Release Docker Hub

mavp2p is a flexible and efficient Mavlink proxy / bridge / router, implemented in the form of a command-line utility. It is used primarily to link UAV flight controllers, connected through a serial port, with ground stations on a network, but can be used to build any kind of routing involving serial, TCP and UDP, allowing communication across different physical layers or transport layers.

This project makes use of the gomavlib library, a full-featured Mavlink library.

Features:

  • Link together an arbitrary number of different kinds of endpoints:
    • serial
    • UDP (client, server or broadcast mode)
    • TCP (client or server mode)
  • Support Mavlink 2.0 and 1.0, support any dialect
  • Emit heartbeats
  • Request streams to Ardupilot devices and block stream requests from ground stations
  • Support domain names in place of IPs
  • Reconnect to TCP/UDP servers when disconnected, remove inactive TCP/UDP clients
  • Multiplatform, available for multiple operating systems (Linux, Windows) and architectures (arm6, arm7, arm64, amd64), does not depend on libc and therefore is compatible with lightweight distros (Alpine Linux)

Important announcement

my main open source projects are being transferred to the bluenviron organization, in order to allow the community to maintain and evolve the code regardless of my personal availability.

In the next months, the repository name will be changed accordingly.

Table of contents

Installation

Download and extract a precompiled binary from the release page.

If you want to use Docker, there's a image available at aler9/mavp2p:

docker run --rm -it --network=host -e COLUMNS=$COLUMNS aler9/mavp2p

Usage

Link a serial port with a UDP endpoint in client mode:

./mavp2p serial:/dev/ttyAMA0:57600 udpc:1.2.3.4:5600

Link a serial port with a UDP endpoint in server mode:

./mavp2p serial:/dev/ttyAMA0:57600 udps:0.0.0.0:5600

Link a UDP endpoint in broadcast mode with a TCP endpoint in client mode:

./mavp2p udpb:192.168.7.255:5601 tcpc:exampleendpoint.com:5600

Create a server that links together all UDP endpoints that connect to it:

./mavp2p udps:0.0.0.0:5600

Comparison with similar software

mavp2p vs mavproxy

  • Does not require python nor any interpreter
  • Much lower CPU and memory usage
  • Supports an arbitrary number of inputs and outputs
  • Logs can be disabled, resulting in no disk I/O
  • UDP clients are removed when inactive

mavp2p vs mavlink-router

  • Supports domain names
  • Supports multiple TCP servers
  • UDP clients are removed when inactive
  • Supports automatic stream requests to Ardupilot devices

Full command-line usage

usage: mavp2p [<flags>] [<endpoints>...]

mavp2p v0.0.0

Link together Mavlink endpoints.

Flags:
      --help                     Show context-sensitive help (also try
                                 --help-long and --help-man).
      --version                  print version
  -q, --quiet                    suppress info messages
      --print                    print routed frames
      --print-errors             print parse errors singularly, instead of
                                 printing only their quantity every 5 seconds
      --hb-disable               disable heartbeats
      --hb-version=1             set mavlink version of heartbeats
      --hb-systemid=125          set system id of heartbeats. it is
                                 recommended to set a different system
                                 id for each router in the network
      --hb-period=5              set period of heartbeats
      --streamreq-disable        do not request streams to Ardupilot
                                 devices, that need an explicit request
                                 in order to emit telemetry streams.
                                 this task is usually delegated to the
                                 router, in order to avoid conflicts when
                                 multiple ground stations are active
      --streamreq-frequency=4    set the stream frequency to request

Args:
  [<endpoints>]  Space-separated list of endpoints. At least one
                 endpoint is required. Possible endpoints kinds are:

                 udps:listen_ip:port (udp, server mode)

                 udpc:dest_ip:port (udp, client mode)

                 udpb:broadcast_ip:port (udp, broadcast mode)

                 tcps:listen_ip:port (tcp, server mode)

                 tcpc:dest_ip:port (tcp, client mode)

                 serial:port:baudrate (serial)

Links

Related projects

Similar software

Mavlink references

mavp2p's People

Contributors

aler9 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.