leetcrypt
d85d22661b
test: cover decoded KEY exact signature-DB matching
...
10 offline tests for the KEY-file identification path: a named protocol that
is in the DB resolves to the real catalog signature (category + manufacturer)
via match_method 'decoded_key_exact' with frequency-aware confidence
(0.95 consistent / 0.90 off-band); unknown names fall back to the router
('decoded_key', <0.90) yet stay identified; plus _lookup_known_protocol
case-insensitivity and None handling. Values are drawn from the DB itself so
the suite tracks catalog changes. Bare pytest, no server.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-07-21 12:08:05 -07:00
leetcrypt
37c9f7d67d
test: add offline unit tests for BinRAW->RAW identification path
...
Covers the two offline (no-server) identification behaviors:
- BinRAW->RAW route (4396c74 ): parser reconstructs a signed pulse train from
the demodulated Data_RAW bit stream so has_raw_data becomes true and a
BinRAW capture identifies through the same path as a RAW file.
- Per-match catalog-category surfacing (41850b5 ): every engine match carries
its own catalog category in match_details['device_category'], cross-checked
against the protocol database and the DeviceMatch source value.
Fixtures are embedded and written to tmp_path (the repo ignores *.sub), so a
bare pytest runs green with no docker, no bound server, and no network.
11 tests, all passing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-07-21 11:52:42 -07:00
leetcrypt
f8042c3dca
feat: preamble detection + frequency fingerprinting - iteration 3/5
...
Implements multi-factor scoring pipeline for improved RF device identification:
- Score = Timing(30%) + Frequency(25%) + BitCount(20%) + Preamble(15%) + Stats(10%)
New Components:
- src/matcher/preamble_detector.py: Detects 4 pattern types (long_burst, alternating, sync_word, custom)
- src/matcher/frequency_fingerprint.py: ISM band classification (315/433/868/915 MHz) for protocol filtering
- Integration: Updated pattern_decoder.py with multi-factor scoring
Features:
- Preamble detection with 4 methods (long burst, alternating, sync word, repetition)
- Frequency-based protocol filtering (reduces search space from 299 to ~20-30 candidates)
- Multi-factor confidence scoring combining timing, frequency, bit count, preamble, and statistics
- Sorted sync word matching (longest first to avoid substring matches)
Test Coverage:
- 15 new tests for preamble detection and frequency fingerprinting
- Total: 56 tests passing (41 existing + 15 new)
Results:
- Improved matching accuracy through multi-factor scoring
- Reduced protocol search space via frequency pre-filtering
- Better handling of noisy signals through preamble validation
🤖 Generated with [Claude Code](https://claude.com/claude-code )
Co-Authored-By: Claude <noreply@anthropic.com >
2026-02-15 07:38:09 -08:00
leetcrypt
af9942f822
feat: robust timing analyzer for RF device identification - iteration 2/5
...
- Implemented multi-method timing extraction (K-means, histogram, percentile)
- Added intelligent outlier removal with IQR method (2.5x threshold)
- Integrated timing analyzer into pattern_decoder.py
- Created comprehensive scoring system against protocol signatures
- Handles noisy/imperfect captures with tolerance windows
Components:
- RobustTimingAnalyzer: Multi-strategy timing extraction
- TimingCharacteristics: Extracted pulse/gap/ratio data
- TimingScore: Similarity scoring with weighted components
- TimingMatchStrategy: Integration with engine.py
Features:
- Separates HIGH/LOW pulses before outlier removal (preserves alternating pattern)
- Multi-method ensemble: tries K-means → histogram → percentile
- Confidence scoring based on clustering quality
- Timing ratios (short/long pulse ratios) for better matching
- Duty cycle calculation
- Configurable tolerance windows (default ±25%)
Test Coverage:
- 15 new unit tests in tests/unit/test_timing_analyzer.py
- All 41 tests passing (26 original + 15 new)
- Coverage: clean signals, noisy signals, outliers, multi-level, scoring, real-world LaCrosse
Expected Impact:
- Improved single-transmission accuracy (20% → 55% projected)
- Better noise tolerance for Flipper Zero captures
- More accurate protocol matching with 299 signatures
2026-02-14 19:06:13 -08:00
Trilltechnician
48fcb00241
Phase 3 Complete: Web Interface MVP
...
Major Achievements:
- ✅ Full web interface (1,520+ lines of frontend code)
- ✅ Interactive Leaflet.js map with marker clustering
- ✅ Drag-and-drop upload system with GPS input
- ✅ Search & filter UI with multi-criteria
- ✅ Statistics dashboard with Chart.js
- ✅ Responsive mobile-friendly design
Backend:
- ✅ FastAPI static file serving
- ✅ Simplified server mode (main_simple.py)
- ✅ Improved startup script with port auto-selection
- ✅ PostgreSQL schema ready (requires setup)
Database:
- ✅ SQLite populated with 85 Flipper Zero signatures
- ✅ Device matching system operational
- ✅ Frequency-based search working
Documentation:
- ✅ PHASE_3_COMPLETE.md - Technical summary
- ✅ WEB_INTERFACE_README.md - User guide
- ✅ WEBAPP_STARTUP_GUIDE.md - Troubleshooting
- ✅ POSTGRESQL_SETUP_EXPLANATION.md - DB setup guide
- ✅ DATABASE_POPULATION_SUCCESS.md - Import report
- ✅ DEVICE_IDENTIFICATION_REPORT.md - Matching analysis
Files Created:
- templates/index.html (260 lines)
- static/css/main.css (500 lines)
- static/js/*.js (760 lines total)
- src/api/main_simple.py (simplified server)
- start_web.sh (auto port selection)
Status: Production MVP Ready
Next: Phase 4 - API & Integration
🛰️ Generated with Claude Code
https://claude.com/claude-code
Co-Authored-By: Claude <noreply@anthropic.com >
2026-01-12 18:21:11 -08:00
Trilltechnician
64ce279a2e
Add comprehensive testing infrastructure
...
- Testing strategy document
- Unit tests for GPS validator
- Integration test conftest with fixtures
- Sample .sub files and manifests
- Comprehensive Termux testing guide
- Test directory structure
2026-01-12 11:25:13 -08:00