|
Algorithm 1 Reactive Jamming—Scenario I |
-
1:
Process 1: Listening (BladeRF)
-
2:
while
True
do
-
3:
signal ← ReadSignalFromBladeRF (868.1 MHz, 2 MHz bandwidth)
-
4:
for SF in {SF7, SF8, SF9, SF10, SF11, SF12} do
-
5:
if ChirpDetector(signal, SF) == True and not jammingFlag then
-
6:
frequency ← CalculateCenterFrequency(signal)
-
7:
alignedFrequency ← AlignFrequencyToLoRaWANChannel(frequency)
-
8:
if alignedFrequency is valid then
-
9:
detectedSF ← SF
-
10:
detectedFreq ← alignedFrequency
-
11:
detectionFlag ← True {Signal jamming process}
-
12:
end if
-
13:
end if
-
14:
end for
-
15:
end while
-
16:
Process 2: Jamming (HackRF)
-
17:
while
True
do
-
18:
if detectionFlag == True then
-
19:
detectionFlag ← False
-
20:
SetHackRFrequency(detectedFreq)
-
21:
jammingPacket ← SelectPreRecordedJammingPacket(detectedSF)
-
22:
TransmitJammingPacket(jammingPacket, HackRF)
-
23:
jammingFlag ← True
-
24:
Packet transmission
-
25:
Wait(cooldownPeriod)
-
26:
jammingFlag ← False
-
27:
end if
-
28:
end while
|