32
Signal Processing with GNURadio and SDRs Ateet Kumar Senior Security Researcher, Xen1thLabs Digital14 LLC

Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

Signal Processing with

GNURadio and SDRs

Ateet Kumar

Senior Security Researcher, Xen1thLabs

Digital14 LLC

Page 2: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

About me

• The Signals Guy• Electronics and Communication Engineer• Former DRDO Research Fellow

Ateet Kumar | Senior Security Researcher

Ateet KumarSenior Security ResearcherXen1thLabs, Digital 14 LLC

@HyperS0nik [email protected]

Page 3: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

Content

• Basics of EM and RF

• Important DSP Techniques

• GNURadio hands-on

• SDRs Hands-on

Ateet Kumar | Senior Security Researcher

Page 4: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

PART 1Basics of EM and RF

Ateet Kumar | Senior Security Researcher

Page 5: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

If you want to find secrets of the universe, think in terms of

energy, frequency and vibration.~Nikola Tesla

Ateet Kumar | Senior Security Researcher

Page 6: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

EM Spectrum

• EM waves are composed of oscillating magnetic and electric fields

Image Source: https://imagine.gsfc.nasa.gov/science/toolbox/emspectrum1.html, https://science.nasa.gov/ems/05_radiowaves

Ateet Kumar | Senior Security Researcher

Page 7: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

• EM waves with wavelength longer than infrared.

• 30Hz to 300GHz

• Either in terms of frequency or wavelength

• Generated by accelerating electric charges. ( e.g.current)

• Space generates a lot of Radio waves too

• Radio waves are EM waves too

• Most of the space discoveries are the result of someRadio signal from the space.

Image Source: https://science.nasa.gov/ems/05_radiowaves, http://www.ni.com/tutorial/3541/en/

Ateet Kumar | Senior Security Researcher

Radio Waves

Page 8: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

RF Communication Systems

Image Source: https://commons.wikimedia.org/wiki/

Ateet Kumar | Senior Security Researcher

Simplex

Full Duplex Half Duplex

Page 9: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

Wireless Communication System

Ateet Kumar | Senior Security Researcher

Page 10: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

Modulation

Ateet Kumar | Senior Security Researcher

1. Analog Modulation

2. Digital Modulation

Page 11: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

Types of Modulation

Ateet Kumar | Senior Security Researcher

1. Amplitude Modulation (AM): the amplitude of the carrier varies in accordance tothe message signal

2. Frequency Modulation (FM): the frequency of the carrier varies in accordance tothe message signal

3. Phase Modulation (PM): the phase of the carrier varies in accordance to themessage signal

• Carrier signal: c(t) = Ac sin(ωc + φ)

• Message Signal: m(t) = Am sin(ωm + φ)

• Modulated O/P signal: x(t) = [Ac + m(t)].c(t)

Page 12: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

Amplitude Shift Keying

Ateet Kumar | Senior Security Researcher

• ASK

• FSK

• PSK

1 0 1 0 1

Page 13: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

Frequency Shift Keying

Ateet Kumar | Senior Security Researcher

• ASK

• FSK

• PSK

1 0 1 0 1

Page 14: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

Phase Shift Keying

Ateet Kumar | Senior Security Researcher

• ASK

• FSK

• PSK

1 0 1 0 1

Page 15: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

Ateet Kumar | Senior Security Researcher

PART 2Important DSP Techniques

Page 16: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

Frequency Domain Anlaysis Vs Time Domian Analysis

Ateet Kumar | Senior Security Researcher

Page 17: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

Time domain and frequency domain plots of a Sine Wave

Image Source: Data Communications and Networking, Fourth Edition, Forouzan

Ateet Kumar | Senior Security Researcher

Page 18: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

Decomposition of a composite periodic signal in the time andfrequency domains

Image Source: Data Communications and Networking, Fourth Edition, Forouzan

Ateet Kumar | Senior Security Researcher

Page 19: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

CT DT

Sampling

Image Source: https://en.wikipedia.org/wiki/Sampling_(signal_processing)

Ateet Kumar | Senior Security Researcher

Page 20: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

• Reducing sampling rate

• Simply Low pass filtering

• Also called Downsampling

• The decimation factor is simply the ratio of the input rate to the output rate. It is usually symbolized by “M”, so input rate / output rate=M.

• Why decimate? to reduce the cost of processing

• You can only decimate by integer factors; you cannot decimate by fractional factors.

• A signal can be down-sampled (without doing any filtering) whenever it is “oversampled”, that is, when a sampling rate was used that was greater than the Nyquist criteria required.

Decimation

Image Source: https://dspguru.com/dsp/faqs/multirate/decimation)

Ateet Kumar | Senior Security Researcher

Page 21: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

• Inserting zero-valued samples between original samples to increase the sampling rate.

• Zero Stuffing

• Upsampling

• Increase the sampling rate at the output of one system so that another system operating at a higher sampling rate can input the signal.

• The interpolation factor is simply the ratio of the output rate to the input rate. It is usually symbolized by “L”, so output rate / input rate=L.

Interpolation

Image Source: https://dspguru.com/dsp/faqs/multirate/decimation)

Ateet Kumar | Senior Security Researcher

Page 22: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

A BREAK IS ALWAYS GOOD

Page 23: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

Ateet Kumar | Senior Security Researcher

PART 3GNURadio Practical

Page 24: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

• Free and open source SDK

• Signal Processing modules for SDRs

• Source: www.gnuradio.org

Let’s use it to learn it ….

Ateet Kumar | Senior Security Researcher

Page 25: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

Ateet Kumar | Senior Security Researcher

PART 4Software Defined Radios

Page 26: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

Image source: https://en.wikipedia.org/wiki/Software-defined_radio

Software Defined Radios

Ateet Kumar | Senior Security Researcher

Page 27: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

BladeRF from Nuand HackRf one – Great Scott Gadgets

RTL-SDR DongleLime SDR

Ettus Research USRP B210

Some popular SDRs

Ateet Kumar | Senior Security Researcher

Page 28: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

• SDR#

• GQRX

• SDR Console

• GNURadio

• HDSDR

• Sigdigger

There are many. You just have to look for the appropriate one.

Ateet Kumar | Senior Security Researcher

Some popular SDRs

Page 29: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

Ateet Kumar | Senior Security Researcher

How to Start looking into Signals

Choose the region of

Frequency

Know the legal rules and

regulations in your region/

country

Select the appropriate SDR

device

Prepare the system – OS,

SDR tools, Signal

Processing tools

Start Signal Analysis

Region Specific

Spectrum

Region Specific

Cheap or Costly

Lots of guidance

online

Avoid interfering

Page 30: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

Let’s start Signal Hunting …

Ateet Kumar | Senior Security Researcher

Page 31: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

You can download the GNUradio examples from below:

https://github.com/AteetKumar/GNUradio_examples

Note:

• You may require to change the values in some blocks to make them work according to your system.

• Also, you can follow from the recording of the workshop all the GNURadio and SDR examples that were covered in this workshop.

Please feel free to contact me for any queries on RF Research, I will be happy to help.

Page 32: Signal Processing with GNURadio and SDRs WORKSHOP...•Space generates a lot of Radio waves too •Radio waves are EM waves too •Most of the space discoveries are the result of some

Thank YouAteet Kumar, [email protected]

See you at HITB's Discord channel for questions & answers!