Code Monkey home page Code Monkey logo

gr-dab's Introduction

gr-dab

A Digital Audio Broadcasting and Digital Audio Broadcasting + module for GNU Radio

Contents

0: License

1: Google Summer of Code 2017

2: Installation

3: Usage

4: Features

5: Current Constraints

6: Ideas

7: Known Bugs

8: Documentation

License

Copyright (C) Andreas Müller, 2011, Moritz Luca Schmid, 2017

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Google Summer of Code 2017

This repository is the result of the 2017 Google Summer of Code project "A DAB/DAB+ transceiver app" by Moritz Luca Schmid. It is a fork of the gr-dab repository of Andreas Mueller which already contains the implementation of the DAB physical layer including OFDM. The following expanding work on gr-dab was done during GSoC 2017 by Moritz Luca Schmid:

  • FIC source and expand FIC sink (GNU Radio blocks)
  • FIC encoder, including CRC, energy dispersal, convolutional encoding with puncturing (GNU Radio blocks)
  • MSC encoder and decoder, including CRC, energy dispersal/descramble, convolutional encoding/decoding with puncturing, time interleaving/deinterleaving (GNU Radio blocks)
  • DAB transmission frame multiplexer (GNU Radio block)
  • MPEG Audio Layer II encoder/decoder for DAB tranmitter/receiver (GNU Radio blocks)
  • HE-AAC v2 (mp4) encoder/decoder for DAB+ transmitter/receiver (GNU Radio blocks)
  • Graphical user interface for DAB/DAB+ transmission/reception (pyQt4)
  • "DABstep" as an executable application for DAB/DAB+ transmission/reception

For more detailed information about the work done during GSoC, containing changes in code and new code, check out the commit history of this repository. Weekly reports containing updates about the working progress, additional information, highlights and challenging pieces during GSoC can be found on my GSoC blog.

Summarizing, all set milestones for GSoC were fulfilled. All my code got merged into the master branch of this repository. This fork will serve as upstream repository for further development of the OFDM receiver (especially with respect to synchronization), and other improvements.

Installation

This directory (and the resulting tarball) contains a build tree for gr-dab.

This package requires that GNU Radio is already installed. It also depends on some GNU Radio prerequisites, such as Boost and cppunit.

A dependency is the FAAD2 library. (ubuntu: sudo apt-get install libfaad-dev, fedora: sudo dnf install faad2-devel)

It also depends on fdk-aac with DAB patches (fdk-aac-dab). You'll find it in the eponymous subdirectory; build it using:

$ cd fdk-aac-dab
$ ./bootstrap
$ ./configure [--prefix ...] [--other options]
$ make
$ make install

There is a dependency on the modified MPEG encoder libtoolame from the ODR project. It's fetched by ´git submodule update --init´ automatically.

To build this module, run these commands:

$ git submodule update --init
$ mkdir build
$ cd build
$ cmake ../
$ make
$ sudo make install
$ sudo ldconfig

Features

  • Receiving and Transmitting DAB/DAB+ broadcasts with the graphical application "DABstep"
  • Receiving or Transmitting DAB/DAB+ with prepaired GNU Radio Companion flowgraph in examples/
  • Receiving or Transmitting DAB/DAB+ by building your own GNU Radio flowgraph with provided gr-dab blocks
  • USRP and RTL-SDR for reception supported

Usage

  • GUI

    • execute "DABstep" over command line
    • run python/GUI/main.py
  • Flowgraphs

    • run the flowgraphs in examples/ with GNU Radio Companion

Current Constraints

  • only audio channels supported so far, no data channels
  • PAD interpretation and generation not supported so far
  • only EEP with protection profile set A supported so far, no set B and no UEP

Ideas

  • FM simulation, calculating the audio noise out of the SNR and adding it to the audio
  • parallel FM receiver that fills in the audio in case a superframe is broken
  • include reception and transmission of data channels with packed data, e.g. pictures

Known Bugs

  • Audio underruns disturb played audio signal without having actual errors. Additional buffer through delay block is a temporary fix that only works until reception errors occur.

Documentation

You can build the Doxygen documentation of the c++ classes in lib/ with this command: $ doxygen doxygen-config

gr-dab's People

Contributors

andrmuel avatar fwunsch avatar gzm0 avatar marcusmueller avatar mlsmd avatar noc0lour avatar piratfm avatar rubund avatar steve-m 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gr-dab's Issues

CMake error installing gr-dab

Hello,

I'm trying to install gr-dab with the following command:

$ cd gr-dab-maint-3.8
$ mkdir build
$ cd build
$cmake ../
$make
$ sudo make install
$ sudo ldconfig

Already when running cmake ../ I fail with the following error message:

-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found version "2.7.17")
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython2.7.so (found suitable version "2.7.17", minimum required is "2")
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/gnuradio/GrTest.cmake:45 (get_target_property):
The LOCATION property may not be read from target "gnuradio-dab". Use the
target name directly with add_custom_command, or use the generator
expression $<TARGET_FILE>, as appropriate.

What do I have to change?

Debug info spams console in executable DABstep

Debug info spams console and should be blocked in DABstep because the information is also provided within the graphical application.
The information is though important for the use in GRC and should therefore only blocked for the executable DABstep.

cannot import name dab_swig

hello,
I just have installed the dab whits and have found this error when running the dab transmitter flowgraph in gnuradio companion version 3.7.9 but the install process was ok.

Problem with transmitting DAB signal

I've checked out the working_branch repo and built it without any problems

When i run GRC I get no errors except for some warning:

gr::buffer::allocate_buffer: warning: tried to allocate
4 items of size 20416. Due to alignment requirements
64 were allocated. If this isn't OK, consider padding
your structure to a power-of-two bytes.
On this platform, our allocation granularity is 4096 bytes.

the receiver GRC works fine (receiving other stations) except for some bugs (buffer underruns in the beginning and the ODFM demuxer seems not always to init/decode, but after some restarts it does)

but for some reason cant get the transmitter to work with the working_branch

it seems to run and it is transmitting but if i monitor (listen to) the signal in #SDRSharp it sounds (and looks a bit) different than other DAB signals

sounds like some metalic sampled phasing sound, while other DAB signals sound more like hiss

probably the OFDM modulated signal is invalid? because it is/seems not demodulated

dab_grc_working_branch

can someone maybe upload a short recorded file sample (from out of the ODFM Modulator) to compare ?

other branches or early commits gave all a circular memory problem,
compiling looks fine but problems with GRC to run on a 16GB system
and another 4GB system

also DABstep runs but has the same TX problem on working_branch and circular buffer error on old(er) commits

really wonder what the problem could be, upto now many other (transmitting) projects
like TX FM and TX digital ran fine, also the receiving part of DAB runs fine (except of some bugs)

hope someone can help with this problem,

best regards.

Detect mono/stereo + rate autonomously instead of relying on user

try

import wave
w = wave.open("/path/to/file.wav")
print str(w.getframerate()) + "Hz, " + (w.getnchannels() == 1) ? "mono" : ((w.getnchannels() == 2) ? "stereo" : "too many channels for its own good")

(and please, never ever use cond1 ? result1 : ( cond2 ? result2 : result3) in production code :D )

Audio underruns

The audio card gets underruns although there are no errors in received MPEG Frames. This is probably a buffer issue.

DABstep TX Country list is... special

Not sure if this might simply be a standards issue, but this list might be missing one or two countries that I've heard of:

    country_ID_ECC_E0 = [ 
        "None", 
        "Germany", 
        "Algeria", 
        "Andorra", 
        "Israel", 
        "Italy", 
        "Belgium", 
        "Russian Federation", 
        "Azores (Portugal)", 
        "Albania", 
        "Austria", 
        "Hungary", 
        "Malta", 
        "Germany", 
        "Canaries (Spain)", 
        "Egypt" 
    ] 

Gracefully handle decode errors

In a lot of places signal processing is stopped (by throw()ing) if an error is found.

This behaviour must be replaced with a method that handles decoding errors gracefully and skips the current frame or inserts padding to smooth out the audio decoding.

Also checks in fib_sink and mp4_decode need to be verified for standard compliance.

Installation

I am not able to install it. After running the comands on the description GNU Radio keeps without providing the gr-dab blocks. And I am not able to run the DABstep neither. ¿Could someone help me?

Thank you in advance

DAB transmitter not working with GR 3.8.5?

Hello,

after successfully compiling the code in the 3.8 branch according to the Readme I still can't get the transmitter part in DABStep to work. After I start the transmitter the program crashes.
The blocks in GNURadio companion examples seem to be not existing as well (and are red in the examples). The receiving path seems to work fine with an USRP X310.

Are there any additional steps to be taken or software to be installed to get the transmitter functionality working? What is the last stable version for 3.8?

Any help would be appreciated.

Cheers

My top_block.py file doesn't import dab at the top

My top_block.py generated python file file doesn't import dab at the top of the file
Which gives me name error whenever I try to run any of the blocks any idea how to edit the generated python file or solve to this problem

Required argument 'data_rate_n' (pos 9) not found

hi,
I was able to run the gr-dab in the gnuradio live to be sure the environment is correct but still have this issue when running the transmitter example:

File "/home/ubuntu/src/gr-dab/examples/top_block.py", line 122, in init
self.dab_fib_source_b_0 = dab.fib_source_b(1, 1, "jfkldsa", '', "fdsas", 1, 2, 14)
File "/usr/local/lib/python2.7/dist-packages/dab/dab_swig.py", line 8843, in make
return _dab_swig.fib_source_b_make(*args, **kwargs)
TypeError: Required argument 'data_rate_n' (pos 9) not found

The argument data_rate in FIB_source block is not taken correctly while the value is there(14).

what I'm doing wrong?.

error running dab_transmitter

I've just checked out the repo and built it.

Getting the following error running the dab_transmitter.grc:
`
self.dab_fib_source_b_0 = dab.fib_source_b(1, 1, "ensemble", "servicelabel", "serivcecomp", 1, [2], [14])
TypeError: make() takes exactly 10 arguments (8 given)

screenshot from 2018-09-07 19-30-06
`

Environment:

  • Ubuntu 18.04.1
  • Python 2.7.15rc1
  • GNU Radio Companion 3.7.11
  • Using commit 31da0df

Any ideas why that happens?

fic_encode test fails again

test 10
    Start 10: qa_fic_encode

10: Test command: /usr/bin/sh "/home/marcus/src/gr-dab/build/python/qa_fic_encode_test.sh"
10: Test timeout computed to be: 9.99988e+06

10: Traceback (most recent call last):
10:   File "/home/marcus/src/gr-dab/python/qa_fic_encode.py", line 27, in <module>
10:     from fic_encode import fic_encode
10:   File "/home/marcus/src/gr-dab/python/fic_encode.py", line 24, in <module>
10:     import dab
10: ImportError: No module named dab
1/1 Test #10: qa_fic_encode ....................***Failed    0.54 sec

You need to make sure that in test code, which is run before anything gets installed, you don't use

import dab

when you really mean to include the SWIG'ed C++ module.

The right way to do it is to explicitly import the dab_swig as dab, and manually import all the python classes you need (which aren't in dab_swig).

In this particular case, we include fic_encoder (quite obviously, because that's what we want to test); but that in turn imports dab – which is really no good, because dab is its own module, and that includes itself ... so, simply import dab_swig if you need it there to give you C++ classes, and if you need plain python classes, import them from . .

Missing blocks for DAB transmitter

Hey, I managed to install gr-dab without error but when launching GNU radio im able to put only:
DAB +Audio decoder
DAB Coarse Frequency Correction
DAB Demultiplexer
DAB Differential phasor
DAB FIC Decoder
DAB Frequency Intervealer
DAB OFDM Demodulator
DAB OFDM Synchronization

Only those mentioned blocks have their .yml files in gnuradio /usr/local/share/gnuradio/grc/blocks installed, the rest of block dont have them installed there and GNU radio is saying block missing when loaded example of DAB transmitter. Can you help me, because im green in fixing this issue.

Best regards

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.