Apparently, a forked version of DRM using lower bandwidth codecs has
been developed- originally called Hamdream by HB9TLK and was GUI-fied by
N1SU and called WinDream. This particular version uses different codecs
and supports two-way mode.

It seems like this version would be more directly aimed at USRP/GNURadio
users, though support for ‘official’ DRM would be obviously beneficial
as well!

Brett, here there is how I made it work on my install:

  1. create a tmpfs on linux by adding this mount point to /etc/fstab:
    ramfs /mnt/ramfs tmpfs defaults 0 0

  2. mount the new ram file system “mount ramfs”

  3. create a pipe with the command “mkfifo /mnt/ramfs/drm.raw”

  4. attach the standard drm to the pipe: “drm --fileio

  5. start with the correct frequency (see -help)

here follows the code:

#!/usr/bin/env python

from gnuradio import gr
from gnuradio import usrp
from math import pi
from gnuradio import eng_notation
from gnuradio.eng_option import eng_option
from gnuradio.wxgui import stdgui, scopesink, fftsink
from optparse import OptionParser
import wx

class app_flow_graph (stdgui.gui_flow_graph):
def init(self, frame, panel, vbox, argv):
stdgui.gui_flow_graph.init (self, frame, panel, vbox, argv)

    parser = OptionParser(option_class=eng_option)
    parser.add_option("-f", "--freq", type="eng_float", 

help=“set frequency to FREQ”, metavar=“FREQ”)
parser.add_option("-g", “–gain”, type=“int”, default=10,
help=“set gain in dB (default is midpoint)”)
(options, args) = parser.parse_args()
if len(args) != 0:

    adc_rate = 64e6
    usrp_decim = 148
    if_rate = adc_rate / usrp_decim
    if_decim = 9
    demod_rate = if_rate / if_decim        #48048.048
    src = usrp.source_c (0, usrp_decim)
    src.set_rx_freq (0, -options.freq+7e3)
    actual_freq = src.rx_freq(0)

    print "FREQ: ",actual_freq
print "Gain: ",options.gain

    channel_coeffs = \
                 gr.firdes.low_pass (if_decim,   # gain
                                     if_rate,    # sampling rate
                                     14e3,       # low pass cutoff 

3e3, # width of trans.

    dec =  gr.fir_filter_ccf(if_decim,channel_coeffs)
    vc = gr.multiply_const_cc(10)
    print "len(channel_coeffs) =", len(channel_coeffs)

    fft, win = fftsink.make_fft_sink_c (self, panel, "Spectrum", 

vbox.Add (win, 1, wx.EXPAND)

c2r = gr.complex_to_real()
r2s = gr.float_to_short()

out = gr.file_sink(gr.sizeof_short,"/mnt/ramfs/drm.raw")

    # now wire it all together
    self.connect (src, dec)
    self.connect (dec, vc)
    self.connect (dec,fft)
    self.connect (vc,c2r,r2s,out)

def main():
app = stdgui.stdapp (app_flow_graph, “Spectrum Analyzer”)
app.MainLoop ()

if name == ‘main’:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs