Files
HBlink4/start.sh
T
cort e2f940595a Add DMR Link Control and Talker Alias extraction
Major Features Added:
- Full DMR Link Control (LC) metadata extraction from voice frames
- Complete Talker Alias extraction with multi-format support
- Embedded LC framework for header recovery (bit extraction pending)
- Smart optimization: only extract embedded LC when header missed

Link Control (LC) Extraction:
- Extract FLCO, FID, service options, src/dst IDs from sync frames
- Detect call type (group/private), emergency, privacy status
- DMRLC dataclass with convenience properties
- Automatic extraction and storage in StreamState
- 5 comprehensive tests (all passing)

Talker Alias Extraction:
- Support for 4 encoding formats: 7-bit ASCII, ISO-8859-1, UTF-8, UTF-16BE
- Multi-frame collection (header + 3 blocks = 28 bytes max)
- Automatic assembly and decoding
- Smart block accumulation with incremental decode attempts
- 13 comprehensive tests (all passing)

Documentation:
- docs/lc_extraction.md: Complete LC extraction reference
- docs/talker_alias.md: Talker alias quick reference guide
- docs/IMPLEMENTATION_SUMMARY.md: Updated with new features
- readme.md: Added new features to feature list

Tests:
- tests/test_lc_extraction.py: 5 tests for LC decoding
- tests/test_talker_alias.py: 13 tests for talker alias
- tests/test_access_control.py: Fixed to use config_sample.json
- All 31 tests passing (100%)

Code Changes:
- hblink4/hblink.py: Added LC/talker alias extraction functions
- StreamState: Added lc, talker_alias, and collection fields
- DMRLC: New dataclass with properties for call analysis
- Smart embedded LC extraction (conditional on missed header)

Benefits:
- Rich metadata extraction for better call tracking
- Human-readable names via talker alias
- Emergency call detection
- Privacy-aware logging
- Multi-language support
- Production ready with full test coverage
2025-10-01 17:04:48 -05:00

23 lines
517 B
Bash
Executable File

#!/bin/bash
# Store the script's directory
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo $SCRIPT_DIR
# Function to deactivate venv on script termination
cleanup() {
echo "Deactivating virtual environment..."
deactivate 2>/dev/null || true
}
# Set up trap to call cleanup on script exit
trap cleanup EXIT
# Activate virtual environment
echo "Activating virtual environment..."
source "$SCRIPT_DIR/venv/bin/activate"
# Run HBlink4
echo "Starting HBlink4..."
"$SCRIPT_DIR/run.py" "$@"