Coder Social home page Coder Social logo

fhss_gnuradio's Introduction

FHSS_GNUradio

Frequency Hopping Spread Spectrum (FHSS) is a method of transmitting radio signals by continuously switching ("hopping") over various frequencies determined by a pseudo random code. To know more about it, you can refer to the ppt in the repository FHSS_intro.pdf

We've built blocks to send PM modulated waves over 8 and 64 different frequencies, according to a maximally generated pseduo random code, synchronise the codes at recieving end, and using coherent demodulation to retrieve the message.

Pre-Requisite Libraries for GNUradio :-

  1. sudo apt-get install liblog4cpp5-dev
  2. sudo apt-get install swig
  3. sudo apt-get install doxygen
  4. sudo apt-get install libcppunit-dev
  5. sudo apt-get install cppunit
  6. sudo apt-get install cppunit-dev
  7. sudo apt-get install gnuradio-dev
  8. sudo apt-get install python-sphinx

Running the code on your PC's GNUradio:-

  • To install and use the blocks in GNUradio, clone the repository, make build folder in each block's directory, copy the compile.sh in the created build folder, and run compile.sh from the build folder of each block.
  • If you've installed GNUradio directly from the git repository, this should suffice, but if not, you will have to do a little more to get the blocks on GNUradio. Please follow Troubleshooting steps mentioned at end. By the end of troubleshooting, you should get 4 blocks : "FHSS_mod_64/8 and FHSS_demod_64/8" in your PC's GNUradio.

Block Desciption :-

  1. FHSS_demod_64 : Block for FHSS and PM demodulation for 64 frequencies version
  • Parameters: Sampling Rate
  • O/P : Final message signal
  • I/P : Modulated 64 frequency hopped PM wave
  1. FHSS_mod_64 : Block for FHSS and PM modulation for 64 frequencies version
  • Parameters: Sampling Rate, Modulation Sensitivity of PM ( kp*m(t))
  • O/P : Modulated PM wave hopped over 64 frequencies
  • I/P : Message Signal
  1. FHSS_demod_8 : Block for FHSS and PM demodulation for 8 frequencies version
  • Parameters: Sampling Rate
  • O/P : Final message signal
  • I/P : Modulated 8 frequency hopped PM wave
  1. FHSS_mod_8 : Block for FHSS and PM demodulation for 8 frequencies version
  • Parameters: Sampling Rate, Modulation Sensitivity of PM ( kp*m(t))
  • O/P : Modulated PM wave hopped over 8 frequencies
  • I/P : Message Signal

GRC Files :-

You can directly run the GRC files in the repository, for some reference/example.

  1. mod_8.grc : Simple modulator and demodulator for 8 frequencies version, you can observer hopping frequencies in QT GUI sink at end of modulator and final demodulated message at end of demodulator
  2. mod_64.grc : The same modulator and demodulator but for 64 frequencies version
  3. multipath.grc : GRC file to view performance of FHSS in simulated multipath environment
  4. interference.grc : GRC file to view performance of FHSS due to in band interferance.

Troubleshooting :-

  1. Compile.sh doesn't work :- Import CMakeList.txt inside the lib folder, and change the names of .cc files to .cpp/.py wherever required. Also, add a blank file blank.cpp in libs/ folder to ensure smooth running.

  2. For including your custom made block in grc, add the path to the config file located at /etc/gnuradio/conf.d and write the path of your "build" directory in the local blocks section in the file.

Then you are good to go :)

Useful Links for reference:-

fhss_gnuradio's People

Contributors

agrim9 avatar harshvardhan1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fhss_gnuradio's Issues

demod blocks fail

Ubuntu 16.04 64-bit, GNU Radio Companion 3.7.9

When creating a demod block, an error message is given. For demod_64:
Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/ActionHandler.py", line 348, in _handle_action self.get_flow_graph().update() File "/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/FlowGraph.py", line 403, in update self.create_labels() File "/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/Element.py", line 78, in create_labels for child in self.get_children():child.create_labels() File "/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/Block.py", line 212, in create_labels markups = [param.get_markup() for param in self.get_params() if param.get_hide() not in ('all', 'part')] File "/usr/lib/python2.7/dist-packages/gnuradio/grc/python/Param.py", line 170, in get_hide lambda p: ' '.join([p._type, p._nports]), self.get_parent().get_ports()) File "/usr/lib/python2.7/dist-packages/gnuradio/grc/python/Param.py", line 170, in <lambda> lambda p: ' '.join([p._type, p._nports]), self.get_parent().get_ports()) TypeError: sequence item 0: expected string, instance found Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/DrawingArea.py", line 150, in _handle_window_expose self._flow_graph.draw(gc, self._pixmap) File "/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/FlowGraph.py", line 372, in draw element.draw(gc, window) File "/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/Block.py", line 318, in draw window.draw_drawable(gc, self.horizontal_label, 0, 0, x+BLOCK_LABEL_PADDING, y+(self.H-self.label_height)/2, -1, -1) AttributeError: 'Block' object has no attribute 'horizontal_label'

For demod_8:

Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/ActionHandler.py", line 348, in _handle_action self.get_flow_graph().update() File "/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/FlowGraph.py", line 403, in update self.create_labels() File "/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/Element.py", line 78, in create_labels for child in self.get_children():child.create_labels() File "/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/Block.py", line 212, in create_labels markups = [param.get_markup() for param in self.get_params() if param.get_hide() not in ('all', 'part')] File "/usr/lib/python2.7/dist-packages/gnuradio/grc/python/Param.py", line 170, in get_hide lambda p: ' '.join([p._type, p._nports]), self.get_parent().get_ports()) File "/usr/lib/python2.7/dist-packages/gnuradio/grc/python/Param.py", line 170, in <lambda> lambda p: ' '.join([p._type, p._nports]), self.get_parent().get_ports()) TypeError: sequence item 0: expected string, instance found Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/DrawingArea.py", line 150, in _handle_window_expose self._flow_graph.draw(gc, self._pixmap) File "/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/FlowGraph.py", line 372, in draw element.draw(gc, window) File "/usr/lib/python2.7/dist-packages/gnuradio/grc/gui/Block.py", line 318, in draw window.draw_drawable(gc, self.horizontal_label, 0, 0, x+BLOCK_LABEL_PADDING, y+(self.H-self.label_height)/2, -1, -1) AttributeError: 'Block' object has no attribute 'horizontal_label'

EOF

creating Custom-GNURadio-Python-Blocks

Sear Sir,
I created a block in Python using these instructions: (module is Energy and block is Energy_ff)
gr_modtool newmod Energy
cd gr-Energy
ls
cd gr-Energy
gr_modtool add -t sync -l python
Taking accout that i open Enery_ff.py and i change my code and i save it
after that i build and install project
cmake ../
make
sudo make install
sudo ldconfig
Generating and installing are done successfully:
-- Installing: /usr/local/share/gnuradio/grc/blocks/Energy_detection.block.yml

Finally i run gnu radio, this bloc is not able to be created and the windows show this error:

column 16
<<< Welcome to GNU Radio Companion 3.10.8.0-rc2 >>>

Block paths:
/usr/local/share/gnuradio/grc/blocks

Loading: "/home/crm/x310_rx_v3.grc"

Check: /usr/local/share/gnuradio/grc/blocks/Energy_detection.block.yml
FlowGraph Error: mapping values are not allowed here
in "/usr/local/share/gnuradio/grc/blocks/Energy_detection.block.yml", line 17, column 16
Done

Loading: "/home/crm/x310_rx_v1.grc"

Check: /usr/local/share/gnuradio/grc/blocks/Energy_detection.block.yml
FlowGraph Error: mapping values are not allowed here
in "/usr/local/share/gnuradio/grc/blocks/Energy_detection.block.yml", line 17, column 16
Done

Loading: "/home/crm/x310_rx_v2.grc"

Check: /usr/local/share/gnuradio/grc/blocks/Energy_detection.block.yml
FlowGraph Error: mapping values are not allowed here
in "/usr/local/share/gnuradio/grc/blocks/Energy_detection.block.yml", line 17, column 16
Done

How can i solve this problem please

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.