GPS Auto-Extraction + First Successful Upload Complete

Major milestone: GPS coordinates now auto-extract from filenames and
uploads appear on map with full end-to-end workflow functional!

 GPS Auto-Extraction Features:
- JavaScript GPS extractor class matching Python patterns
- Supports 3 filename formats:
  * N/S/E/W: 34.0478N_118.2349W_filename.sub
  * lat/lon prefix: lat34.0478lon-118.2348_filename.sub
  * Signed decimal: -34.0478_118.2348_filename.sub
- Auto-populates latitude/longitude form fields on file drop
- Green notification toast shows detected coordinates
- File list shows GPS badge for files with coordinates

🗺️ Web Interface Improvements:
- Upload endpoint now stores captures in-memory
- Query endpoint returns uploaded captures for map display
- Stats endpoint shows real-time upload counts
- Map displays uploaded captures as markers
- Color-coded by frequency band

📁 Updated Files:
- static/js/upload.js: GPS extraction + auto-population
- src/api/main_simple.py: In-memory storage + endpoints
- src/parser/gps_extractor.py: Backend GPS extraction (Python)
- scripts/test_gps_extraction.py: Python test suite
- test_gps_extraction.html: Browser test suite

📊 T-Embed Files Updated:
- 34.0478N_118.2348W_1637_raw_8.sub: 315 MHz Princeton
- 34.0478N_118.2349W_1351_raw_10.sub: 433.92 MHz Princeton
- 34.0478N_118.2349W_1650_test_raw.sub: 433.92 MHz RAW
- All now have proper Flipper SubGhz headers

 Tested Features:
- GPS extraction from filename: 34.0478N_118.2349W → 34.0478, -118.2349
- Auto-population of GPS fields in upload form
- File upload with GPS validation
- Capture appears on map after upload
- Statistics update in real-time
- Frequency distribution calculated correctly

🎯 End-to-End Flow Working:
1. User drops .sub file with GPS in filename
2. GPS auto-detected and form fields populate
3. User clicks Upload
4. Server parses RF data + GPS coordinates
5. Capture stored in memory
6. Map refreshes and displays new marker
7. Stats update with new counts

🚀 Demo: http://localhost:8000
Upload 34.0478N_118.2349W_1351_raw_10.sub and watch it appear on map!

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-01-13 18:37:13 -08:00
parent 48fcb00241
commit 04bd80b25b
33 changed files with 1903 additions and 22 deletions
+114
View File
@@ -0,0 +1,114 @@
# T-Embed RF SubGHz Wardriving Export
**Export Date:** 2026-01-13
**Device:** Bruce T-Embed CC1101 (ESP32-S3)
**GPS Source:** Phone (termux-location)
**Format:** Wigle-compatible CSV
## Files in This Export
### `test_export_wigle.csv`
Wigle-compatible CSV format with GPS+RF signal pairs.
**Format:**
- **SignalHash:** SHA256 hash of frequency+protocol (16 chars)
- **Frequency(MHz):** RF frequency in MHz
- **Protocol:** SubGHz protocol (RAW, Princeton, etc.)
- **Latitude/Longitude:** GPS coordinates (decimal degrees)
- **FirstSeen/LastSeen:** ISO 8601 timestamps
- **CaptureCount:** Number of times signal was observed
- **BruceFile:** Original .sub filename from Bruce device
### `raw10.sub`
Flipper Zero format SubGHz capture file from Bruce T-Embed.
**Format:**
```
Filetype: Flipper SubGhz RAW File
Version: 1
Frequency: 433920000 (433.92 MHz)
Preset: FCC_433
Protocol: RAW
RAW_Data: <timing data>
```
### `quick_capture.py`
Python script to capture GPS+RF pairs and store in database.
**Usage:**
```bash
python3 quick_capture.py <bruce_file.sub> [session_id]
```
## Current GPS Location
**Latest Capture:**
- **Coordinates:** 34.073625°N, -118.359557°W
- **Accuracy:** 24.5 meters
- **Timestamp:** 2026-01-13T19:17:51Z
- **Provider:** GPS
**Location:** Greater Los Angeles area, California, USA
## Database Schema
Stored in: `~/logs/subghz_wardriving.db` (on phone)
**Tables:**
- `wardriving_sessions` - Session metadata
- `gps_track` - GPS breadcrumb trail
- `subghz_signals` - RF captures with GPS correlation
## Wigle CSV Sample
```csv
WigleWifi-1.4,appRelease=SubGHz-Wardrive-1.0,model=BruceT-Embed...
SignalHash,Frequency(MHz),Protocol,RSSI(dBm),Latitude,Longitude...
8a3f2d1c4e5b6a7f,433.920,RAW,,34.073625,-118.359557,24.5...
```
## Hardware
**Bruce T-Embed CC1101:**
- **RF Module:** Texas Instruments CC1101
- **Frequency Range:** 300-928 MHz
- **Modulations:** ASK, FSK, GFSK, MSK, 2-FSK, 4-FSK
- **Data Rate:** 0.6 - 500 kBaud
- **RX Sensitivity:** -112 dBm @ 1.2 kBaud
- **TX Power:** -30 to +10 dBm
**Phone GPS:**
- **Providers:** GPS, Network, Passive
- **Typical Accuracy:** 10-50 meters
- **Update Interval:** 158.4 seconds (2.64 minutes) for wardriving
## Next Steps
1. **Analyze Signals:** Plot frequency distribution
2. **Map Visualization:** Create heatmap of signal locations
3. **Protocol Decode:** Identify known protocols (garage doors, car keys, weather stations)
4. **Expand Collection:** Add more capture sessions
5. **Cross-reference:** Compare with FCC database for legitimate transmitters
## Resources
- **Bruce Firmware:** https://github.com/pr3y/Bruce
- **Flipper SubGHz:** https://docs.flipperzero.one/sub-ghz
- **CC1101 Datasheet:** https://www.ti.com/product/CC1101
- **Wigle.net:** https://wigle.net/ (WiFi wardriving reference)
## Security Notes
This system is designed for:
- ✅ Security research and education
- ✅ RF spectrum analysis
- ✅ Authorized penetration testing
- ✅ Personal network security assessment
-**NOT for:** Unauthorized access, signal replay attacks, or malicious use
---
**System:** SubGHz Wigle-Like Wardriving v1.0
**Documentation:** ~/docs/SUBGHZ_WIGLE_WARDRIVING.md
**Database:** ~/logs/subghz_wardriving.db
**Export Tool:** ~/python/subghz_wardriving/exporter.py