Auto-switch to monitor mode after scan for device tracking

The scanner and monitor are mutually exclusive (both need the SDR).
Previously auto-monitor tried to start mid-scan (causing device
conflicts) and required 3 towers (rarely achieved with weak signals).

Now after the first scan completes:
- If any towers were found, automatically stop scanner and start
  grgsm_livemon + tshark on the strongest tower's ARFCN
- SDR handoff is clean (scanner process has already exited)
- If monitor fails to start, scanner loop resumes
- Scanner thread's finally block preserves SDR allocation when
  monitor has taken over
- Frontend shows "Monitoring ARFCN X for devices..." status

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Smittix
2026-02-08 17:42:10 +00:00
parent 6010c7d589
commit 39ed4bffba
2 changed files with 56 additions and 16 deletions

View File

@@ -1670,6 +1670,9 @@
} else if (data.type === 'scan_complete') {
updateScanStatus('Scan #' + data.scan + ' complete (' + data.towers_found + ' towers, ' + data.duration + 's)');
document.getElementById('scanProgressBar').style.width = '100%';
} else if (data.type === 'auto_monitor_started') {
updateScanStatus('Monitoring ARFCN ' + data.arfcn + ' for devices...');
console.log('[GSM SPY] Auto-monitor started on ARFCN', data.arfcn);
} else if (data.type === 'error') {
console.error('[GSM SPY] Server error:', data.message);
updateScanStatus('Error: ' + data.message);