Skip to content

feat(m17): enhance parrot mode and fix @ALL routing#12

Merged
dbehnke merged 19 commits intodevfrom
enhance-m17
Jan 11, 2026
Merged

feat(m17): enhance parrot mode and fix @ALL routing#12
dbehnke merged 19 commits intodevfrom
enhance-m17

Conversation

@dbehnke
Copy link
Copy Markdown
Owner

@dbehnke dbehnke commented Jan 10, 2026

M17 Protocol Enhancements and Fixes

Overview

This PR implements significant improvements and fixes for the M17 protocol handling in urfd.

Key Changes

1. @ALL Receive Fix ("Contextual Broadcast")

  • Issue: M17 @ALL packets were being rejected due to strict callsign validation ('@' not allowed) and empty module information from mvoice.
  • Fix:
    • Updated CCallsign::IsValidM17 to allow @ and # prefixes.
    • Implemented logic in M17Protocol to detect @ALL with an empty module and force the target module to the client's current module.
    • Fixed string comparison to ignore trailing spaces when detecting @ALL.

2. Parrot Mode Implementation

  • Feature: Full support for M17 Parrot (Echo) mode.
  • Trigger: Accepts destination callsigns containing "PARROT" (e.g., PARROT, M17-PARROT, #PARROT), matching mrefd fuzzy matching behavior.
  • Safeguards:
    • Recording Limit: Hardcoded 30-second limit (750 frames) to prevent memory abuse.
    • Playback Delay: Added a 5-second delay (timeout) before playback starts to allow network settling.
  • Fixes: Resolved a variable shadowing bug isParrot that caused module lookup errors.

3. Stream Timeout Fix

  • Issue: Regular M17 streams (non-parrot) were getting stuck open because the protocol loop wasn't checking for stream expiration.
  • Fix: Added call to base CProtocol::CheckStreamsTimeout() ensuring idle streams are closed properly.

4. Packet Mode (SMS)

  • Improved routing for M17 Packet Mode (SMS) data to ensure it follows the same validation rules.

Verification

  • Verified compilation and build via Docker.
  • Tested against mvoice client (verified Parrot functionality and error handling).

@dbehnke dbehnke changed the title feat(m17): Feature Parity (Parrot, Interlinks, Strict Routing) feat(m17): enhance parrot mode and fix @ALL routing Jan 11, 2026
@dbehnke dbehnke merged commit fde5c10 into dev Jan 11, 2026
@dbehnke dbehnke deleted the enhance-m17 branch January 11, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant