Skip to content

Commit 3cfa201

Browse files
committed
Add RSSI validation for carpeater failsafe and enhance carpeater info link styling
1 parent d5a1e6c commit 3cfa201

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

content/wardrive.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3572,6 +3572,17 @@ async function handleTxLogging(metadata, data) {
35723572

35733573
debugLog(`[TX LOG] Header validation passed: 0x${metadata.header.toString(16).padStart(2, '0')}`);
35743574

3575+
// VALIDATION STEP 1.5: Check RSSI (Carpeater RSSI failsafe - drop extremely strong signals)
3576+
if (metadata.rssi >= MAX_RX_RSSI_THRESHOLD) {
3577+
debugLog(`[TX LOG] ❌ DROPPED: RSSI too strong (${metadata.rssi}${MAX_RX_RSSI_THRESHOLD}) - possible carpeater (RSSI failsafe)`);
3578+
rxLogState.dropCount++;
3579+
rxLogState.carpeaterRssiDropCount++;
3580+
updateCarpeaterErrorLog();
3581+
updateRxLogSummary();
3582+
return false; // Mark as handled (dropped)
3583+
}
3584+
debugLog(`[TX LOG] ✓ RSSI OK (${metadata.rssi} < ${MAX_RX_RSSI_THRESHOLD})`);
3585+
35753586
// VALIDATION STEP 2: Validate this message is for our channel by comparing channel hash
35763587
// Channel message payload structure: [1 byte channel_hash][2 bytes MAC][encrypted message]
35773588
if (metadata.encryptedPayload.length < 3) {

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ <h2 class="text-sm font-medium text-slate-300 uppercase tracking-wide">Settings<
178178
<label for="carpeaterFilterEnabled" class="text-sm text-slate-300 cursor-pointer select-none">Ignore ID:</label>
179179
<input type="text" id="carpeaterIdInput" maxlength="2" placeholder="00" disabled
180180
class="w-14 px-2 py-1 text-sm bg-slate-700 text-white border border-slate-600 rounded focus:border-emerald-500 focus:ring-1 focus:ring-emerald-500 focus:outline-none uppercase font-mono disabled:opacity-50 disabled:cursor-not-allowed">
181-
<a href="#" id="carpeaterInfoLink" class="text-xs text-sky-400 hover:text-sky-300 transition-colors ml-1" onclick="event.preventDefault(); document.getElementById('carpeaterModal').classList.remove('hidden');">Info</a>
181+
<a href="#" id="carpeaterInfoLink" class="text-xs text-sky-400 hover:text-sky-300 hover:underline transition-colors ml-1" onclick="event.preventDefault(); document.getElementById('carpeaterModal').classList.remove('hidden');">Info</a>
182182
</div>
183183
</div>
184184

0 commit comments

Comments
 (0)