Wifi Jammer with an Arduino and nRF24L01 module

 

Disclaimer: This post is only for educational propose only.
Jamming any kind of signal is considered crime in many countries.

Some weeks ago started to look and understand better what is behind the Wi-Fi and Bluetooth technology, more specifically, over the electromagnetic waves at the low level and try to do some experiments with the nRF24L01 module, as it runs in the same frequency band as Wi-Fi/Bluetooth – 2.4ghz

As I’m not expert over the 802.11 nor the Bluetooth
protocol, at first, I’ve started to read the basics about how RF communication, and what causes interference and noise.

Talking only about the 2.4GHz spectrum, Wi-Fi is spread out in channels – each channel covers a 20MHz wide, and they are separated by 5MHz – so the first channel cover 2.402GHz to 2.422GHz; the second
2.407GHz to 2.427GHz and so on.

What you have already may be noticed is that some channels overlaps each other – and the only ones that doesn’t do that are the 1,6.11.

Well. So what about the interference?
Every device sending electromagnetic waves in the same spectrum will disturb your network. It can be caused by a microwave, for example – or an old cordless phone. (https://www.youtube.com/watch?v=-IrOQU_Z-S4)
Even 2 different routers running at the same channel can cause some disturbance and it will make your wifi run slower.

That said, the only thing we should do to create interference, using the nRF24L01 module, is choose the band frequency and start send junk through the air. Simple as that.

Creating noise with nRF24L01

In the very first attempt to create some noise, I created a loop that sends a random string through the channel which I have set on my router, in this case the channel 4:

/*
* Arduino nRF24L01 Noise Gen
*                
* by Hugo Rezende, www.hugorezende.com.br
* 
* Library: TMRh20/RF24, https://github.com/tmrh20/RF24/
*/
#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(7, 8); // CE, CSN

void setup() {
  radio.begin();
  radio.setPALevel(RF24_PA_HIGH);
  radio.stopListening();
}
void loop() {
  //send it throug the channel 4 (2.2417GHz - 2437GHz)
  for(int i=16; i<38; i++){
    radio.setChannel(i);
    const char text[] = "320939210nsdf"; //just some random string
    radio.write(&amp;text, sizeof(text));    //just some random string
  }
}

When did that and started to send the signal near my phone: BANG! My Wi-Fi connection was lost.

Notice that this code above interfere only in the channel 4, which is the channel that is configured in my router. (You can download the WiFiAnalyzer (open-source) to easily check what are the channels over the networks around you)

As the nRF24L01 module runs in a 1MHz wide, to cover Wi-Fi channels – which has 20MHz wide – I need to set a loop changing the module channels.
It can be also possible cover more than one channel in the same loop – just by “for(int i=0; i<128; i++)” but this will make the noise in each frequency slower and less effective.

Jamming Arduino device

I’ve decided to make stuffs interesting, and build an application with a display and buttons, so I could change the channel that I want to interfere.

The nRF24L01 library comes with a very interesting sample to scan the spectrum, and check the amount of data received by the module. With this feature I created a very simple spectrometer that shows the usage in the 2.4GHz range. I used the sample to do the spectrometer – and the noise code to run the “jamming”.
The source code for the scanner is available here:
https://github.com/maniacbug/RF24/tree/master/examples/scanner

In my device I can select from which channel I’d like to send the noise and also check what is going on in the spectrum.
This is a simple video showing the device working.

At this moment, there are some points to highlight:

  • I could not generate strong signals through the nRF24L01 module. As far as I got, the max power which is possible to set is 0dBm. So, if your router signal is strong, your device probably will only decrease the speed of the Wi-Fi. It will work better if the jammer is near from what you want to block, and far from the WiFi source.
  • Bluetooth also operates over the 2.4GHz frequency, however in my tests I could not interfere on that. Bluetooth utilizes frequency-hopping spread spectrum technology to avoid interference problems. So, as the packages are sent in different frequencies and as our device has a limited capacity to generate noise in a large wide of frequency, it possible that it will not interfere on Bluetooth devices. http://large.stanford.edu/courses/2012/ph250/roth1/

The source code of the device is available in here:https://github.com/hugorezende/nRF24L01-WiFi-Jammer/blob/master/device.ino

Remember. This post is for educational propose only. Jamming is considered crime in many countries, so be careful with your experiments.

5 Replies to “Wifi Jammer with an Arduino and nRF24L01 module”

  1. What kind of board the most left of the breadboard? related to the project? and got any idea to increase the power?

  2. Great write up! I built one of these and I was having issues with the spectrum scanning part. I wasn’t getting any data showing up on my display. Once I changed line 93 to wait for more time with “delayMicroseconds(100);”, I started to see the signals displayed.

Leave a Reply

Your email address will not be published. Required fields are marked *