Forum: GNU Radio WinDRM

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C64c1417762c07a7587efc9af476f1bd?d=identicon&s=25 Brett L Trotter (Guest)
on 2006-05-08 00:41
(Received via mailing list)
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!
635b8cf1ca106f565815ca16ccc438ae?d=identicon&s=25 Matteo Campanella (Guest)
on 2006-05-09 10:57
(Received via mailing list)
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
/mnt/ramfs/drm.raw"

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


here follows the drm.py 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",
default=5990e3,
                          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:
            parser.print_help()
            sys.exit(1)

        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)
        src.set_pga(0,options.gain)

        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
freq
                                         3e3,        # width of trans.
band
                                         gr.firdes.WIN_HANN)

        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",
512,
demod_rate)
        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__':
    main()
This topic is locked and can not be replied to.