|
Algorithm 2 Reactive Jamming—Scenario II |
-
1:
while
True
do
-
2:
signal ← ReadSignalFromBladeRF (868.1 MHz, 2 MHz bandwidth)
-
3:
for SF in {SF7, SF8, SF9, SF10, SF11, SF12} do
-
4:
if ChirpDetector(signal, SF) == True and not detectionFlag then
-
5:
frequency ← CalculateCenterFrequency(signal)
-
6:
alignedFrequency ← AlignFrequencyToLoRaWANChannel(frequency)
-
7:
if alignedFrequency is valid then
-
8:
detectionFlag ← True
-
9:
detectedSF ← SF
-
10:
detectedFreq ← alignedFrequency
-
11:
SetBladeRFTransmitterFrequency(detectedFreq)
-
12:
selectorBlock.switchInput ← jammingWaveform[detectedSF] Switch to jamming waveform
-
13:
Wait(jammingDuration)
-
14:
selectorBlock.switchInput ← zeroFilledVector Switch back to zero-filled vector
-
15:
Wait(cooldownPeriod)
-
16:
detectionFlag ← False
-
17:
end if
-
18:
end if
-
19:
end for
-
20:
end while
|