Skip to main content
. 2025 Apr 9;25(8):2383. doi: 10.3390/s25082383
Algorithm 1 Reactive Jamming—Scenario I
  •   1:

    Process 1: Listening (BladeRF)

  •   2:

    while  True  do

  •   3:

        signalReadSignalFromBladeRF (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:

                frequencyCalculateCenterFrequency(signal)

  •   7:

                alignedFrequencyAlignFrequencyToLoRaWANChannel(frequency)

  •   8:

                if alignedFrequency is valid then

  •   9:

                    detectedSFSF

  • 10:

                    detectedFreqalignedFrequency

  • 11:

                    detectionFlagTrue {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:

            detectionFlagFalse

  • 20:

            SetHackRFrequency(detectedFreq)

  • 21:

            jammingPacketSelectPreRecordedJammingPacket(detectedSF)

  • 22:

            TransmitJammingPacket(jammingPacket, HackRF)

  • 23:

            jammingFlagTrue

  • 24:

            Packet transmission

  • 25:

            Wait(cooldownPeriod)

  • 26:

            jammingFlagFalse

  • 27:

        end if

  • 28:

    end while