{"id":42217589,"url":"https://github.com/stephendade/mavlinklinktester","last_synced_at":"2026-01-27T01:30:42.008Z","repository":{"id":331811164,"uuid":"1131453772","full_name":"stephendade/mavlinklinktester","owner":"stephendade","description":"A tool for characterizing the reliability and latency of MAVLink connections","archived":false,"fork":false,"pushed_at":"2026-01-26T01:27:28.000Z","size":545,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-26T16:57:57.162Z","etag":null,"topics":["ardupilot","mavlink"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stephendade.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-10T03:35:03.000Z","updated_at":"2026-01-26T01:27:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/stephendade/mavlinklinktester","commit_stats":null,"previous_names":["stephendade/mavlinklinktester"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stephendade/mavlinklinktester","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephendade%2Fmavlinklinktester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephendade%2Fmavlinklinktester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephendade%2Fmavlinklinktester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephendade%2Fmavlinklinktester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stephendade","download_url":"https://codeload.github.com/stephendade/mavlinklinktester/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephendade%2Fmavlinklinktester/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28795467,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T01:07:07.743Z","status":"ssl_error","status_checked_at":"2026-01-27T01:07:06.974Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ardupilot","mavlink"],"created_at":"2026-01-27T01:30:41.336Z","updated_at":"2026-01-27T01:30:42.003Z","avatar_url":"https://github.com/stephendade.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The MAVLink Link Tester (MLLT)\n\nA professional tool for characterizing the reliability and latency of MAVLink connections. Tests MAVLink links for packet loss, latency, and outages.\n\n![Screenshot](images/main.png)\n\n## Features\n\n- **Multi-link testing**: Monitor multiple MAVLink connections concurrently\n- **Comprehensive metrics**: Track packet loss, latency, out-of-order packets, and link outages\n- **Multiple transport types**: Support for UDP, TCP, and serial connections\n- **Configurable stream rates**: Control MAVLink stream rates for different data types\n- **MAVLink 2.0 signing**: Full support for authenticated MAVLink connections\n- **CSV output**: Detailed metrics exported to CSV files for analysis\n- **Real-time monitoring**: Live statistics during testing\n\n## Installation\n\n### Prerequisites\n\n- Python 3.9 or higher\n- Poetry 2.2.1 or higher (for dependency management)\n\n### Setup\n\n**Option 1: Install to your system/active environment (recommended for users)**\n\n```bash\n# Clone the repository\ngit clone https://github.com/stephendade/mavlinklinktester.git\ncd mavlinklinktester\n\n# Install package to your current Python environment\n# This makes the mavlink-link-tester.py command available on your PATH\npip install -e .\n```\n\n**Option 2: Use Poetry for development (recommended for developers)**\n\n```bash\n# Clone the repository\ngit clone https://github.com/stephendade/mavlinklinktester.git\ncd mavlinklinktester\n\n# Install dependencies with Poetry (creates isolated virtual environment)\npoetry install\n\n# For development with testing and code quality tools\npoetry install --with dev\n```\n\nNote: With Poetry, the command is only available via `poetry run mavlink-link-tester.py` unless you also run `pip install -e .` in your system environment.\n\n## Usage\n\n### Basic Usage\n\n```bash\nmavlink-link-tester.py --system-id 1 --component-id 1 \u003cCONNECTION\u003e\n```\n\nIf working within a Poetry development environment, use ``poetry run mavlink-link-tester.py ...`` instead\n\n### Connection Strings\n\n- **UDP Input (Server)**: `udpin:0.0.0.0:14550` - Listen for incoming UDP connections\n- **UDP Output (Client)**: `udpout:192.168.1.100:14550` - Connect to remote UDP endpoint\n- **TCP Client**: `tcp:192.168.1.100:5760` - Connect to TCP endpoint\n- **TCP Server**: `tcpin:192.168.1.100:5760` - Listen for incoming TCP connections\n- **Serial**: `/dev/ttyUSB0:57600` - Connect via serial port\n\n### Examples\n\n**Test single UDP link:**\n```bash\nmavlink-link-tester.py --system-id 1 --component-id 1 udpin:0.0.0.0:14550\n```\n\n**Test multiple links simultaneously:**\n```bash\nmavlink-link-tester.py --system-id 1 --component-id 1 \\\n  udpin:0.0.0.0:14550 \\\n  udpout:192.168.1.100:14551\n```\n\n**Test with custom duration:**\n```bash\nmavlink-link-tester.py --system-id 1 --component-id 1 \\\n  --duration 300 \\\n  udpin:0.0.0.0:14550\n```\n\n**Test serial connection:**\n```bash\nmavlink-link-tester.py --system-id 1 --component-id 1 \\\n  /dev/ttyUSB0:57600\n```\n\n**Test with custom stream rates:**\n```bash\nmavlink-link-tester.py --system-id 1 --component-id 1 \\\n  --all-rates 4 \\\n  /dev/ttyACM0:115200\n```\n\n**Test with custom individual stream rates:**\n```bash\nmavlink-link-tester.py --system-id 1 --component-id 1 \\\n  --all-rates -1 \\\n  --rate-raw-sensors 10 \\\n  --rate-position 5 \\\n  /dev/ttyACM0:115200\n```\n\n**Test with MAVLink 2.0 signing:**\n```bash\nmavlink-link-tester.py --system-id 1 --component-id 1 \\\n  --signing-passphrase mysecretkey \\\n  udpin:0.0.0.0:14550\n```\n\n## Command-Line Options\n\n### Required Arguments\n\n- `--system-id`: Target system ID (autopilot)\n- `--component-id`: Target component ID (autopilot)\n\n### Optional Arguments\n\n- `--duration`: Test duration in seconds (default: run indefinitely until Ctrl+C)\n- `--outage-timeout`: Outage detection timeout in seconds (default: 1.0)\n- `--recovery-hysteresis`: Number of consecutive packets required to exit outage (default: 3)\n- `--output-dir`: Output directory for CSV files (default: `output`)\n\n### Stream Rate Control\n\nControl the frequency of different MAVLink message streams (in Hz):\n\n- `--rate-raw-sensors`: RAW_SENSORS stream rate (default: 4 Hz)\n- `--rate-extended-status`: EXTENDED_STATUS stream rate (default: 4 Hz)\n- `--rate-rc-channels`: RC_CHANNELS stream rate (default: 4 Hz)\n- `--rate-position`: POSITION stream rate (default: 4 Hz)\n- `--rate-extra1`: EXTRA1 stream rate (default: 4 Hz)\n- `--rate-extra2`: EXTRA2 stream rate (default: 4 Hz)\n- `--rate-extra3`: EXTRA3 stream rate (default: 4 Hz)\n\n### MAVLink Signing\n\n- `--signing-passphrase`: MAVLink 2.0 signing passphrase (hashed with SHA-256)\n- `--signing-link-id`: MAVLink 2.0 signing link ID (default: use monitor link_id)\n\n## Output\n\nThe tool generates CSV files of the per-second link statistics in the specified output directory\n(default: `output/`) containing:\n\n- `elapsed_seconds`: Time elapsed since test start\n- `received_packets`: Number of packets received\n- `dropped_packets`: Number of dropped packets\n- `latency_rtt_ms`: Round-trip-time latency in milliseconds\n- `bad_order_packets`: Number of packets received out of sequence\n- `bytes`: Bytes transferred\n- `link_outage`: Boolean indicating if link is in outage state\n\n![CSV Output](images/csvoutput.png)\n\nA csv file containing a histrogram of the latency is also generated in the same folder.\n\n![Histrogram Output](images/csvoutput_histro.png)\n\nCSV files are named with the connection string and timestamp for easy identification.\n\n## Development\n\n### Running Tests\n\nThe project includes a comprehensive test suite using pytest.\n\n```bash\n# Run all tests\npoetry run pytest\n\n# Run with coverage report\npoetry run pytest --cov=src --cov-report=html\n\n# Run specific test file\npoetry run pytest tests/test_link_monitor.py\n\n# Run with verbose output\npoetry run pytest -v\n```\n\n### Code Quality\n\nThe project uses flake8 for linting, mypy for type checking, and vulture for dead code detection:\n\n```bash\n# Run linting\npoetry run flake8 mavlinklinktester/ tests/\n\n# Run type checking\npoetry run mypy mavlinklinktester/\n\n# Check for dead code\npoetry run vulture mavlinklinktester/ --min-confidence 80\n```\n\n### Releasing new versions\n\nThe CI will build a new release, based on the following commands:\n\n```bash\npoetry version patch  # or minor/major\ngit add pyproject.toml\ngit commit -m \"Bump version to $(poetry version -s)\"\ngit tag v$(poetry version -s)\ngit push origin main --tags\n```\n\nThis must be done directly to the main branch.\n\n\n## License\n\nThis project is licensed under the GNU General Public License v3.0 or later. See the LICENSE file for details.\n\n## Author\n\n**Stephen Dade**  \nEmail: stephen_dade@hotmail.com  \nGitHub: [@stephendade](https://github.com/stephendade)\n\n## Contributing\n\nContributions are welcome! Please feel free to submit issues or pull requests on GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephendade%2Fmavlinklinktester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephendade%2Fmavlinklinktester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephendade%2Fmavlinklinktester/lists"}